#25741 [Opn->Fbk]: Apache Cannot Load libphp4.so Due To Undefined Symbol __cmpdi2
| From: | elmicha@php.net | Date: | Fri, 03 Oct 2003 07:54:36 +0000 |
| Subject: | #25741 [Opn->Fbk]: Apache Cannot Load libphp4.so Due To Undefined Symbol __cmpdi2 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-48483@lists.php.net to get a copy of this message | ||
ID: 25741
Updated by: elmicha@php.net
Reported By: james at inpho dot com dot au
-Status: Open
+Status: Feedback
-Bug Type: Apache2 related
+Bug Type: OCI8 related
Operating System: RedHat 9
PHP Version: 4.3.3
New Comment:
Can you please try the hint given in
http://groups.google.de/groups?q=%22undefined+symbol%22+__cmpdi2&hl=de&lr=&ie=UTF-8&scoring=d&selm=20030520135824.GM14999%40dansat.data-plan.com&rnum=4,
i.e. append "
gcc -print-libgcc-file-name" (including the
backquotes!) to the SYSLIBS entry in $ORACLE_HOME/bin/genclntsh?
Previous Comments:
------------------------------------------------------------------------
[2003-10-03 02:43:12] james at inpho dot com dot au
Description:
------------
If PHP 4.3.3 is compiled with --oci8 switch against Oracle 9.0.1, when
Apache 2.0.47 attempts to load the module it fails as per below:
Starting httpd: Syntax error on line 57 of
/usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into server:
/usr/local/oracle/product/9.0.1/lib/libclntsh.so.9.0: undefined symbol:
__cmpdi2
=== Why Use Oracle Client 9.0.1?
In order to connect to legacy Oracle 7.2/7.3 instances. Versions of
Oracle after this do not support these databases.
=== Building PHP
glibc has to be downgraded in order to compile PHP 4.3.3 successfully.
Compile failure:
CONFIGURE: './configure' '--with-mysql=/usr/local/mysql'
'--with-apxs2=/usr/local/apache2/bin/apxs'
'--with-openssl=/usr/local/ssl' '--with-oci8' '--enable-sigchild'
CC: gcc
CFLAGS: -g -O2
CPPFLAGS:
CXX:
CXXFLAGS:
INCLUDES: -I$(top_builddir)/Zend -I/usr/local/ssl/include
-I/usr/local/mysql/include
-I/usr/local/oracle/product/9.0.1/rdbms/public
-I/usr/local/oracle/product/9.0.1/rdbms/demo
-I/usr/local/oracle/product/9.0.1/plsql/public
LDFLAGS: -Wl,-rpath,/usr/local/ssl/lib -L/usr/local/ssl/lib
-Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib
-Wl,-rpath,/usr/local/oracle/product/9.0.1/lib
-L/usr/local/oracle/product/9.0.1/lib
LIBS: -lmysqlclient -lz -lssl -lcrypto -lresolv -lm -ldl -lnsl
-ldl -lm -lclntsh
DLIBS:
SAPI: apache2handler
PHP_RPATHS: /usr/local/ssl/lib /usr/local/mysql/lib
/usr/local/oracle/product/9.0.1/lib
uname -a: Linux staging.int.inpho.com.au 2.4.20-19.9 #1 Tue Jul 15
17:18:13 EDT 2003 i686 i686 i386 GNU/Linux
gcc -o conftest -g -O2 -Wl,-rpath,/usr/local/ssl/lib
-L/usr/local/ssl/lib -Wl,-rpath,/usr/local/mysql/lib
-L/usr/local/mysql/lib -Wl,-rpath,/usr/local/oracle/product/9.0.1/lib
-L/usr/local/oracle/product/9.0.1/lib conftest.c -lmysqlclient -lz
-lssl -lcrypto -lresolv -lm -ldl -lnsl -ldl -lm -lclntsh 1>&5
/usr/local/oracle/product/9.0.1/lib/libclntsh.so: undefined reference
to `__ctype_b'
/usr/local/oracle/product/9.0.1/lib/libclntsh.so: undefined reference
to `__ctype_toupper'
/usr/local/oracle/product/9.0.1/lib/libclntsh.so: undefined reference
to `__ctype_tolower'
collect2: ld returned 1 exit status
=== Downgrading glibc
As per instructions here:
http://www.puschitz.com/InstallingOracle9i.shtml
rpm -Uvh --force glibc-2.3.2-5.i686.rpm glibc-common-2.3.2-5.i386.rpm
glibc-devel-2.3.2-5.i386.rpm
configure/make now succeeds.
=== Installation of PHP 4.3.3
Installing PHP CLI binary: /usr/local/bin/
Installing PHP CLI man page: /usr/local/man/man1/
Installing PHP SAPI module: apache2handler
/usr/local/apache2/build/instdso.sh
SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp4.la
/usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp4.la
/usr/local/apache2/modules/
cp .libs/libphp4.so /usr/local/apache2/modules/libphp4.so
cp .libs/libphp4.lai /usr/local/apache2/modules/libphp4.la
libtool: install: warning: remember to run `libtool --finish
/home/distrib/software/php-4.3.3/libs'
chmod 755 /usr/local/apache2/modules/libphp4.so
[activating module `php4' in /usr/local/apache2/conf/httpd.conf]
Installing shared extensions:
/usr/local/lib/php/extensions/no-debug-non-zts-20020429/
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Archive_Tar - already installed: 1.1
[PEAR] Console_Getopt - already installed: 1.0
[PEAR] PEAR - already installed: 1.2.1
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
[PEAR] DB - already installed: 1.5.0RC1
[PEAR] HTTP - already installed: 1.2.1
[PEAR] Mail - already installed: 1.1.1
[PEAR] Net_SMTP - already installed: 1.2.3
[PEAR] Net_Socket - already installed: 1.0.1
[PEAR] XML_Parser - already installed: 1.0.1
[PEAR] XML_RPC - already installed: 1.0.4
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
program: phpextdist
=== Starting Apache 2.0.47
Starting httpd: Syntax error on line 57 of
/usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into server:
/usr/local/oracle/product/9.0.1/lib/libclntsh.so.9.0: undefined symbol:
__cmpdi2
=== ldd libphp4.so
ldd libphp4.so
libcrypt.so.1 => /lib/libcrypt.so.1 (0x40251000)
libz.so.1 => /usr/lib/libz.so.1 (0x4027e000)
libresolv.so.2 => /lib/libresolv.so.2 (0x4028d000)
libm.so.6 => /lib/i686/libm.so.6 (0x4029f000)
libdl.so.2 => /lib/libdl.so.2 (0x402c1000)
libnsl.so.1 => /lib/libnsl.so.1 (0x402c5000)
libclntsh.so.9.0 =>
/usr/local/oracle/product/9.0.1/lib/libclntsh.so.9.0 (0x402da000)
libc.so.6 => /lib/i686/libc.so.6 (0x40a31000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
libwtc9.so => /usr/local/oracle/product/9.0.1/lib/libwtc9.so
(0x40b6a000)
libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40b6d000)
=== Other Notes
I also tried with the --enable-libgcc to no avail
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25741&edit=1