|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25741 Apache Cannot Load Due To Undefined Symbol __cmpdi2
Submitted: 2003-10-03 02:43 UTC Modified: 2003-10-13 03:03 UTC
Avg. Score:4.2 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: james at inpho dot com dot au Assigned:
Status: No Feedback Package: OCI8 related
PHP Version: 4.3.3 OS: RedHat 9
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: james at inpho dot com dot au
New email:
PHP Version: OS:


 [2003-10-03 02:43 UTC] james at inpho dot com dot au
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/ into server: /usr/local/oracle/product/9.0.1/lib/ 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
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
SAPI:       apache2handler
PHP_RPATHS:  /usr/local/ssl/lib /usr/local/mysql/lib /usr/local/oracle/product/9.0.1/lib
uname -a:   Linux 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/ undefined reference to `__ctype_b'
/usr/local/oracle/product/9.0.1/lib/ undefined reference to `__ctype_toupper'
/usr/local/oracle/product/9.0.1/lib/ undefined reference to `__ctype_tolower'
collect2: ld returned 1 exit status

=== Downgrading glibc

As per instructions here:

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/ SH_LIBTOOL='/usr/local/apache2/build/libtool' /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp /usr/local/apache2/modules/
cp .libs/ /usr/local/apache2/modules/
cp .libs/libphp4.lai /usr/local/apache2/modules/
libtool: install: warning: remember to run `libtool --finish /home/distrib/software/php-4.3.3/libs'
chmod 755 /usr/local/apache2/modules/
[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/ into server: /usr/local/oracle/product/9.0.1/lib/ undefined symbol: __cmpdi2

=== ldd

ldd => /lib/ (0x40251000) => /usr/lib/ (0x4027e000) => /lib/ (0x4028d000) => /lib/i686/ (0x4029f000) => /lib/ (0x402c1000) => /lib/ (0x402c5000) => /usr/local/oracle/product/9.0.1/lib/ (0x402da000) => /lib/i686/ (0x40a31000)
        /lib/ => /lib/ (0x80000000) => /usr/local/oracle/product/9.0.1/lib/ (0x40b6a000) => /lib/i686/ (0x40b6d000)

=== Other Notes

I also tried with the --enable-libgcc to no avail


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-03 03:54 UTC]
Can you please try the hint given in,
 i.e. append "`gcc -print-libgcc-file-name`" (including the backquotes!) to the SYSLIBS entry in $ORACLE_HOME/bin/genclntsh?
 [2003-10-13 03:03 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 22:01:31 2024 UTC