PHP 4.0 Bug #4988: Compile with OCI8 fails on .o files from syslibdist

From: Date: Mon, 12 Jun 2000 16:21:56 +0000
Subject: PHP 4.0 Bug #4988: Compile with OCI8 fails on .o files from syslibdist
Groups: php.dev 
Request: Send a blank email to php-dev+get-21122@lists.php.net to get a copy of this message
From: david-shafer@uiowa.edu Operating system: AIX 4.3.3 PHP version: 4.0.0 Release PHP Bug Type: Compile Failure Bug description: Compile with OCI8 fails on .o files from syslibdist Problem with proposed fix below: The file ext/oci8/config.m4 (version 1.18) assumes that all entries in $OCI8_DIR/lib/sysliblist and $OCI8_DIR/rdbms/lib/sysliblist begin with "-l", though this is not always the case. On an AIX 4.3.3 system running Oracle 8.0.5 (IBM C compiler 5.0), I have the following in sysliblist: $ cat $ORACLE_HOME/lib/sysliblist /lib/crt0_r.o -lc_r -lpthreads -lodm -lm The OCI8 config.m4 strips any existing "-l" flags, and then passes the bare filenames to AC_ADD_LIBRARY_WITH_PATH(). As a result, a library list such as the following is generated: -l/lib/crt0_r.o -lc_r -lpthread -lodm -lm This generates the following error upon compiling: ld: 0706-006 Cannot find or open library file: -l /lib/crt0_r.o ld:open(): A file or directory in the path name does not exist. I fixed the problem as follows: $ diff config.m4_1.18 config.m4_new 55c55,56 < OCI8_SYSLIB="cat $OCI8_DIR/lib/sysliblist | sed -e 's/-l//g'" --- > AC_ADD_LIBPATH("$OCI8_DIR/lib") > OCI8_SYSLIB="cat $OCI8_DIR/lib/sysliblist" 57c58,59 < OCI8_SYSLIB="cat $OCI8_DIR/rdbms/lib/sysliblist | sed -e 's/-l//g'" --- > AC_ADD_LIBPATH("$OCI8_DIR/rdbms/lib") > OCI8_SYSLIB="cat > $OCI8_DIR/rdbms/lib/sysliblist" 60,64c62 < if test -n "$OCI8_SYSLIB"; then < for oci8_slib in echo $OCI8_SYSLIB; do < AC_ADD_LIBRARY_WITH_PATH($oci8_slib, "", OCI8_SHARED_LIBADD) < done < fi --- > OCI8_SHARED_LIBADD="$OCI8_SHARED_LIBADD $OCI8_SYSLIB"

« previous php.dev (#21122) next »