|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-11-28 21:37 UTC] cjbj at hotmail dot com
Description: ------------ Configure fails without finding the Oracle Instant Client headers. See http://forums.oracle.com/forums/thread.jspa?threadID=343352 for a user occurrence of this problem on Mac OSX: ./configure --with-pdo-oci=instantclient,/usr/local/oracle/instantclient10_1/,10.1.0.3 Error: checking for oci.h... configure: error: I'm too dumb to figure out where the include dir is in your instant client install An Instant Client install from the ZIPs puts the libs in instantclient10_1 or instantclient_10_2 and the headers in instantclient10_1/sdk/include or instantclient_10_2/sdk/include. (For an Instant Client RPM install, the oracle libs will be in /usr/lib and the headers will be in /usr/include, e.g. /usr/include/oracle/10.2.0.1/client/oci.h) Here's a temporary patch. It has been tested only with 10.2 ZIP install on Linux. --- config.m4.orig 2005-09-25 10:30:44.000000000 +1000 +++ config.m4 2005-11-29 13:08:29.287748520 +1100 @@ -61,10 +61,19 @@ elif test -f $PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include/oci.h ; then PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include) AC_MSG_RESULT($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include) + elif test -f $PDO_OCI_IC_PREFIX/sdk/include/oci.h ; then + PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/sdk/include) + AC_MSG_RESULT($PDO_OCI_IC_PREFIX/sdk/include) else AC_MSG_ERROR([I'm too dumb to figure out where the include dir is in your instant client install]) fi - PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib" + if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib/libclntsh.so"; then + PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib" + elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.so"; then + PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX" + else + AC_MSG_ERROR([I'm too dumb to figure out where the libraries are in your instant client install]) + fi PDO_OCI_VERSION="`echo $PDO_OCI_IC_VERS | cut -d. -f1-2`" else if test -d "$PDO_OCI_DIR/rdbms/public"; then After applying this patch, remove "configure" and autom4te.cache, and then run buildconf PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 01:00:01 2025 UTC |
This patch doesn't completely fix building with pdo-oci on Mac OS X: checking for oci.h... ./instantclient10_1/sdk/include configure: error: I'm too dumb to figure out where the libraries are in your instant client install It does fix the problem with finding the oci.h file, but it then check for a libclntsh.so file, which is not included in the Mac OS X InstantClient ZIP file. The test -f should use "libclntsh.$SHLIB_SUFFIX_NAME", not "libclntsh.so". I also had to: ln -s libclntsh.dylib.10.1 libclntsh.dylib but I don't think that's related. Without this last symlink, I was getting this error: checking Oracle Instant Client version... configure: error: Link from ./instantclient10_1/libclntsh.dylib to libclntsh.dylib.10.1 not found Finally, after those two errors were fixed, I was getting: checking for oci.h... ./instantclient10_1/sdk/include configure: error: Unsupported Oracle version! It seems the configure scripts tries to use directory names to guess the version of Oracle when using InstantClient. For Mac OS X, it should try to guess it using the filename of libclntsh.$SHLIB_SUFFIX_NAME.10.1 Here's a patch tested with Mac OS X 10.4 and InstantClient 10.1 (ZIP files). *** ext/pdo_oci/config.m4.orig Wed Feb 15 21:03:13 2006 --- ext/pdo_oci/config.m4 Sat Sep 9 11:27:59 2006 *************** *** 96,111 **** else AC_MSG_ERROR([I'm too dumb to figure out where the include dir is in your instant client install]) fi ! if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib/libclntsh.so" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib" ! elif test -f "$PDO_OCI_IC_PREFIX/client/lib/libclntsh.so" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/client/lib" ! elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.so" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX" else AC_MSG_ERROR([I'm too dumb to figure out where the libraries are in your instant client install]) fi - PDO_OCI_VERSION="`echo $PDO_OCI_IC_VERS | cut -d. -f1-2`" else if test -d "$PDO_OCI_DIR/rdbms/public"; then PHP_ADD_INCLUDE($PDO_OCI_DIR/rdbms/public) --- 96,120 ---- else AC_MSG_ERROR([I'm too dumb to figure out where the include dir is in your instant client install]) fi ! PDO_OCI_VERSION="`echo $PDO_OCI_IC_VERS | cut -d. -f1-2`" ! if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib" ! elif test -f "$PDO_OCI_IC_PREFIX/client/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/client/lib" ! elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.$SHLIB_SUFFIX_NAME" ; then PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX" + if test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then + PDO_OCI_VERSION=10.1 + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then + PDO_OCI_VERSION=9.0 + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.8.0; then + PDO_OCI_VERSION=8.1 + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.1.0; then + PDO_OCI_VERSION=8.0 + fi else AC_MSG_ERROR([I'm too dumb to figure out where the libraries are in your instant client install]) fi else if test -d "$PDO_OCI_DIR/rdbms/public"; then PHP_ADD_INCLUDE($PDO_OCI_DIR/rdbms/public)