Re: [PATCH] OCI8 link failure (Tru64/AIX) (#22324)
| From: | (Michael Mauch) | Date: | Tue, 11 Mar 2003 21:11:13 +0000 |
| Subject: | Re: [PATCH] OCI8 link failure (Tru64/AIX) (#22324) | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-95015@lists.php.net to get a copy of this message | ||
Jani Taskinen <sniper@iki.fi> 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.