Bug #60109 [Com]: Cross Compiling turns of Dynamic Library support at all

From: Date: Tue, 20 Oct 2020 10:52:46 +0000
Subject: Bug #60109 [Com]: Cross Compiling turns of Dynamic Library support at all
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229788@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60109&edit=1

 ID:                 60109
 Comment by:         maroszek at gmx dot net
 Reported by:        julian at whisper-net dot de
 Summary:            Cross Compiling turns of Dynamic Library support at
                     all
 Status:             Re-Opened
 Type:               Bug
 Package:            Dynamic loading
 Operating System:   Linux
 PHP Version:        5.3.8
 Block user comment: N
 Private report:     N

 New Comment:

I can confirm that this is also happening on buildroot.


Previous Comments:
------------------------------------------------------------------------
[2020-05-08 13:28:08] cbing at cybernetics dot com

No, this is still a problem in 7.4 with Yocto Dunfell (latest LTS release).

------------------------------------------------------------------------
[2018-09-20 16:29:41] cmb@php.net

This appears to have been resolved in the meantime, hasn't it?

------------------------------------------------------------------------
[2011-10-21 17:25:22] 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.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=60109&edit=1


Thread (6 messages)

« previous php.bugs (#229788) next »