Re: Hello world program loads unused Oracle SO libraries



On Wed, 01 Nov 2006 13:40:43 +0100, herbert koelman wrote:


I've written the classic hello.c (the one that says hello world).

I used a makefile that builds programs to run against Oracle using OCCI.
So make runs this command:
cc -I /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/
-g -D_REENTRANT -I
/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/ -g
-D_REENTRANT -L /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib
-L /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib -locci
-lclntsh -lpthread hello.c -o hello

This produced the hello program.

So far still good. Now I run the program and obtains:
[herbert@pc-bureau src]$ ./hello herbert
./hello: error while loading shared libraries: libocci.so.10.1: cannot
open shared object file: No such file or directory

I don't understand why would the program try to load a library it is not
using !!??

.... because you linked agained libocci ( -locci in your compile flags).
Obviously for just a hello world program, you wouldn't need to link
against these
.



Relevant Pages

  • Memory leak in DBD::Oracle 1.14 ... ?
    ... could not decode oracle version from ... t/cursor.....oracle: error while loading shared libraries: libodm9.so: cannot open shared object file: No such file or directory ... Unable to connect to Oracle as scott/tiger (ORA-12547: TNS:lost contact (DBD ERROR: OCIServerAttach)) ...
    (perl.dbi.users)
  • Re: Sudden lost GUI on bootup
    ... shared object file: ... Any library thieves been around in your neighborhood? ... Now start the command line version of YAST with the command "yast". ... Interesse an einer linken Mailingliste? ...
    (alt.os.linux.suse)
  • Re: [opensuse] Google Earth busted - 12.2
    ... from the command line, I get the error: ... open shared object file: ... That library is apparently installed as part of Mesa-libGL1, ...
    (SuSE)
  • pp syntax issue?
    ... I am running the following command to make the archive (Fedora Core 3) ... for module Net::Pcap: libpcap.so.0.8.3: cannot open shared object file: ...
    (comp.lang.perl.misc)
  • Re: error while loading shared libraries: libstdc++.so.5
    ... I installed an application, gmfsk, deb, which ... open shared object file: ... Please enter this command and show us its output: ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)