Linux and dymanic library.

Philippe Canal (pcanal@fndaub.fnal.gov)
Tue, 19 Oct 1999 14:45:47 -0500 (CDT)

Hi,

I have noticed that on some linux machine ( cdfpca.fnal.gov in particular).
Loading a shared library at run time using dlopen does not work properly.
Specifically, when a shared library contains unresolved symbol and thoses
unresolved symbols are defined in an other library that has been previously
loaded with dlopen, cdfpca fails (some other Linux succeed as they should!).

A synopsys example is:

val = RTLD_GLOBAL|RTLD_LAZY;
dlopen("./libOne.so",val);
dlopen("./libTwo.so",val);

libTwo.so calls a function that is defined in libOne.so. On cdfpca, this
code fails with:

./testing: error in loading shared libraries
./libTwo.so: undefined symbol: One__Fv

The complete test can be found at http://zoomphil.fnal.gov/shared.tar.gz
Just untar and do a make. You should get only warning at compile time
about unused variables) and no errors.

This is important because the ROOT team as decided to start relying even
more and loading library at compile time. It works nicely on all platform
BUT cdfpca. I am wondering how many linux installation contain this bug.

cdfpca has a uname of:

Linux cdfpca.fnal.gov 2.0.33 #2 Fri Mar 13 15:53:29 CST 1998 i686 unknown

I was able to run the test smoothly on a linux station like (I think it is
RedHat 6.0)

Linux pcroot2.cern.ch 2.2.10 #1 SMP Wed Jun 23 11:45:46 MEST 1999 i686 unknown

Do you know:

a) why cdfpca fails the test
b) how many Fermi linux box will also fail the test?

Thanks,

Philippe Canal, pcanal@fnal.gov, 630-840-2545.