Re: TSystem::Load doesn't process LD_LIBRARY_PATH (IRIX)

Fons Rademakers ((no email))
Sun, 28 Sep 1997 19:38:16 +0200 (METDST)


Hi Pasha,

you can set the library search path for your root app in your
.rootrc file:

Unix.*.Root.DynamicPath: .:~/rootlibs:$ROOTSYS/lib

I could add the LD_LIBRARY_PATH to it, but LD_LIBRARY_PATH is
not portable. AIX uses LIBPATH and HP-UX uses SHLIB_PATH.

I think with Root.DynamicPath you have more specific control.
However, if you really insist I can add LD_LIBRARY_PATH
to the Root.DynamicPath string.

Cheers, Fons.

>
> the problem is named in the subject - TSystem::Load doesn't scan LD_LIBRARY_PATH.
> Find the confirmation below - observed on SGI IRIX 6.2 with gcc-compiled ROOT.
> It is true that ROOT documentation doesn't specify if TSystem::Load is supposed
> to scan directories in LD_LIBRARY_PATH (or LIBPATH on AIX), however it would be
> a very helpful feature.
>
> Regards, Pasha.
> --------------------------------------------------------------------------------
> /cdf/upgrade/tracking/murat/g3/test>root
> No default font loaded
> *******************************************
> * *
> * W E L C O M E to R O O T *
> * *
> * Version 1.03/03 12 September 1997 *
> * Development version *
> * *
> * You are welcome to visit our Web site *
> * http://root.cern.ch *
> * *
> *******************************************
>
> CINT/ROOT C/C++ Interpreter version 5.13.24, Aug 24 1997
> Type ? for help. Commands must be C++ statements.
> Enclose multiple statements between { }.
> root [0] gSystem->Getenv("LD_LIBRARY_PATH")
> (char* 0x7ffeef5d)"/cdf/upgrade/root/v0_00/lib:/spool2/gnu/tcl/v8_0a2/lib:/spool2/gnu/tk/v8_0a2/lib:/spool2/gnu/python/Python-1.4/lib/python1.4/sharedmodules:/cdf/upgrade/tracking/murat/g3/test/lib/IRIX6/shared"
> root [1] gSystem->Exec("ls -l /cdf/upgrade/tracking/murat/g3/test/lib/IRIX6/shared")
> total 4025
> -rw-r--r-- 1 murat cdfupg_d 144068 Sep 27 20:55 ACppcmodule.so
> -rw-r--r-- 1 murat cdfupg_d 217444 Sep 27 20:55 cotcmodule.so
> -rw-r--r-- 1 murat cdfupg_d 1157276 Sep 21 21:31 liblinalg.so
> -rw-r--r-- 1 murat cdfupg_d 222884 Sep 27 20:55 tryboscmodule.so
> -rw-r--r-- 1 murat cdfupg_d 317832 Sep 27 23:39 yboscmodule.so
> (Int_t)0
> root [2] gSystem->Load("liblinalg.so")
> (int)1
> root [3] gSystem->Load("/cdf/upgrade/tracking/murat/g3/test/lib/IRIX6/shared/liblinalg.so")
> (int)0
> --------------------------------------------------------------------------------
>

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland          Phone: +41 22 7679248
E-Mail: Fons.Rademakers@cern.ch              Fax:   +41 22 7677910