php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60109 Cross Compiling turns of Dynamic Library support at all
Submitted: 2011-10-21 17:25 UTC Modified: -
Votes:9
Avg. Score:4.2 ± 0.9
Reproduced:6 of 8 (75.0%)
Same Version:2 (33.3%)
Same OS:5 (83.3%)
From: julian at whisper-net dot de Assigned:
Status: Open Package: Dynamic loading
PHP Version: 5.3.8 OS: Linux
Private report: No CVE-ID:
Password:
Status:
Package:
Bug Type:
Summary:
From: julian at whisper-net dot de
New email:
PHP Version: OS:

 

 [2011-10-21 17:25 UTC] julian at whisper-net dot de
Description:
------------
Hallo,

while trying to cross compile PHP via a bitbake recipe (openembedded.org), I discovered, that somehow the build system of PHP turns of the Dynamic Loading support if it detects that PHP is being cross compiled.

See configure-Script of PHP:

[...]
  if test "$found" = "yes"; then
    ac_libs=$LIBS
    LIBS="$LIBS -ldl"
    if test "$cross_compiling" = yes; then :
  found=no
else
[...]

As you can see, the configure script sets "found" to no for libdl/dlopen-tests, if cross_compiling is enabled.
In my opinion (and according to my tests) there is no reason to do this, as overriding this manually by setting -DHAVE_LIBDL as CFLAGS and adding -ldl to LDFLAGS leads to a PHP build that is Dynamic-Loading-enabled and works without problems on the target machine.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sat May 27 02:01:36 2017 UTC