php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18997 cannot load libphp4.so - referenced symbol not found
Submitted: 2002-08-20 16:54 UTC Modified: 2002-08-29 21:23 UTC
From: LouPicciano at comcast dot net Assigned:
Status: Closed Package: Dynamic loading
PHP Version: 4.3.0-DEV OS: Solaris 9 SPARC
Private report: No CVE-ID: None
 [2002-08-20 16:54 UTC] LouPicciano at comcast dot net
After a new compile of php 4.2.2 with _only_ the 
'--with-apxs=/dir/path' option:

'# apachectl configtest' reports:

Syntax error in httpd.conf:
Cannot load /usr/apache/libexec/libphp4.so into server: 
ld.so.1: /usr/apache/hin/httpd: fatal: relocation error: 
file /usr/apache/libexec/libphp4.so: symbol __cmpdi2: 
referenced symbol not found.

'# nm /usr/apache/libexec/libphp4.so | grep cmpd' reports:

[5171]  |   0|   0|NOTY |GLOB |0    |UNDEF  |__cmpdi2

Help!  (Thanks in advance...)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-20 16:55 UTC] rasmus@php.net
Try adding --enable-libgcc to your PHP configure line.  Let us know if that fixes it.
 [2002-08-21 15:07 UTC] LouPicciano at comcast dot net
adding --enable-libgcc _alone_ did not work, however...

./configure 
--with-apxs=/usr/apache/bin/apxs 
--enable-libgcc 
--enable-track-vars 
--with-mysql=/usr/local/mysql

got us beyond the __cmpdi2 symbol error. Now are getting:

Cannot load <...>/libphp4.so into server: ld.so.1: /usr/apache/bin/httpd: fatal: relocation error: file <...>/libphp4.so: symbol uncompress: referenced symbol not found

Also, an interesting sidenote: path to mysql must (apparently) be a 'real' pathname. Configure does not follow symlinks...
 [2002-08-21 15:24 UTC] edink@php.net
You probably need to add --with-zlib. Could you check this out?
 [2002-08-21 16:50 UTC] LouPicciano at comcast dot net
Rasmus et al,  Thanks for your feedback- your help put us on the right track.  So, using gcc 3.1, putting virtually all 'libs' into both LD_RUN_PATH and LD_LIBRARY_PATH and removing the --enable-libgcc option, the following works:

./configure 
--with-apxs=/usr/apache/bin/apxs 
--enable-track-vars 
--with-mysql=/usr/local/mysql 
--with-openssl 
--with-zlib
 [2002-08-29 20:35 UTC] littleriver2 at yahoo dot com
Experiencing the same issues on an Solaris 9 install - Any suggestions?

# nm /usr/local/apache1/libexec/libphp4.so |grep cmpdi2
[4386]	|         0|       0|NOTY |GLOB |0    |UNDEF  |__cmpdi2
# uname -a
SunOS platanar 5.9 Generic sun4u sparc SUNW,Ultra-5_10
 [2002-08-29 21:23 UTC] LouPicciano at comcast dot net
Successful build of php-4.3.0-Dev (Snapshot build 
200208230600) with Apache 2.0.40...

Here's the config.nice: ----------
'./configure' 
'--with-apxs2=/usr/apache2/bin/apxs' 
'--enable-track-vars' 
'--enable-debug' 
'--with-openssl' 
'--with-zlib' 
'--enable-bcmath' 
'--with-bz2' 
'--with-kerberos' 
'--with-ldap' 
'--enable-mbstring' 
'--with-mysql=/usr/local/mysql' 
'--with-iconv' 
'--enable-inline-optimization'

Gripped by a frenzied need to practice my typing, I also 
put paths to all relevant libs into LD_LIBRARY_PATH (but 
don't know if this was curative...)

And it works!   -   Lou
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 13:01:29 2024 UTC