Undefined symbol: OCIPGetErrorMessage issues (Oracle)

Ok, so I think that I have got some things rolling. Here is the questions though. When I tried to use the TSQLServer I got an error…

[code]
root [0] TSQLServer *myDB = TSQLServer::Connect(“oracle://devdb10.cern.ch”, “username”, “pw”);
dlopen error: /raiddata2/localpackages/instantclient/NULL/10.2/libocci.so.10.1: undefined symbol: OCIPGetErrorMessage
Load Error: Failed to load Dynamic link library /raiddata2/localpackages/root/Linux-2-4/v5_13_01/lib/libOracle.so
*** Interpreter error recovered ***
[\code]

I did some investigating and found that the method it is looking for is in the libclntsh.so.10.1 library. I then renamed it (well, symlinked) it to libclntsh.so and tried to load it in root. I then reran the above call and got much further.

[code]
root [1] gSystem.Load(“libclntsh”)
(int)0
[\code]

[code]
root [2] TSQLServer *myDB = TSQLServer::Connect(“oracle://devdb10.cern.ch”, “username”, “pw”);
Error in : class TOracleServer not found in plugin Oracle
[\code]

So the question is, why do I have to manually load the libclntsh library in order to us the Oracle stuff? Should the libocci lib not be linked against this?

Justace[/code]

The libOracle.so is prelinked in the following way

ldd lib/libOracle.so libclntsh.so.10.1 => /afs/cern.ch/sw/lcg/external/oracle/10.2.0.1/slc3_ia32_gcc323/lib/libclntsh.so.10.1 (0x006c6000) libocci.so.10.1 => /afs/cern.ch/sw/lcg/external/oracle/10.2.0.1/slc3_ia32_gcc323/lib/libocci.so.10.1 (0x00111000) libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x00540000) libm.so.6 => /lib/tls/libm.so.6 (0x00208000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0022a000) libc.so.6 => /lib/tls/libc.so.6 (0x00233000) libnnz10.so => /afs/cern.ch/sw/lcg/external/oracle/10.2.0.1/slc3_ia32_gcc323/lib/libnnz10.so (0x04b6e000) libdl.so.2 => /lib/libdl.so.2 (0x0036c000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0x0036f000) libnsl.so.1 => /lib/libnsl.so.1 (0x0037f000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x006b0000)

Because of the internal Oracle libs linking structure, you should load libOracle with, eg

gSystem->Load("libSQL"); gSystem->Load("/afs/cern.ch/sw/lcg/external/oracle/10.2.0.1/slc3_ia32_gcc323/lib/libclntsh"); gSystem->Load("libOracle");

Rene