I am trying to configure ROOT in order to access a Oracle DB.
I am running OS X 10.10.3, ROOT 6.04.16.
Here below the steps I followed:
-) Downloaded ORACLE Instant Client (basic, sdk, sqlplus, JDBC)
-) Soft links between libraries (i.e. libocci.dylib -> libocci.dylib.11.1 )
-) Added the path to .profile
export DYLD_LIBRARY_PATH=/Users/edo/Documents/Oracle_instantclient_11_2/:$DYLD_LIBRARY_PATH
-) Configured ROOT as follows:
I obtain the following output (which seems promising):
-- Looking for MySQL
-- Found MYSQL: /usr/local/mysql/include
-- Looking for Oracle
-- Found sqlplus version: 11.2.0.3.0
-- Guessed ORACLE_OCI_VERSION value: 11G
-- Found Oracle: /Users/edo/Documents/Oracle_instantclient_11_2/libocci.dylib;/Users/edo/Documents/Oracle_instantclient_11_2/libclntsh.dylib;/Users/edo/Documents/Oracle_instantclient_11_2/libnnz10.dylib
-) I compile and I get the following error:
It seems that it can’t link against the libraries.
Am I missing something?
I tried the same on SLC6, no problem has occurred.
Any suggestion is more than welcome.
Hi Edoardo, I think the problem is that Oracle has build the libraries (occi) not using libc++ but libstdc++. By default ROOT builds using libc++ on MacOSX.
Hi Edoardo. I have tried a more specific workaround and add -stdlib=libstdc++ only for the oracle plugin but I run into problems compiling c++11 classes like . So far I have no solution.
My apologies if I resume this topic.
As far as I understand, it is not possible at the moment to link against ROOT and Oracle libraries at the same time on my OS X system.
I made a very simple stand-alone program, linking only against Oracle libocci library and everything works.
As soon as I link against ROOT I obtain segmentation faults and, running gdb, I get the following message:
[code]Starting program: /Users/edo/Downloads/instantclient_11_2-4/a.out
dyld: Library not loaded: /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1
Referenced from: /Users/edo/Downloads/instantclient_11_2-4/a.out
Reason: image not found
Program received signal SIGTRAP, Trace/breakpoint trap.[/code]
Sorry, I am not very experienced in this kind of problems. Is this due to the different libraries used at the compilation stage? Is there a way to compile the Oracle libraries differently?
You need to set the DYLD_LIBRARY_PATH to the installation of the oracle instant client libraries. The location where libclntsh.dylib.11.1 is found.
Pere
Unfortunately I have set DYLD_LIBRARY_PATH already.
If I don’t add ROOT classes to my code everything runs smoothly and I can connect to Oracle w/o problems.
/Users/edo/Downloads/instantclient_11_2-4/a.out:
/ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1 (compatibility version 0.0.0, current version 0.0.0)
/ade/b/3071542110/oracle/rdbms/lib/libocci.dylib.11.1 (compatibility version 0.0.0, current version 0.0.0) @rpath/libGui.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libCore.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libRIO.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libNet.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libHist.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libGraf.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libGraf3d.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libGpad.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libTree.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libRint.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libPostscript.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libMatrix.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libPhysics.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libMathCore.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libThread.so (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0) @rpath/libGeom.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libMinuit.so (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)[/code]