Problem using ROOT on Snow Leopard: library already loaded

Hi,

I have just built ROOT 5.24.00 from source on Snow Leopard. The build runs fine and I can start up cint. However, if I open a TBrowser I get this:

root [1] TBrowser b
Note: File “/Users/gcowan/software/root/lib/libMathCore.so” already loaded
Note: File “/Users/gcowan/software/root/lib/libMathCore.so” already loaded
Note: File “/Users/gcowan/software/root/lib/libMathCore.so” already loaded
Note: File “/Users/gcowan/software/root/lib/libMathCore.so” already loaded
Note: File “/Users/gcowan/software/root/lib/libMathCore.so” already loaded
Note: File “/Users/gcowan/software/root/lib/libMathCore.so” already loaded
Note: File “/Users/gcowan/software/root/lib/libMathCore.so” already loaded

Here are the environment variables I’m using:

echo $ROOTSYS
/Users/gcowan/software/root

echo $PATH
/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/gcowan/software/root/bin:/usr/X11R6/bin

echo $LD_LIBRARY_PATH
:/Users/gcowan/software/root/lib

echo $DYLD_LIBRARY_PATH
:/Users/gcowan/software/root/lib

and my configure options were:

./configure --enable-roofit --enable-minuit2 --enable-soversion

In a (perhaps) related problem, I am writing an application that links against the ROOT libraries. The code compiles successfully but when I try to run the binary I immediately get:

dyld: Symbol not found: __ZTI14TFoamIntegrand
Referenced from: /Users/gcowan/software/root/lib/libRooFitCore.5.so
Expected in: flat namespace
in /Users/gcowan/software/root/lib/libRooFitCore.5.so
Trace/BPT trap

and then the application exits. Can anyone explain this? Here is the output of otool on the binary:

otool -L fitting
fitting:
@rpath/libCore.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libCint.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libRIO.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libNet.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libHist.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libGraf.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libGraf3d.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libGpad.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libTree.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libRint.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libPostscript.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libMatrix.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libPhysics.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libMathCore.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libThread.5.so (compatibility version 5.0.0, current version 5.24.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)
@rpath/libHtml.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libMinuit.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libRooFit.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libRooFitCore.5.so (compatibility version 5.0.0, current version 5.24.0)
@rpath/libMinuit2.5.so (compatibility version 5.0.0, current version 5.24.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)

Cheers,
Greig

Hi,

This was a problem (on all platforms) with the handling of ibraries whose name has a soversion in them (i.e. to work around the problem remove --enable-soversion).

This is fixed in the trunk by revision number 30551.

Cheers,
Philippe.

Hi Greig,
About Foam, you need to add -lFoam in your linking step. I had the same problem.

Cheers.

Hi Philippe, Stephane,

Thanks for your replies, everything’s working now!

Cheers,
Greig