Bug #51276 [NEW]: php_load_extension is called when HAVE_LIBDL is not defined.
| From: | tsteiner at nerdclub dot net | Date: | Thu, 11 Mar 2010 17:08:42 +0000 |
| Subject: | Bug #51276 [NEW]: php_load_extension is called when HAVE_LIBDL is not defined. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-148526@lists.php.net to get a copy of this message | ||
From:
Operating system: Linux
PHP version: 5.3.2
Package: Compile Failure
Bug Type: Bug
Bug description:php_load_extension is called when HAVE_LIBDL is not defined.
Description:
------------
When HAVE_LIBDL is not defined in main/php_config.h, the function
php_load_extension is not compiled in ext/standard/dl.c. However, the
function php_load_php_extension_cb() will always be compiled with a call to
php_load_extension. This causes compilation to fail with the following
message:
main/php_ini.o: In function `php_load_php_extension_cb':
[path removed]/main/php_ini.c:350: undefined reference to
`php_load_extension'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
This appears to be the only place php_load_extension is called.
Furthermore, php_load_php_extension_cb is only referenced by
php_ini_register_extensions(), which is only called in at main/main.c:2021.
It would seem that on architectures that don't HAVE_LIBDL, the preceding
functions should be inside #if defined() checks.
I found this bug while cross-compiling from x86_64 to powerpc but I don't
believe it is a cross-compiling issue.
Test script:
---------------
CC=${CROSS_COMPILE}gcc ../php-5.3.2/configure --host=powerpc-unknown-linux
make
Expected result:
----------------
PHP should compile without errors.
Actual result:
--------------
main/php_ini.o: In function `php_load_php_extension_cb':
[path removed]/main/php_ini.c:350: undefined reference to
`php_load_extension'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
--
Edit bug report at http://bugs.php.net/bug.php?id=51276&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51276&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51276&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51276&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=51276&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51276&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=51276&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=51276&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=51276&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=51276&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=51276&r=support
Expected behavior: http://bugs.php.net/fix.php?id=51276&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=51276&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=51276&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=51276&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51276&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51276&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=51276&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=51276&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=51276&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=51276&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=51276&r=mysqlcfg