I’m trying to load a library (written by me)
and I get this error
root  gSystem->Load("lib/libTOFMonitor.so");
dlopen error: /home/preghenella/SOFT/root/pro/lib/libGX11TTF.so: undefined symbol: _ZN3TTF11fgSmoothingE
Load Error: Failed to load Dynamic link library /home/preghenella/SOFT/root/pro/lib/libGX11TTF.so
Error in <TCint::AutoLoad>: failure loading library libGX11TTF.so for class TGX11TTF
*** Break *** segmentation violation
This running ROOT v5.16/00…
with ROOT v5.15/08 it doesn’t happen and the library loads correctly.
I tryed to load a ROOT library
and it works…
what could be wrong?
thank a lot
libGX11TTF depends on libGraf (TTF class).
try to link against (or to load) libGraf
however autoloading must wotk …
if I load first libGraf and then my library it works…
is there something I should do in order to avoid this?
August 27, 2007, 7:44am
just provide a libMyLib.rootmap file with as content:
Library.MyClass: libMyLib libGraf
This file provides the following information to ROOT:
it tells ROOT in which library MyClass lives, so when you type:
root  MyClass a
ROOT will load libMyLib
it tells ROOT on which libraries libMyLib depends, so ROOT will load
the dependent libs before libMyLib
If you do explicitly gSystem->Load(“libMyLib”) ROOT will read
the accompanying libMyLib.rootmap and first lod libGraf.
September 7, 2007, 2:51pm
I have been looking for the solution of this problem since a while, also asked here and unfortunately never got an answer but finally someone got the same problem
September 7, 2007, 3:18pm
the variant 1 works fine. If I type the “MyClass a” everything is loaded and works as it should but if I do only "gSystem->Load(“
libMyLib.so”) "it is still the same problem as before.
Of course I can load libGraf at startup and then libMylib but I am just interested in how this rootmap thing works and why the second variant is not working. The rootmap file is in the same directory as my library and the path to it is in LD_LIBRARY_PATH. Thanks!
September 7, 2007, 6:21pm
Which version are you using. Can you try the recently released 5.17.02. See also the example $ROOTSYS/test/Tetris.rootmap, do:
and you see the libGui and dependent have been loaded.
Should work the same for your own lib’s rootmap.