Oracle support

Hello,
is the Oracle still supported by root? The links to library sources on the GSI webpage are not active anymore. How can I get Oracle.so for root 5.16?
Cheers, Mariusz

Hi, Mariusz

ROOT sources includes full-functional implementation of TSQLServer class. It is not compiled by default - in most cases you should install InstantClient from Oracle first and than configure and compile ROOT appropriately. See some tips in documentation for TOracleServer class:
http://root.cern.ch/root/html/TOracleServer.html

Regards,
Sergey

P.S. Most probably, in CERN it is compiled per defualt (check in $ROOTSYS/lib/libOracle.so). If it is there, just try

sql = TSQLServer::Connect("oracle://server/db-name","user","pass");

Of course, correct server, db-name, user and pass should be specified.

[quote=“linev”]Hi, Mariusz
ROOT sources includes full-functional implementation of TSQLServer class. It is not compiled by default - in most cases you should install InstantClient from Oracle first and than configure and compile ROOT appropriately. See some tips in documentation for TOracleServer class:
http://root.cern.ch/root/html/TOracleServer.html

Regards,
Sergey

P.S. Most probably, in CERN it is compiled per defualt (check in $ROOTSYS/lib/libOracle.so). If it is there, just try

sql = TSQLServer::Connect("oracle://server/db-name","user","pass");

Of course, correct server, db-name, user and pass should be specified.[/quote]

Thanks Sergey,

I have compiled root 5.16 with:
./configure --enable-oracle --with-oracle-libdir=/usr/lib/oracleClient --with-oracle-incdir=/usr/include/oracle/11.1.0.1/client/

now when I do ldd /cern/root/lib/libOracle.so
I get:
linux-gate.so.1 => (0x00110000)
libclntsh.so.11.1 => /usr/lib/oracleClient/libclntsh.so.11.1 (0x00670000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00139000)
libm.so.6 => /lib/libm.so.6 (0x00224000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0024d000)
libc.so.6 => /lib/libc.so.6 (0x00259000)
libnnz11.so => /usr/lib/oracleClient/libnnz11.so (0x003b2000)
libdl.so.2 => /lib/libdl.so.2 (0x0055c000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00561000)
libnsl.so.1 => /lib/libnsl.so.1 (0x0057a000)
libaio.so.1 => /usr/lib/libaio.so.1 (0x00593000)
/lib/ld-linux.so.2 (0x00653000)

there is no link to libocci.so, which is strange, isn’t it?
When I do:
TSQLServer* sql = TSQLServer::Connect(MTFServer,MTFUser,MTFPasswd);

I get:
dlopen error: /cern/root/lib/libOracle.so: undefined symbol: _ZTIN6oracle4occi12SQLExceptionE

what to do with it?

Mariusz

Hi, Mariusz

It is strange, that libocci is not linked with libOracle.
Can you check following:
[ul]

  1. Is it exists in your /usr/lib/oracleClient directory?
  2. Can you send output of configure script?
  3. Do you correctly configure your LD_LIBRARY_PATH variable?
    [/ul]

Regards, Sergey

[quote=“linev”]Hi, Mariusz

It is strange, that libocci is not linked with libOracle.
Can you check following:
[ul]

  1. Is it exists in your /usr/lib/oracleClient directory?
  2. Can you send output of configure script?
  3. Do you correctly configure your LD_LIBRARY_PATH variable?
    [/ul]

Regards, Sergey[/quote]

Hi Sergei,

ad1. yes, it does
ad2.
Configuring for linux
Checking for libX11 … /usr/lib
Checking for X11/Xlib.h … /usr/include
Checking for X11/Xft/Xft.h … /usr/include
Checking for libXpm … /usr/lib
Checking for libXft … /usr/lib
Checking whether to build included libfreetype6 … yes
Checking whether to build included libpcre … yes
Checking whether to build included zlib … yes
Checking for GL/gl.h … /usr/include
Checking for libGL, or libMesaGL … /usr/lib
Checking for libGLU, or libMesaGLU … /usr/lib
Checking for mysql_config … /usr/bin/mysql_config
Checking for libmysqlclient version >= 3.23.* … ok
Checking for occi.h … /usr/include/oracle/11.1.0.1/client/
Checking for libclntsh, or oci … no
Checking for libocci, or oraocci10 … no
Checking for libpq-fe.h … no
Checking for libpq … no
Checking for sql.h … no
Checking for libsqlod … no
Checking for sqlext.h … no
Checking for libiodbc, libodbc, or odbc32 … no
Checking for rfio_api.h … no
Checking for librfio, libshift, shiftmd, or shift … no
Checking for rfio_api.h … no
Checking for stager_api.h … no
Checking for libshift, shiftmd, or shift … no
Checking for gfal_api.h … no
Checking for libgfal … no
Checking for G4Navigator.hh … no
Checking for libG4navigation … no
Checking for CLHEP/Vector/Rotation.h … no
Checking for ApMon.h … no
Checking for libapmoncpp … no
Checking for monalisawsclient.h … no
Checking for libmonalisawsclient … no
Checking for fftw3.h … no
Checking for libfftw3, or libfftw3-3 … no
Checking for libpacklib_noshift, libpacklib, packmd, or packlib … no
Checking for libkernlib_noshift, libkernlib, kernmd, or kernlib … no
Checking for libPythia6 … no
Checking for dcap.h … no
Checking for libdcap … no
Checking for chirp_client.h … no
Checking for libchirp_client … no
Checking for gapiUI.h … no
Checking for libgapiUI … no
Checking for jpeglib.h … /usr/include
Checking for png.h … /usr/include
Checking for tiffio.h … /usr/include
Checking for gif_lib.h … /usr/include
Checking for libjpeg … /usr/lib
Checking for libtiff … /usr/lib
Checking for libungif … /usr/lib
Checking for libz … /usr/lib
Checking for libpng … /usr/lib
Checking whether to build included libAfterImage … yes
Checking for ldap.h … /usr/include
Checking for libldap … /usr/lib
Checking for liblber … /usr/lib
Checking for python/Python.h, python2.5/Python.h, python2.4/Python.h, python2.3/Python.h, python2.2/Python.h, or Python.h … /usr/include
Checking for libpython, libpython2.5, libpython2.4, libpython2.3, libpython2.2, python25, python24, python23, or Python … /usr/lib
Checking for xml2-config … /usr/bin/xml2-config
Checking for libxml2 version >= 2.4.x … ok
Checking whether to build xrootd … yes
Checking for libssl … /usr/lib
Checking for libcrypto … /usr/lib
Checking for openssl/bio.h … /usr/include
Checking for openssl/blowfish.h … /usr/include
Checking for openssl/err.h … /usr/include
Checking for openssl/pem.h … /usr/include
Checking for openssl/rand.h … /usr/include
Checking for openssl/rsa.h … /usr/include
Checking for t_server.h … no
Checking for libsrp … no
Checking for libgmp … /usr/lib
Checking for libmisc … no
Checking for pwauth.h … no
Checking for krb5.h … /usr/include
Checking for libk5crypto … /usr/lib
Checking whether we’re using MIT Kerberos … yes
Checking for libkrb5 … /usr/lib
Checking for libcrypto … /usr/lib
Checking for kinit … /usr/kerberos/bin/kinit
Checking for libcom_err … /usr/lib
Checking for shadow passwords … yes
Checking for gsl/gsl_version.h … no
Checking for gsl-config … not found
Checking whether to build libMathMore … no
Checking whether to build libMathCore … yes
Checking whether to build CINT7 … no
Checking whether to build libCintex … yes
Checking whether to build libReflex … yes
Checking whether to build libRooFit … no
Checking whether to build libMinuit2 … no
Checking whether to build libUnuran … no
Checking whether to build libGdml … no
Checking whether to build libTable … no
Checking for Clarens support … no
Checking for PEAC support … no
Generating cint dictionaries.
Checking whether setresuid declared in /usr/include/unistd.h … yes
Writing config/Makefile.config … done
Writing include/RConfigure.h … done
Writing bin/root-config … done
Writing etc/system.rootrc … done
Writing etc/system.rootauthrc … done
Writing etc/system.rootdaemonrc … done
Writing etc/root.mimes … done
Writing etc/daemons/rootd.rc.d … done
Writing etc/daemons/rootd.xinetd … done
Writing etc/daemons/proofd.rc.d … done
Writing etc/daemons/proofd.xinetd … done
Writing etc/daemons/xrootd.rc.d … done
Writing etc/daemons/olbd.rc.d … done
Writing bin/memprobe … done
Writing build/misc/root-help.el … done
Writing macros/html.C … done
Writing bin/thisroot.sh … done
Writing bin/thisroot.csh … done
Writing config.status … done

Enabled support for asimage, astiff, builtin_afterimage, builtin_freetype, builtin_pcre, builtin_zlib, cintex, exceptions, krb5, ldap, mathcore, mysql, opengl, pch, python, reflex, shadowpw, shared, ssl, xft, xml, xrootd.

ad.3
echo $LD_LIBRARY_PATH
/lib:/cern/root/lib:/usr/lib:/usr/local/lib::/opt/mono-1.2/lib:/usr/lib/oracleClient:/usr/lib/mysql

Thank you!

Mariusz

I see in configure script there is a check for “libocci oraocci10” and I have downloaded client version 11… maybe this is the problem?

Mariusz

Hi, Mariusz

Yes, this is your problem. If you look in configure output, you will see that both oracle libraries are not detected correctly:

Up to now only InstantClient 10 was tested and, as you have found, ROOT explicitly uses version 10 libraries. For now it is better for you to use this version of InstantClient. I will investigate if one can use version 11.

Thanks for reporting problem,
Sergey

Hi, Mariusz

I’ve checked Instant Client Version 11.1.0.6.0 with ROOT. There is no problem to compile ROOT sources, but to use libOracle, you should create symbolic links for both Oracle libraries:

ln -s libclntsh.so.11.1 libclntsh.so
ln -s libocci.so.11.1 libocci.so

On my machine (Debian Sarge) I also should install additional library - libaio.
It is easy to find appropriate package for your system.

Regards,
Sergey

OK, I’ve found the problem. It was trivial… when recompiling root, even after using ./configure with different options, the libOracle was not touch! I had to remove this library and compile root again. Sounds trivial but I write anyway, maybe it will save somebody’s time.
Thank you again Sergey!
Mariusz