Warning in <TClassTable::Add>: class TFile already in

Hello,

I have a set of classes whose *.C files I use to compile with

gSystem->CompileMacro(char*,“kc”,char*)

and I use to load with

gSystem->Load(char*)

I am using root version 5.18.00 and on lxplus I have no problem. Now I am trying to use these classes on another linux machine where root has been build by us. Compilation is fine but when I load the libraries I got many messages like:
Warning in TClassTable::Add: class TFile already in TClassTable
for many different classes (none of them is a class of mine).
Then If I book, fill and draw a simple histogram I got:

root [3] TH1F h(“h”,“h”,100,0,1)
root [4] h.FillRandom(“gaus”)
root [5] h.Draw()
TCanvas::MakeDefCanvas: created default TCanvas with name c1
Warning in TClassTable::Add: class TAttCanvas already in TClassTable
Warning in TClassTable::Add: class TView already in TClassTable
Warning in TClassTable::Add: class TCanvas already in TClassTable
Warning in TClassTable::Add: class TPad already in TClassTable
Warning in TClassTable::Add: class TButton already in TClassTable
Warning in TClassTable::Add: class TControlBar already in TClassTable
Warning in TClassTable::Add: class TClassTree already in TClassTable
Warning in TClassTable::Add: class TColorWheel already in TClassTable
Warning in TClassTable::Add: class TControlBarButton already in TClassTable
Warning in TClassTable::Add: class TDialogCanvas already in TClassTable
Warning in TClassTable::Add: class TGroupButton already in TClassTable
Warning in TClassTable::Add: class TInspectCanvas already in TClassTable
Warning in TClassTable::Add: class TPaveClass already in TClassTable
Warning in TClassTable::Add: class TSlider already in TClassTable
Warning in TClassTable::Add: class TSliderBox already in TClassTable
Warning in TClassTable::Add: class TViewer3DPad already in TClassTable

and, finally, when I quit root , it crashes:

root [6] .q

*** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library “/lib/tls/libthread_db.so.1”.
Attaching to program: /proc/23541/exe, process 23541
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
[Thread debugging using libthread_db enabled]
[New Thread -1208908096 (LWP 23541)]
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
0x009527a2 in _dl_sysinfo_int80 ()
from /lib/ld-linux.so.2
#1 0x00dcc7d3 in __waitpid_nocancel () from /lib/tls/libc.so.6
#2 0x00d76649 in do_system () from /lib/tls/libc.so.6
#3 0x008798bd in system () from /lib/tls/libpthread.so.0
#4 0x002d45b7 in TUnixSystem::Exec () from /opt/andrea/root/lib/libCore.so
#5 0x002d9ef9 in TUnixSystem::StackTrace ()
from /opt/andrea/root/lib/libCore.so
#6 0x002d6c6a in TUnixSystem::DispatchSignals ()
from /opt/andrea/root/lib/libCore.so
#7 0x002d6cf8 in SigHandler () from /opt/andrea/root/lib/libCore.so
#8 0x002d5f5d in sighandler () from /opt/andrea/root/lib/libCore.so
#9
#10 0x092776c0 in ?? ()
#11 0x013097c9 in ft_mem_free () from /opt/andrea/root/lib/libGraf.so
#12 0x01306b97 in FT_Done_Library () from /opt/andrea/root/lib/libGraf.so
#13 0x01302795 in FT_Done_FreeType () from /opt/andrea/root/lib/libGraf.so
#14 0x0125434c in TTF::Cleanup () from /opt/andrea/root/lib/libGraf.so
#15 0x012543c0 in TTF::~TTF () from /opt/andrea/root/lib/libGraf.so
#16 0x0125509a in __tcf_0 () from /opt/andrea/root/lib/libGraf.so
#17 0x00d6c527 in exit () from /lib/tls/libc.so.6
#18 0x002d46b3 in TUnixSystem::Exit () from /opt/andrea/root/lib/libCore.so
#19 0x00757451 in TRint::Terminate () from /opt/andrea/root/lib/libRint.so
#20 0x0021565f in TApplication::ProcessLine ()
from /opt/andrea/root/lib/libCore.so
#21 0x00757194 in TRint::HandleTermInput ()
from /opt/andrea/root/lib/libRint.so
#22 0x0075582c in TTermInputHandler::Notify ()
from /opt/andrea/root/lib/libRint.so
#23 0x00757a42 in TTermInputHandler::ReadNotify ()
from /opt/andrea/root/lib/libRint.so
#24 0x002d2f42 in TUnixSystem::CheckDescriptors ()
from /opt/andrea/root/lib/libCore.so
#25 0x002d7148 in TUnixSystem::DispatchOneEvent ()
from /opt/andrea/root/lib/libCore.so
#26 0x0026acb0 in TSystem::InnerLoop () from /opt/andrea/root/lib/libCore.so
#27 0x0026aa76 in TSystem::Run () from /opt/andrea/root/lib/libCore.so
#28 0x00215c46 in TApplication::Run () from /opt/andrea/root/lib/libCore.so
#29 0x00755f9e in TRint::Run () from /opt/andrea/root/lib/libRint.so
#30 0x08048d36 in main ()
Root >
*** glibc detected *** corrupted double-linked list: 0x00e6b878 ***
[trackerpro@vmepcS2B18-37 dcureadings]$

No problem, instead, if I book, fill and draw the histogram without loading my libraries.
Has anyone an idea if the problem is in the root installation or in my classes? What is the meaning of that warning message?

                   Thanks

                   Andrea

Hi,

Which version of ROOT are you using? Which platform are you running on?

Cheers,
Philippe

The root version is 5.18.00 and the platform is linux slc4. With uname -a I got:

Linux vmepcS2B18-37 2.6.9-55.EL.cernsmp #1 SMP Thu May 10 18:16:29 CEST 2007 i686 i686 i386 GNU/Linux

                                       Andrea

Humm this should not happen then :slight_smile:
Can you send me a complete example reproducing this problem?

Thanks,
Philippe

Hi Philippe,

thanks for your offer to help me.
I have copied my source files in ~venturia/public/mylib

You should start root in a directory which contain those files (and a directory named 51800). Then you execute
.x CompileAll.C

After that everytime you start root you should execute
.x LoadAll.C

as I told you with lxplus everything is fine while on the other machine I got plenty of those warning, then other warning when I draw a simple histogram as in the previous example (which as nothing to do with my libraries) and finally the crash I have shown to you when I quit root.

                                            Andrea

[quote]as I told you with lxplus everything is fine while on the other machine I got plenty of those warning[/quote]Just checking :slight_smile:, did you regenerate the macro shared library on the other machines?

Philippe

Yes, I have executed ForceCompileAll.C , I have not even copied the shared libraries.

                         Andrea

When trying to run your scripts I got:

dlopen error: /build/pcanal/mylib/./51707/NoiseAnalyzerResult.so: undefined symbol: _ZTV8APVNoise
Load Error: Failed to load Dynamic link library /build/pcanal/mylib/./51707/NoiseAnalyzerResult.so

From the machine that fails, can you send the result of:

> ldd */APVNoise.so
> ldd `which root.exe`
> root.exe -b -l
root [0] TFile *f
root [1] .files 

Cheers,
Philippe.

[trackerpro@vmepcS2B18-37 dcureadings]$ ldd source/51800/APVNoise.so
libXMLParser.so => /opt/andrea/root/lib/libXMLParser.so (0x00308000)
libRIO.so => /opt/andrea/root/lib/libRIO.so (0x00c46000)
libMatrix.so => /opt/andrea/root/lib/libMatrix.so (0x00da6000)
libHist.so => /opt/andrea/root/lib/libHist.so (0x00327000)
libGraf.so => /opt/andrea/root/lib/libGraf.so (0x00986000)
libNet.so => /opt/andrea/root/lib/libNet.so (0x00111000)
libTree.so => /opt/andrea/root/lib/libTree.so (0x0058f000)
libGpad.so => /opt/andrea/root/lib/libGpad.so (0x00202000)
libGX11.so => /opt/andrea/root/lib/libGX11.so (0x002c5000)
libGui.so => /opt/andrea/root/lib/libGui.so (0x00f9e000)
libGX11TTF.so => /opt/andrea/root/lib/libGX11TTF.so (0x00709000)
libGeom.so => /opt/andrea/root/lib/libGeom.so (0x01b2c000)
libPhysics.so => /opt/andrea/root/lib/libPhysics.so (0x00812000)
libGraf3d.so => /opt/andrea/root/lib/libGraf3d.so (0x0160a000)
libTreePlayer.so => /opt/andrea/root/lib/libTreePlayer.so (0x017fc000)
libCore.so => /opt/andrea/root/lib/libCore.so (0x02618000)
libCint.so => /opt/andrea/root/lib/libCint.so (0x01ef5000)
libRint.so => /opt/andrea/root/lib/libRint.so (0x00726000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x014cf000)
libm.so.6 => /lib/tls/libm.so.6 (0x0074e000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x002b1000)
libc.so.6 => /lib/tls/libc.so.6 (0x05d9d000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x05807000)
libz.so.1 => /usr/lib/libz.so.1 (0x00771000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00781000)
libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x00793000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x007a3000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x05667000)
libXft.so.2 => /usr/X11R6/lib/libXft.so.2 (0x007b1000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x007c3000)
/lib/ld-linux.so.2 (0x00952000)
libdl.so.2 => /lib/libdl.so.2 (0x002bb000)
libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x007fe000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x0088d000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0x008b3000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00bd4000)

[trackerpro@vmepcS2B18-37 dcureadings]$ ldd which root.exe
libCore.so => /opt/andrea/root/lib/libCore.so (0x00227000)
libCint.so => /opt/andrea/root/lib/libCint.so (0x0096a000)
libRint.so => /opt/andrea/root/lib/libRint.so (0x00111000)
libdl.so.2 => /lib/libdl.so.2 (0x00139000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0013d000)
libm.so.6 => /lib/tls/libm.so.6 (0x00860000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00208000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00212000)
libc.so.6 => /lib/tls/libc.so.6 (0x00d42000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00883000)
/lib/ld-linux.so.2 (0x00952000)

[trackerpro@vmepcS2B18-37 dcureadings]$ root.exe -b -l
root [0] TFile *f
root [1] .files
0 fp=0x 8d4ffb0 lines=2 file="(tmp0)“
1 fp=0x 8d50398 lines=2 file=”(tmp1)“
2 fp=0x 8d50770 lines=2 file=”(tmp2)“
3 fp=0x 8d5e790 lines=8 *file=”/etc/root/plugins/TSystem/P020_TDCacheSystem.C"
4 fp=0x 8d655e8 lines=6 *file="/etc/root/plugins/TSystem/P030_TAlienSystem.C"
5 fp=0x 8d65e38 lines=8 *file="/etc/root/plugins/TSystem/P010_TRFIOSystem.C"
6 fp=0x 8d668b0 lines=6 *file="/etc/root/plugins/TSystem/P040_TXNetSystem.C"
7 fp=0x 8e9db88 lines=13 file="iostream"
8 fp=0x 8e9eb00 lines=479 file=“iostream.h"
9 fp=0x 8e9f870 lines=70 *file=“iosenum.h"
10 fp=0x 8eae2b8 lines=13 *file=“bool.h"
11 fp=0x 8e9ed08 lines=173 *file=”_iostream"
12 fp=0x 8e9e910 lines=72 file=”_string"
13 fp=0x 8e9d0c8 lines=67 file=“RtypesCint.h"
14 fp=0x 0 lines=0 file=”/opt/andrea/lib/root/libRIO.so”

Are you in a position to give me access to your node so that I can really reproduce this problem? [I.e. I can’t see anything wrong from the output and I can not reproduce this problem, and I can not run your example (see message above)]

Cheers,
Philippe

you can access the node. Let me know your e-mail address where I can send you the instructions

                                    Andrea

Hi,

You can reach me at pcanal@fnal.gov

Cheers,
Philippe

Humm it was hard to ‘see’ :slight_smile: but the error was actually visible from your ldd output. There are 2 sets of ROOT libraries in your case:

 libRIO.so => /opt/andrea/root/lib/libRIO.so (0x00c46000) 

and

  14 fp=0x 0 lines=0 file="/opt/andrea/lib/root/libRIO.so"

Note the inversion root/lib and lib/root !

You have this situation because you have use the --prefix configuration option, and did run the gmake install but you are still pointing to the source directory.

To fix the problem you can use

export LD_LIBRARY_PATH=/opt/andrea/lib/root

instead of export LD_LIBRARY_PATH=${ROOTSYS}/lib. (See the file prepare_root_better in the same directory as prepare_root)

OR you can recompile ROOT without the --prefix option.

Cheers,
Philippe.

PS. You may also want to change the PATH from $ROOTSYS/bin to /opt/andrea/bin/root

Hello,

We are having this same problem of TClassTable warnings followed by a crash upon exit with our ROOT 5 (5.34/30) while trying to get AMORE working. Unfortunately, the apparent answer to this problem is not rendering on the webpage (nor is it hidden away in the site’s HTML). The requested output of ldd root and the ROOT commands is included below. Although this is an old issue, any assistance will be greatly appreciated.

Thank you,
Ryan

[root@rwojtyla2015_001aa06d0289 bin]# ldd root.exe
        linux-vdso.so.1 =>  (0x00007ffc225ad000)
        libCore.so.5.34 => /opt/root/lib/libCore.so.5.34 (0x00007fedc255c000)
        libRint.so.5.34 => /opt/root/lib/libRint.so.5.34 (0x00007fedc2328000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fedc2021000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fedc1e0b000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fedc1a3e000)
        libCint.so.5.34 => /opt/root/lib/libCint.so.5.34 (0x00007fedc10bd000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fedc0eb9000)
        libz.so.1 => /lib64/libz.so.1 (0x00007fedc0ca3000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fedc09a1000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fedc0785000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fedc2f17000)
root [0] TFile *f
root [1] .files
  0 fp= via hard link lines=0   *file="/opt/root-5.34.30.patches/lib/libCint.so"
  1 fp= via hard link lines=0   *file="/opt/root-5.34.30.patches/lib/libCore.so"
  2 fp=0x000000c84050 lines=265  file="RtypesCint.h"
  3 fp=0x000000c9d520 lines=13   file="iostream"
  4 fp=0x000000c9dfa0 lines=516  file="iostream.h"
  5 fp=0x000000cafe10 lines=70  *file="iosenum.h"
  6 fp=0x000000cb39e0 lines=13  *file="bool.h"
  7 fp=0x000000cbf550 lines=128  file="_iostream"
  8 fp=0x000000cc2920 lines=165  file="iomanip.h"
  9 fp=0x000000c9b2d0 lines=2    file="(tmp9)"
 10 fp=0x000000c9b830 lines=2    file="(tmp10)"
 11 fp=0x000000c9bb10 lines=2    file="(tmp11)"
 12 fp= via hard link lines=0   *file="/opt/root-5.34.30.patches/lib/libRint.so"
 13 fp=0x000000000000 lines=0    file="/opt/root-5.34.30.patches/lib/libMathCore.so"
 14 fp=0x000001186660 lines=34   file="DllImport.h"
 15 fp=0x000000000000 lines=0    file="/opt/root-5.34.30.patches/lib/libThread.so"
 16 fp=0x000000000000 lines=0    file="/opt/root-5.34.30.patches/lib/libRIO.so"

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/”).

ROOT 5.34/30 is very old. Try the head of the v5-34-00-patches branch for ROOT 5 or the newest ROOT 6 release.

BTW. When you post “source code” or “output” here, do remember to enclose them into two lines which contain just three characters ``` (see how your post has been edited above).

Hi Willie, I have the same problem, I tried using

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

in my bash and it doesn’t work, I get the same error.

I’m using python 2.7