ID: 34904 User updated by: sean dot healey at bayernlb dot co dot uk Reported By: sean dot healey at bayernlb dot co dot uk -Status: Bogus +Status: Open Bug Type: Sybase-ct (ctlib) related Operating System: Solaris 8 PHP Version: 5.0.5 New Comment:
Whoah! Please don't be misled by the configure script I submitted in this bug report - the LDFLAGS and CPPFLAGS variables were set during my attempts to work around the problem because I originally thought that the build was picking up the wrong libtcl.so. I have since verified that the only copies of this library on my system are under the Sybase paths. It does appear that the wrong libintl.so library is being picked up - it should be using the one under the Sybase path, but is ignoring it and using the one under /usr/lib instead. I have tried this build against both the Sybase 12.0 and 12.5 client libraries with identical results. My original configure script is: #!/usr/bin/sh DSQUERY=fx_dbserver2_ds SYBASE=/dpkg/sybase/sybase12_5 SYBASE_OCS=OCS-12_5 LD_LIBRARY_PATH=$SYBASE/$SYBASE_OCS/lib:/usr/local/lib:$LD_LIBRARY_PATH PATH=/usr/ccs/bin:$PATH export DSQUERY SYBASE SYBASE_OCS LD_LIBRARY_PATH PATH cd php-5.0.5 ./configure \ --prefix=/usr/local/php \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-sybase-ct=$SYBASE/$SYBASE_OCS \ --without-bz2 This produces a libphp5.so which is linked as follows: ldd /usr/local/apache2/modules/libphp5.so libtcl.so => /dpkg/sybase/sybase12_5/OCS-12_5/lib/libtcl.so libintl.so.1 => /usr/lib/libintl.so.1 libcomn.so => /dpkg/sybase/sybase12_5/OCS-12_5/lib/libcomn.so libct.so => /dpkg/sybase/sybase12_5/OCS-12_5/lib/libct.so libcs.so => /dpkg/sybase/sybase12_5/OCS-12_5/lib/libcs.so libresolv.so.2 => /usr/lib/libresolv.so.2 libm.so.1 => /usr/lib/libm.so.1 libdl.so.1 => /usr/lib/libdl.so.1 libnsl.so.1 => /usr/lib/libnsl.so.1 libsocket.so.1 => /usr/lib/libsocket.so.1 libz.so.1 => /usr/lib/libz.so.1 libxml2.so.2 => /usr/local/lib/libxml2.so.2 libiconv.so.2 => /usr/local/lib/libiconv.so.2 libc.so.1 => /usr/lib/libc.so.1 libmp.so.2 => /usr/lib/libmp.so.2 libpthread.so.1 => /usr/lib/libpthread.so.1 libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 /usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1 libthread.so.1 => /usr/lib/libthread.so.1 NOTE that the reference to libintl is still linked to the wrong library. I have investigated further and found that libintl.so.1 doesn't exist under the Sybase path - only libintl.so is found there. I need to somehow force the build to pick up the Sybase library instead of the Solaris library. A solved case on the Sybase site mentions that the Solaris library /usr/lib/libintl.so.1 has nothing to do with the Sybase library of the same name, which is possibly why the object not found error since my build is linking to the wrong library! Previous Comments: ------------------------------------------------------------------------ [2005-10-26 17:43:50] [EMAIL PROTECTED] Don't try outsmarting the configure. User error -> not PHP bug. ------------------------------------------------------------------------ [2005-10-18 11:03:24] sean dot healey at bayernlb dot co dot uk Description: ------------ I am getting the following error when trying to start Apache2 with the PHP plugin configured: # ./apachectl start Syntax error on line 232 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: ld.so.1: /usr/local/apache2/bin/httpd: fatal: relocation error: file /dpkg/sybase/OCS-12_0/lib/libtcl.so: symbol comn_free: referenced symbol not found When built without Sybase client library, the plugin starts up just fine. The php module DOES appear to be linked against the correct copy of libtcl.so - here are the without-sybase and with-sybase ldd outputs: # ldd libphp5.so.without_sybase libresolv.so.2 => /usr/lib/libresolv.so.2 libm.so.1 => /usr/lib/libm.so.1 libdl.so.1 => /usr/lib/libdl.so.1 libnsl.so.1 => /usr/lib/libnsl.so.1 libsocket.so.1 => /usr/lib/libsocket.so.1 libz.so.1 => /usr/lib/libz.so.1 libxml2.so.2 => /usr/local/lib/libxml2.so.2 libiconv.so.2 => /usr/local/lib/libiconv.so.2 libc.so.1 => /usr/lib/libc.so.1 libmp.so.2 => /usr/lib/libmp.so.2 libpthread.so.1 => /usr/lib/libpthread.so.1 libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 /usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1 libthread.so.1 => /usr/lib/libthread.so.1 # ldd libphp5.so libtcl.so => /dpkg/sybase/sybase12_5/OCS-12_5/lib/libtcl.so libintl.so.1 => /usr/lib/libintl.so.1 libcomn.so => /dpkg/sybase/sybase12_5/OCS-12_5/lib/libcomn.so libct.so => /dpkg/sybase/sybase12_5/OCS-12_5/lib/libct.so libcs.so => /dpkg/sybase/sybase12_5/OCS-12_5/lib/libcs.so libresolv.so.2 => /usr/lib/libresolv.so.2 libm.so.1 => /usr/lib/libm.so.1 libdl.so.1 => /usr/lib/libdl.so.1 libnsl.so.1 => /usr/lib/libnsl.so.1 libsocket.so.1 => /usr/lib/libsocket.so.1 libz.so.1 => /usr/lib/libz.so.1 libxml2.so.2 => /usr/local/lib/libxml2.so.2 libiconv.so.2 => /usr/local/lib/libiconv.so.2 libc.so.1 => /usr/lib/libc.so.1 libmp.so.2 => /usr/lib/libmp.so.2 libpthread.so.1 => /usr/lib/libpthread.so.1 libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 /usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1 libthread.so.1 => /usr/lib/libthread.so.1 I have noticed that libintl.so.1 should be picked up from the Sybase client libs directory, but is linking from the system libs directory instead. Can't tell if this is related. I have tried this build both against client library vers 12.0 and 12.5 with identical results. Have noted similar bugs reported for previous versions of PHP. Setting LD_LIBRARY_PATH in the Apachectl script does not fix the problem. Reproduce code: --------------- #!/usr/bin/sh DSQUERY=fx_dbserver2_ds SYBASE=/dpkg/sybase/sybase12_5 SYBASE_OCS=OCS-12_5 LD_LIBRARY_PATH=$SYBASE/$SYBASE_OCS/lib:/usr/local/lib:$LD_LIBRARY_PATH PATH=$SYBASE/$SYBASE_OCS/bin:/usr/ccs/bin:/usr/local/bin:/usr/sbin:/usr/bin CPPFLAGS="-I$SYBASE/$SYBASE_OCS/include:/usr/local/include:/usr/include:/usr /dt/include:/usr/openwin/include:/usr/local/include/libxml2/libxml:/usr/loca l/include/libxml2/libxslt:/usr/local/include/libpng:/usr/local/BerkeleyDB.4. 2/include" LDFLAGS="-L$SYBASE/$SYBASE_OCS/lib:/usr/ccs/lib:/usr/local/lib:/usr/lib:/usr /dt/lib:/usr/openwin/lib:/usr/local/BerkeleyDB.4.2/lib: -R$SYBASE/$SYBASE_OCS/lib:/usr/ccs/lib:/usr/local/lib:/usr/lib:/usr/dt/lib:/ usr/openwin/lib:/usr/local/BerkeleyDB.4.2/lib" export DSQUERY SYBASE SYBASE_OCS LD_LIBRARY_PATH PATH CPPFLAGS LDFLAGS cd php-5.0.5 ./configure \ --prefix=/usr/local/php \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-sybase-ct=$SYBASE/$SYBASE_OCS \ --without-bz2 \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34904&edit=1