|  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: 2020-05-08 13:42 UTC
Avg. Score:4.5 ± 0.8
Reproduced:12 of 14 (85.7%)
Same Version:4 (33.3%)
Same OS:11 (91.7%)
From: julian at whisper-net dot de Assigned:
Status: Re-Opened Package: Dynamic loading
PHP Version: 5.3.8 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: julian at whisper-net dot de
New email:
PHP Version: OS:


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

while trying to cross compile PHP via a bitbake recipe (, 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
    LIBS="$LIBS -ldl"
    if test "$cross_compiling" = yes; then :

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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-20 16:29 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2018-09-20 16:29 UTC]
This appears to have been resolved in the meantime, hasn't it?
 [2018-10-07 09:36 UTC]
-Status: Feedback +Status: No Feedback
 [2020-05-08 13:28 UTC] cbing at cybernetics dot com
No, this is still a problem in 7.4 with Yocto Dunfell (latest LTS release).
 [2020-05-08 13:42 UTC]
-Status: No Feedback +Status: Re-Opened -Assigned To: cmb +Assigned To:
 [2020-10-20 10:52 UTC] maroszek at gmx dot net
I can confirm that this is also happening on buildroot.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 18:01:29 2024 UTC