undefined symbol: _ZN3TTF11fgSmoothingE

dear all,
I’m trying to load a library (written by me)

and I get this error

root [0] gSystem->Load("lib/");
dlopen error: /home/preghenella/SOFT/root/pro/lib/ undefined symbol: _ZN3TTF11fgSmoothingE
Load Error: Failed to load Dynamic link library /home/preghenella/SOFT/root/pro/lib/
Error in <TCint::AutoLoad>: failure loading library 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?

Hi Roberto,

just provide a libMyLib.rootmap file with as content:

Library.MyClass: libMyLib libGraf

This file provides the following information to ROOT:

  1. it tells ROOT in which library MyClass lives, so when you type:

    root [2] MyClass a

    ROOT will load libMyLib

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

Cheers, Fons.

thanks a lot.



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 :slight_smile: Thanks,


However Fons…

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(“”) "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!

Cheers Daniel

Which version are you using. Can you try the recently released 5.17.02. See also the example $ROOTSYS/test/Tetris.rootmap, do:

make Tetris
and you see the libGui and dependent have been loaded.

Should work the same for your own lib’s rootmap.

Cheers, Fons.