On Mon, Nov 22, 2010 at 4:08 PM, John R Pierce <pie...@hogranch.com> wrote: > On 11/22/10 11:58 AM, E R wrote: >> >> Hi, >> >> I have two DBD/Oracle/Oracle.so shared libraries. In one case ldd >> reports that libocci is linked in, and in another case libocci doesn't >> show up. > > wild guess says one was linked statically (eg, libocci.a rather than > libocci.so). static linking embeds a copy of the lib in the module so its > not externally referenced. good in that you don't have to worry about the > lib path, bad in that if the lib is updated your module won't see the new > one, good in that if those updates break something, it won't effect you.
Here is the ldd from the one which includes libocci.so: linux-gate.so.1 => (0x00ae5000) libocci.so.10.1 => /usr/lib/oracle/10.2.0.4/client/lib/libocci.so.10.1 (0x00110000) libclntsh.so.10.1 => /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so.10.1 (0x00ae6000) libpthread.so.0 => /lib/libpthread.so.0 (0x00625000) libc.so.6 => /lib/libc.so.6 (0x0026f000) libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x003b5000) libm.so.6 => /lib/libm.so.6 (0x00207000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x009c7000) libnnz10.so => /usr/lib/oracle/10.2.0.4/client/lib/libnnz10.so (0x00672000) libdl.so.2 => /lib/libdl.so.2 (0x0022e000) libnsl.so.1 => /lib/libnsl.so.1 (0x00232000) /lib/ld-linux.so.2 (0x00253000) Here is the ldd from one that doesn't: linux-gate.so.1 => (0x00740000) libclntsh.so.10.1 => /.../oracle/libclntsh.so.10.1 (0x00741000) libc.so.6 => /lib/libc.so.6 (0x0026f000) libnnz10.so => /.../oracle/libnnz10.so (0x003b5000) libdl.so.2 => /lib/libdl.so.2 (0x00110000) libm.so.6 => /lib/libm.so.6 (0x00114000) libpthread.so.0 => /lib/libpthread.so.0 (0x0017d000) libnsl.so.1 => /lib/libnsl.so.1 (0x00195000) /lib/ld-linux.so.2 (0x00253000) The directory /.../oracle is where a copy of the instantclient libraries are located. The files there compare byte-for-byte with the files in /usr/lib/oracle/10.2.0.4/client/lib. In the first case, how did the c++ library get brought into the picture???