Warning in <TClassTable::Add> and known solutions don't work


_ROOT Version: 6.16
_Platform: OS 10.14.3
_Compiler: Cling


EDIT: I solved it?

What I did was to change the name of my directories, I had named the directory for root “myRoot” and the build directory “builddir” so I changed them to simply “root” and “build” and now it works I think.

I didn’t know the names were so important since in the instructions they don’t direct you to give them those exact names.

Also I had to go back and update my bash with the new names.

Check this out:

eduroam-int-dhcp-98-97-107:~ Fer$ root
   ------------------------------------------------------------
  | Welcome to ROOT 6.19/01                  https://root.cern |
  |                               (c) 1995-2019, The ROOT Team |
  | Built for macosx64 on Jun 10 2019, 22:42:00                |
  | From heads/master@v6-19-01-160-g5b6222a249                 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0] .q
eduroam-int-dhcp-98-97-107:~ Fer$ python
Python 2.7.10 (default, Aug 17 2018, 19:45:58) 
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
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
>>> 

This is very similar to this topic.

To cite Willie-E-Coyote:

It seems you also have two ROOT versions mixed (one set of libraries in “/opt/root/lib/” and another one in “/opt/root-5.34.30.patches/lib/”).

And I did in fact had to sets of libraries, one was from a previous and very old version of ROOT, so I made sure to include in my bash the absolute address of the directory with the libraries i want to use, but this still happened, so I deleted the other directory, making absolutely sure that there is no second library, and yet this still happens.

Help, I don’t know what to do.

Technically those messages indicates that libRIO is being loaded twice … which indeed is usually because there is 2 such libraries laying around.

What is the value of your LD_LIBRARY_PATH and PYTHONPATH?

In the output of otool -l $ROOTSYS/lib/libPyROOT.so look for the section about LC_RPATH. mine looks like:

Load command 16
          cmd LC_RPATH
      cmdsize 56
         path /opt/build/root_builds/rootcling.cmake/lib (offset 12)

also what is the output of

DYLD_PRINT_LIBRARIES=1 ./python
>>> import ROOT

Cheers,
Philippe.

Hi Philippe, this is my PYTHONPATH

export PYTHONPATH="/Users/Fer/myRoot/builddir/lib"

I’m on mac, so if I understand correctly, I don’t have an LD_LIBRARY_PATH but the equivalent should be DYLD_FALLBACK_LIBRARY_PATH, right?, so I wrote this in my bash:

export DYLD_FALLBACK_LIBRARY_PATH="/Users/Fer/myRoot/builddir/lib"

but it didn’t work.

For > otool -l $ROOTSYS/lib/libPyROOT.so I got:

eduroam-int-dhcp-98-97-107:~ Fer$ otool -l $ROOTSYS/lib/libPyROOT.so

/Library/Developer/CommandLineTools/usr/bin/objdump: '/Users/Fer/root/build/lib/libPyROOT.so': No such file or directory

And when I tried to do the last command you mention I got:

eduroam-int-dhcp-98-97-107:~ Fer$ DYLD_PRINT_LIBRARIES=1 ./python
-bash: ./python: No such file or directory

which is weird but I’m not knowledgable enough to understand what it means

which is weird but I’m not knowledgable enough to understand what it means

Sorry, I meant:

DYLD_PRINT_LIBRARIES=1 python

and also

which python

but then you have

ROOTSYS equal to /Users/Fer/root/build/lib/

Those 2 can not be right ‘together’ and the (possible) confusion might be the source of the problem.

Hi, check my edit at the top, I solved it, your output made me realize that I should change the names. Now I while I get no errors on the terminal, I get errors when trying to run the examples:

/usr/bin/python2.7 /Users/Fer/PycharmProjects/proton/test.py
Traceback (most recent call last):
  File "/Users/Fer/PycharmProjects/proton/test.py", line 3, in <module>
    from ROOT import TCanvas, TPaveText, gROOT
  File "/Users/Fer/root/build/lib/ROOT.py", line 24, in <module>
    import cppyy
  File "/Users/Fer/root/build/lib/cppyy.py", line 61, in <module>
    import libPyROOT as _backend
ImportError: dlopen(/Users/Fer/root/build/lib/libPyROOT.so, 2): Library not loaded: @rpath/libTree.so
  Referenced from: /Users/Fer/root/build/lib/libPyROOT.so
  Reason: image not found

I can finally see the output of

otool -l $ROOTSYS/lib/libPyROOT.so

it is:

Load command 16
          cmd LC_RPATH
      cmdsize 48
         path /Users/Fer/myRoot/builddir/lib (offset 12)

which now is wrong because I renamed those directories, arrrgh, I feel like I’m going in circles, I fix one thing but that somehow broke another one.

Should I add to my bash something like:

export LC_RPATH="/Users/Fer/root/build/lib"

?

Renaming/moving a build directory does not work well.

At this point I would simply recommend to start from ‘scratch’. I.e. delete all trace of both the old and new directories. Create a new build directory with the ‘right’ name and build ‘fresh’ there.

Cheers,
Philippe.

how do I uninstall root correctly?, I don’t want this to turn into a bigger problem

Assuming you have nothing else you want to keep on those directory, you could do

rm -r /Users/Fer/root/build
rm -r /Users/Fer/myRoot/builddir

thanks, one more question, should I have a root directory with the build directory inside, OR should the build directory and the root directory be alongside on the same directory?

I am guessing that my ‘root’ directory, you are referring to the directory containing the ROOT git repository/source.

Having the build directory either as subdirectory of the source directory or along side it will work as well.

Cheers,
Philippe.

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