|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4988 Compile with OCI8 fails on .o files from syslibdist
Submitted: 2000-06-12 18:21 UTC Modified: 2006-07-17 08:46 UTC
From: david-shafer at uiowa dot edu Assigned:
Status: Closed Package: OCI8 related
PHP Version: 4.0.0 Release OS: AIX 4.3.3
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: david-shafer at uiowa dot edu
New email:
PHP Version: OS:


 [2000-06-12 18:21 UTC] david-shafer at uiowa dot edu
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

<       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`"
<       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`"
<   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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-14 18:01 UTC] dshafer at cvs dot php dot net
Changed bug type
 [2000-08-20 03:50 UTC]
Does this problem still persist with more recent version of php (from CVS or ??

 [2000-09-01 13:56 UTC]
This appears to be fixed in 4.0.2.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 13 20:01:31 2024 UTC