Warning in <TClassTable::Add>

Hi everyone, I hope this is the right category for this topic.
I’ve recently installed ROOT v6.16/00 on Ubuntu v18.04, running on my Windows 10 WSL with Xming; I got ROOT by downloading the binary, not by building it.
I added the script “thisroot.sh” to my “.profile” file.
Everything works fine, ROOT is executed without errors from any directory and I can run my macros on it.
The problem occours when I try to include ROOT as C++ class: I can compile my program (g++), but when I run it I get a list of warnings which I report here; please note that the program still works fine after the list of warnings.
Any suggestion would be appreciated, thank you! :slight_smile:

list:

Warning in TClassTable::Add: class TFileMerger already in TClassTable
Warning in TClassTable::Add: class TDirectoryFile already in TClassTable
Warning in TClassTable::Add: class TFile already in TClassTable
Warning in TClassTable::Add: class TMemFile already in TClassTable
Warning in TClassTable::Add: class ROOT::Experimental::TBufferMerger already in TClassTable
Warning in TClassTable::Add: class ROOT::Experimental::TBufferMergerFile already in TClassTable
Warning in TClassTable::Add: class TArchiveFile already in TClassTable
Warning in TClassTable::Add: class TArchiveMember already in TClassTable
Warning in TClassTable::Add: class TBufferIO already in TClassTable
Warning in TClassTable::Add: class TBufferFile already in TClassTable
Warning in TClassTable::Add: class TBufferText already in TClassTable
Warning in TClassTable::Add: class TBufferJSON already in TClassTable
Warning in TClassTable::Add: class TGenCollectionProxy already in TClassTable
Warning in TClassTable::Add: class TGenCollectionProxy::Value already in TClassTable
Warning in TClassTable::Add: class TGenCollectionProxy::Method already in TClassTable
Warning in TClassTable::Add: class TCollectionProxyFactory already in TClassTable
Warning in TClassTable::Add: class TCollectionStreamer already in TClassTable
Warning in TClassTable::Add: class TCollectionClassStreamer already in TClassTable
Warning in TClassTable::Add: class TCollectionMemberStreamer already in TClassTable
Warning in TClassTable::Add: class TEmulatedCollectionProxy already in TClassTable
Warning in TClassTable::Add: class TEmulatedMapProxy already in TClassTable
Warning in TClassTable::Add: class TFileCacheRead already in TClassTable
Warning in TClassTable::Add: class TFree already in TClassTable
Warning in TClassTable::Add: class TFileCacheWrite already in TClassTable
Warning in TClassTable::Add: class TFPBlock already in TClassTable
Warning in TClassTable::Add: class TFilePrefetch already in TClassTable
Warning in TClassTable::Add: class TKey already in TClassTable
Warning in TClassTable::Add: class TKeyMapFile already in TClassTable
Warning in TClassTable::Add: class TLockFile already in TClassTable
Warning in TClassTable::Add: class TMapFile already in TClassTable
Warning in TClassTable::Add: class TMapRec already in TClassTable
Warning in TClassTable::Add: class TStreamerInfo already in TClassTable
Warning in TClassTable::Add: class TVirtualArray already in TClassTable
Warning in TClassTable::Add: class TStreamerInfoActions::TConfiguration already in TClassTable
Warning in TClassTable::Add: class TStreamerInfoActions::TConfiguredAction already in TClassTable
Warning in TClassTable::Add: class TStreamerInfoActions::TActionSequence already in TClassTable
Warning in TClassTable::Add: class TVirtualObject already in TClassTable
Warning in TClassTable::Add: class TZIPFile already in TClassTable
Warning in TClassTable::Add: class TZIPMember already in TClassTable
Error in TExMap::Add: key 140473639202320 is not unique

Note: TClassTable was always between “<>” brakets, I had to remove them because I couldn’t post a topic with more than two links.


_ROOT Version: 6.16/00
_Platform: Ubuntu 18.04 on Windows 10 WSL
___Preformatted text

Hi Lucio,

what do you mean by include ROOT as C++ class?
Cheers,
D

Hi, thank you for the reply!
I ment I use ROOT’s classes in C++ programs, sorry for the bad explenation.
I include ROOT inside C++ programs to plot graphs and fit functions; in the C++ source I include ROOT’s classes, for istance:

#include "TGraphErrors.h"
#include "TF1.h"

When I compile the source I don’t get any error, but when I run the program the warnings appear; nevertheless, the program works and I get the plot fitted as I’d expect!

Hi Lucio,

I am not surprised ROOT works but I am surprised by the warnings: they are not expected. We do not see it in any of our platforms. Did the installation process go smoothly without hacks/errors?
I invited to the thread our windows expert.

Cheers,
D

Well, it’s not Windows, it’s Ubuntu running on Windows… But that would be interesting to know how you compile your program

Hi, thank you both for your time!
The installation went pretty smooth: I downloaded and unzipped ROOT, then I added “thisroot.sh” script to my .profile file; I had to add ROOT to my windows PATH, otherwise Ubuntu (on wsl) couldn’t find it.

To compile my sources I use the following line:

g++ sourcename.cpp -o executablename `root-config --cflags --glibs`

Thank you!

Thanks. So I have no idea, I only use ROOT on Windows (native) and have no experience with WSL, but I suppose it should work the same than on standard Ubuntu. You could try to build ROOT from source, but it might be an overkill…

Thank you anyway, I tried to install it once again but I get the same warnings; when I have time I’ll try to build it from source and I report any changes!

Note that this kind of message usually happen when (for whatever reason) the same library is being loaded twice.

1 Like

Thank you for the hint!
I tried to gather some infos that might be useful.
I noticed that I need the line:

export LD_LIBRARY_PATH="/mnt/d/root/lib":$LD_LIBRARY_PATH

in addition to

. /pathtothisroot/thisroot.sh

in my .profile file, otherwise I can’t compile the source (I get a list of “undefined reference to” that I can post here if it’s of any interest).

If I remove “thisroot” script from my .profile everything works but I still get the warnings.

If I type (on ubuntu bash):

echo $LD_LIBRARY_PATH

the result is only the path to root’s library.

I hope this might help, thank you! :slight_smile:

UPDATE:
I built ROOT from source and now it works fine!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.