Attached is patch for ext/oci8/config.m4, please try it out. --Jani
On Tue, 11 Mar 2003, Michael Mauch wrote: >Jani Taskinen <[EMAIL PROTECTED]> wrote: >> >> I still don't think we should be linking with libocijdbc8 in any case. >> Can you ask some Oracle support why their libs differ with same version >> but in different OSes?? > >I can try to do so [1], although I don't see what that will buy us. > >>From "Oracle9i Administrator's Reference" ><http://download-east.oracle.com/docs/html/A97297_01/ch4_comp.htm#i26133>, >chapter 4, "Using Oracle Precompilers and the Oracle Call Interface": > >| Custom Make Files >| >| Oracle Corporation recommends that you use the provided demo_product.mk >| make files to create user programs as described in the specific product >| sections of this chapter. >| [...] >| If you choose to use a make utility such as nmake or GNU make, be aware >| of how macro and suffix processing differs from the make utility >| provided with the platform. Oracle make files are tested and are >| supported with the make utility for your platform. > >The "demo_product.mk" is in reality called demo_rdbms.mk - and of course >it's virtually undocumented. > >| Oracle library names and the contents of Oracle libraries are subject to >| change between releases. Always use the demo_product.mk make file that >| ships with the current release as a guide to determine the required >| libraries. > >Then they go on to explain their "symfind" utility, which is a shell >script around "find", "grep" and "nm" - with platform-specific output [2]. > >| Correcting Undefined Symbols (Solaris Only) >| >| Oracle provides the symfind utility to assist you in locating a library >| or object file where a symbol is defined. When linking a program, >| undefined symbols are a common error that produce an error message >| similar to the following: > >IMHO this is totally unacceptable. If they can't provide a well-defined >set of interface libraries, they should at least offer some kind of >"oci-config" or a few text files with -lsomelib -lanotherlib lines. > >But no matter how hard we wish they had some such thing, they don't have >it at the moment - and even if they would suddenly start to clean up >that whole mess, it would probably take a long time until their patches >would be installed everywhere. > >I still think that the best solution would be to check if linking with >-lcntsh alone is enough to get OCILobIsTemporary, and if not, check if >it works with -locijdbc8. > >Regards... > Michael > >[1]: My question in the "Oracle Technology Network" forum has not been >answered for two weeks now, ditto in comp.databases.oracle.misc. > >[2]: Symfind (or nm) finds the OCILobIsTemporary definition (T) not only >in libocijdbc8.so, but also in libclntsh.so and a few other libs: > >OCILobIsTemporary | 0000000000000000 | U | 0000000000000008 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ./lib/libsql8.a >OCILobIsTemporary | 0004396969863776 | T | 0000000000000008 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ./lib/libnjni8.so >OCILobIsTemporary | 0000000000005408 | T | 0000000000000008 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ./lib/libclient8.a >OCILobIsTemporary | 0000000000005408 | T | 0000000000000008 >OCILobIsTemporary | 0000000000000000 | U | 0000000000000008 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ./lib/libclntst8.a >OCILobIsTemporary | 0004396969227952 | T | 0000000000000008 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ./lib/libocijdbc8.so >OCILobIsTemporary | 0004396962545744 | T | 0000000000000008 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ./lib/libocijdbc8_g.so >OCILobIsTemporary | 0000000000000000 | U | 0000000000000008 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ./lib/libsqlplus.a >OCILobIsTemporary | 0000000000000000 | U | 0000000000000008 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ./lib/libordim8.a >OCILobIsTemporary | 0004396966909952 | T | 0000000000000008 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ./lib/libclntsh.so > >This is on the Compaq/HP test drive with Tru64 5.1 and Oracle 8.1.7. > > -- <- For Sale! ->
Index: config.m4 =================================================================== RCS file: /repository/php4/ext/oci8/config.m4,v retrieving revision 1.37.2.3 diff -u -r1.37.2.3 config.m4 --- config.m4 25 Feb 2003 04:37:08 -0000 1.37.2.3 +++ config.m4 23 Mar 2003 01:17:41 -0000 @@ -88,14 +88,7 @@ 8.1) PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD) - -dnl This breaks build on some systems (AIX at least). -dnl if test -f $OCI8_DIR/lib/libocijdbc8.so ; then -dnl PHP_ADD_LIBRARY(ocijdbc8, 1, OCI8_SHARED_LIBADD) -dnl fi - PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD) - AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ]) AC_DEFINE(HAVE_OCI8_SHARED_MODE,1,[ ]) dnl @@ -106,14 +99,7 @@ 9.0) PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD) - -dnl This breaks build on some systems (AIX at least) -dnl if test -f $OCI8_DIR/lib/libocijdbc8.so ; then -dnl PHP_ADD_LIBRARY(ocijdbc8, 1, OCI8_SHARED_LIBADD) -dnl fi - PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD) - AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ]) AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ]) AC_DEFINE(HAVE_OCI8_SHARED_MODE,1,[ ]) AC_DEFINE(HAVE_OCI9,1,[ ]) @@ -123,6 +109,25 @@ AC_MSG_ERROR(Unsupported Oracle version!) ;; esac + + dnl + dnl Check if we need to add -locijdbc8 + dnl + PHP_CHECK_LIBRARY(clntsh, OCILobIsTemporary, + [ + AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ]) + ], [ + unset ac_cv_func_ocilobistemporary + PHP_CHECK_LIBRARY(ocijdbc8, OCILobIsTemporary, + [ + PHP_ADD_LIBRARY(ocijdbc8, 1, OCI8_SHARED_LIBADD) + AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ]) + ], [], [ + $OCI8_SHARED_LIBADD + ]) + ], [ + $OCI8_SHARED_LIBADD + ]) PHP_NEW_EXTENSION(oci8, oci8.c, $ext_shared) AC_DEFINE(HAVE_OCI8,1,[ ])
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php