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

Fons Rademakers (Fons.Rademakers@cern.ch)
Tue, 30 Sep 1997 15:33:11 +0200


Hi Pasha,

in your example below the problem is that $LD_LIBRARY_PATH gets only
expanded when searching for the library. So what happens is that the
system will look for $LD_LIBRARY_PATH/yourlib.so and of course

/user/cdf:/bla/bla:/xxx/yyy/yourlib.so

does not exist. To make it work as you expect TEnv should already do
the variable expansion. I've modified the TEnv class to do just
that for variables surrounded by $(). So in the new version you can
do:

Unix*.Root.DynamicPath: : .:~/rootlibs:$(LD_LIBRARY_PATH)

to get the expected behaviour.

Cheers, Fons.

Pasha Murat wrote:
>
> Hi Fons,
>
> what's wrong the example below then(I defined Unix*.Root.DynamicPath to include
> LD_LIBRARY_PATH, however still am not able to load the library)?
>
> Thanks, Pasha
> --------------------------------------------------------------------------------
> /cdf/upgrade/tracking/murat/g3/test/evd>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* 0x7ffeef61)"/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] gEnv->Print()
> Unix.*.Root.MacroPath: : .:~/root_macros:$ROOTSYS/macros:$ROOTSYS/tutorials [User]
> Unix*.Root.DynamicPath: : .:~/rootlibs:$LD_LIBRARY_PATH [User]
> Root.Html.OutputDir: : /cdf/upgrade/tracking/murat/g3/test/linalg/Root/html [User]
> Root.Html.SourceDir: : .:$ROOTSYS/source [User]
> root [2] gSystem->Exec("ls -l /cdf/upgrade/tracking/murat/g3/test/lib/IRIX6/shared")
> total 5653
> -rw-r--r-- 1 murat cdfupg_d 144068 Sep 28 10:48 ACppcmodule.so
> -rw-r--r-- 1 murat cdfupg_d 259860 Sep 28 10:57 cotcmodule.so
> -rw-r--r-- 1 murat cdfupg_d 790872 Sep 28 11:42 libevd_s.so
> -rw-r--r-- 1 murat cdfupg_d 1157276 Sep 21 21:31 liblinalg.so
> -rw-r--r-- 1 murat cdfupg_d 222884 Sep 28 10:48 tryboscmodule.so
> -rw-r--r-- 1 murat cdfupg_d 317832 Sep 28 10:48 yboscmodule.so
> (Int_t)0
> root [3] gSystem->Load("liblinalg.so")
> (int)1
> --------------------------------------------------------------------------------

-- 
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