Hi!
I have compiled root 5.26 with
./configure --fail-on-missing --disable-builtin-pcre --enable-cintex --enable-explicitlink --enable-mathcore --enable-minuit2 --enable-python --enable-reflex --enable-roofit --enable-xml --with-python-incdir=...local/Tools/pkg/include/python2.5 --with-python-libdir=pathtopytholib
When I run my compiled program using genreflex dictionaries, I get immediately the following segfault:
[quote]Program received signal SIGSEGV, Segmentation fault.
0x00002af75f4e130c in ROOT::Cintex::CINTScopeBuilder::Setup () from …/local/sw/root5.26/root//lib/libCintex.so[/quote]
It seems to crash when ecexuting
int main(int argc, char *argv[])
{
ROOT::Cintex::Cintex::Enable();
...
My program crashes while loading the Cintex lib. Does anyone has a clue what to do ? With root 5.22 everything worked flawlessly. Hence, there must be sth wrong in the new installation. But what…
Thanks for any help and ideas…
Philipp
Axel
May 15, 2010, 4:00pm
2
Hi,
you forgot to tell us which platform this happens on. MacOS, I suppose - which version? 64bit?
Cheers, Axel.
Hi !
the platfrom is centOS x86_64 with gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46).
Thanks,
Philipp
Axel
May 16, 2010, 11:48am
4
Hi,
thanks. Can you come up with (and post) a small example showing the issue?
Cheers, Axel.
Hi!
Thanks for your answer. I think this problem is difficult to track down because we compile a rather huge framework… But I have created a small example to show where it crashes. In the meantime I also tried to use root 5.26b but that shows the same error.
//stl
#include <iostream>
#include "TFile.h"
#include "TTree.h"
#include "Cintex/Cintex.h"
int main(int argc, char **argv){
ROOT::Cintex::Cintex::Enable();
if(argc < 2){
cout << "\n\t Usage : " << argv[0] << " some_wuto_tree.root\n\n";
exit(1);
}
TFile f("wuto.root","READ");
TTree *t = (TTree*)f.Get("Event");
std::cout << t->GetEntries() << std::endl;
}
If I run that one:
It crashes in the line where ROOT::Cintex::Cintex::Enable(); is executed.
All the libraries we link against are:
The lib libstandalone.so is the library containing our dictionaries.
libCore.so => /gridsoft/local/Tools/root_5.26b//lib/libCore.so (0x00002b2338550000)
libCint.so => /gridsoft/local/Tools/root_5.26b//lib/libCint.so (0x00002b2338f75000)
libRIO.so => /gridsoft/local/Tools/root_5.26b//lib/libRIO.so (0x00002b233991c000)
libNet.so => /gridsoft/local/Tools/root_5.26b//lib/libNet.so (0x00002b2339cb8000)
libHist.so => /gridsoft/local/Tools/root_5.26b//lib/libHist.so (0x00002b2339fe7000)
libGraf.so => /gridsoft/local/Tools/root_5.26b//lib/libGraf.so (0x00002b233a65b000)
libGraf3d.so => /gridsoft/local/Tools/root_5.26b//lib/libGraf3d.so (0x00002b233aa7e000)
libGpad.so => /gridsoft/local/Tools/root_5.26b//lib/libGpad.so (0x00002b233adaa000)
libTree.so => /gridsoft/local/Tools/root_5.26b//lib/libTree.so (0x00002b233b098000)
libRint.so => /gridsoft/local/Tools/root_5.26b//lib/libRint.so (0x00002b233b4a8000)
libPostscript.so => /gridsoft/local/Tools/root_5.26b//lib/libPostscript.so (0x00002b233b6d7000)
libMatrix.so => /gridsoft/local/Tools/root_5.26b//lib/libMatrix.so (0x00002b233b926000)
libPhysics.so => /gridsoft/local/Tools/root_5.26b//lib/libPhysics.so (0x00002b233bd8e000)
libMathCore.so => /gridsoft/local/Tools/root_5.26b//lib/libMathCore.so (0x00002b233c031000)
libThread.so => /gridsoft/local/Tools/root_5.26b//lib/libThread.so (0x00002b233c436000)
libdl.so.2 => /lib64/libdl.so.2 (0x000000301c600000)
libMinuit.so => /gridsoft/local/Tools/root_5.26b//lib/libMinuit.so (0x00002b233c6b2000)
libCintex.so => /gridsoft/local/Tools/root_5.26b//lib/libCintex.so (0x00002b233c94a000)
libPyROOT.so => /gridsoft/local/Tools/root_5.26b//lib/libPyROOT.so (0x00002b233cb79000)
libTreePlayer.so => /gridsoft/local/Tools/root_5.26b//lib/libTreePlayer.so (0x00002b233ce1a000)
libg2c.so.0 => /usr/lib64/libg2c.so.0 (0x00002b233d219000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x000000302e800000)
libcommon.so => /common/home/sturm/Kolophon/shlib/libcommon.so (0x00002b233d43a000)
libWuToObjects.so => /common/home/sturm/Kolophon/shlib/libWuToObjects.so (0x00002b233d6c8000)
libGoodRunList.so => /common/home/sturm/Kolophon/shlib/libGoodRunList.so (0x00002b233d97a000)
libstandalone.so => /common/home/sturm/Kolophon/shlib/libstandalone.so (0x00002b233dbed000)
libpython2.5.so.1.0 => /griddata/gridsoft/local/Tools/pkg/lib/libpython2.5.so.1.0 (0x00002b233de1d000)
libboost_python-mt.so => /griddata/gridsoft/local/Tools/pkg/lib/libboost_python-mt.so (0x00002b233e0b5000)
libboost_filesystem-mt.so => /griddata/gridsoft/local/Tools/pkg/lib/libboost_filesystem-mt.so (0x00002b233e214000)
libboost_program_options-mt.so => /griddata/gridsoft/local/Tools/pkg/lib/libboost_program_options-mt.so (0x00002b233e32d000)
libm.so.6 => /lib64/libm.so.6 (0x000000301c200000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x000000302cc00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x000000301ca00000)
libc.so.6 => /lib64/libc.so.6 (0x000000301be00000)
libncurses.so.5 => /usr/lib64/libncurses.so.5 (0x000000302ec00000)
libpcre.so.0 => /lib64/libpcre.so.0 (0x00002b233e47e000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000000302e400000)
/lib64/ld-linux-x86-64.so.2 (0x000000301ba00000)
libReflex.so => /gridsoft/local/Tools/root_5.26b//lib/libReflex.so (0x00002b233e69b000)
libXMLIO.so => /gridsoft/local/Tools/root_5.26b//lib/libXMLIO.so (0x00002b233e94e000)
libXMLParser.so => /gridsoft/local/Tools/root_5.26b//lib/libXMLParser.so (0x00002b233ebc6000)
libz.so.1 => /usr/lib64/libz.so.1 (0x000000301ce00000)
libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0000003025000000)
libdb4-4.7.so.7 => /griddata/gridsoft/local/Tools/pkg/lib/libdb4-4.7.so.7 (0x00002b233edee000)
libutil.so.1 => /lib64/libutil.so.1 (0x0000003029400000)
librt.so.1 => /lib64/librt.so.1 (0x000000301d200000)
libboost_system-mt.so => /griddata/gridsoft/local/Tools/pkg/lib/libboost_system-mt.so (0x00002b233f0c1000)
Maybe it is some incompatibility with python (we use for configuring our programs) or boost with the root libs?
Thanks again for your help.
Philipp
Axel
May 21, 2010, 1:58pm
6
Hi,
thanks! Can you try to dlopen your dictionary library instead of linking against it? Does that solve it?
Cheers, Axel.
Hi Axel!
ok, if I remove all the dependencies from the framework for the example. And loading the library with the dictionary by hand:
ROOT::Cintex::Cintex::Enable();
gSystem->Load("/griddata/gridsoft/local/sturm/Kolophon/WuTo/standalone/shlib/libWuToObjects.so");
I get
bin/test
8
dlopen error: /griddata/gridsoft/local/sturm/Kolophon/WuTo/standalone/shlib/libWuToObjects.so: undefined symbol: _ZN6Reflex18TypedefTypeBuilderEPKcRKNS_4TypeE
Load Error: Failed to load Dynamic link library /griddata/gridsoft/local/sturm/Kolophon/WuTo/standalone/shlib/libWuToObjects.so
11
*** Interpreter error recovered ***
Warning in TClass::TClass : no dictionary for class WutoAtlas::EventInfo is available
Warning in TClass::TClass : no dictionary for class WutoAtlas::ContainerBase is available
Warning in TClass::TClass : no dictionary for class WutoAtlas::Particle is available
Warning in TClass::TClass : no dictionary for class WutoAtlas::SampleInfo is available
82745
Which is good, because he doesn’t crash in the CIntex, but can no more load the library.
Best regards
Philipp
Axel
May 21, 2010, 3:51pm
8
Hi,
as we discussed I’ll investigate in two weeks! (Note to myself: this is caused by hard-linking libraries and Cintex recursively trying to initialize the global namespace.)
Cheers, Axel.
Axel
June 8, 2010, 10:53am
9
Hi,
in my little standalone example I can solve this issue by linking in the order -lCintex -lCint -lCore -lReflex; it only crashes when linking -lCore before Reflex and Cintex. Does this solve it for you, too?
Cheers, Axel.