sushil
October 20, 2009, 4:35am
1
Hi,
I am trying to load my analysis shared object ("Analysis.so") in root session to run Loop() method. But it shows the following error:
root [0] .L Analysis.so
root [1] Analysis t
/scratch0/ROOT/root_5.22/root/bin/root.exe: symbol lookup error: /home/sushil/PhotoIDEfficiency/./Analysis.so: undefined symbol: _ZN6TChainC1EPKcS1
Then i created a Analysis.rootmap file with following lines in it:
Library.Analysis: libRIO.so
Library.Analysis: libTree.so
and then tried again to load my .so. But I get the same error:
However if in root session I do:
gSystem->Load(“libRIO.so ”);
gSystem->Load(“libTree.so ”);
.L Analysis.so ;
Analysis t;
t.Loop();
Then it works fine.
Could someone suggest whats wrong with the above methods. I am using ROOTV5.22.
Thanks and with best regards,
sushil
brun
October 20, 2009, 7:15am
2
If your Analysis.so file references TChain, you must load libTree before loading this library.
Rene
pcanal
October 20, 2009, 11:09am
3
Hi,
The rootmap file should contains:Library.Analysis: libTree.so libRIO.so
Cheers,
Philippe.
sushil
October 20, 2009, 2:40pm
4
Hi,
I tried as you suggested by keeping the line in .rootmap file. But it still gives the same error.
If you would like to see my files then they are here:
schauhan.web.cern.ch/schauhan/B … fficiency/
PS: to be more precise I have used root source code root_v5.22.00d.source.tar.gz to install root.
With best regards,
sushil
sushil
October 21, 2009, 3:32pm
5
Hi,
Any possible solution for the above problem??
Thanks and with best regards,
sushil
Axel
October 21, 2009, 4:42pm
6
Hi,
for the .rootmap file to be used by ROOT it must be in a directory that’s part of $LD_LIBRARY_PATH (or %PATH% on windows). And the correct syntax is “Library.CLASSNAME: libraryContainingCLASSNAME dependentLibraries”, so in your case “Library.Analysis: Analysis.so libTree.so libRIO.so ”
Cheers, Axel.
sushil
October 21, 2009, 6:34pm
7
Hi,
My LD_LIBRARY_PATH is:
/scratch0/ROOT/root_5.22/root/lib/
MY working directory is(also has Analysis.rootmap file):
/scratch0/PhotoIDEfficiency
I have also added the line Analysis.so before libTree.so and libRIO.so and Analysis.rootmap look like:
Library.Analysis: Analysis.so libTree.so libRIO.so
But I get same problem!!!
[sushil-laptop@PhotoIDEfficiency] root -l
root [0] .L Analysis.so
root [1] Analysis t
/scratch0/ROOT/root_5.22/root/bin/root.exe: symbol lookup error: /scratch0/PhotoIDEfficiency/./Analysis.so: undefined symbol: ZN6TChainC1EPKcS1
Thanks and with best regards,
sushil
pcanal
October 22, 2009, 11:35am
8
Hi,
Try loading the library viagSystem->Load("Analisys.so");
Cheers,
Philippe.
sushil
October 25, 2009, 4:04pm
9
I tried this one also. Below is the steps I followed.
[sushil-laptop@PhotonIDAnalysis] make
Making Analysisdict.C Analysisdict.h
rm -f Analysisdict.C Analysisdict.h
rootcint Analysisdict.C -c -I/home/sushil/ROOT/root_5.22/root/include Analysis.h
Compiling Analysis.C
g++ -o Analysis.so -O -Wall -fPIC -shared -I/home/sushil/ROOT/root_5.22/root/include Analysisdict.C Analysis.C
[sushil-laptop@PhotonIDAnalysis] rot -l
rot: Command not found.
[sushil-laptop@PhotonIDAnalysis] root -l
root [0] gSystem->Load(“libRIO.so ”);
root [1] gSystem->Load(“libTree.so ”);
root [2] gSystem->Load(“Analysis.so ”);
root [3] Analysis t;
root [4] t.Loop();
/home/sushil/ROOT/root_5.22/root/bin/root.exe: symbol lookup error: /home/sushil/PhotoIDEfficiency/PhotonIDAnalysis/./Analysis.so: undefined symbol: _ZN4TH1FC1EPKcS1_idd
[sushil-laptop@PhotonIDAnalysis] c++filt _ZN4TH1FC1EPKcS1_idd
TH1F::TH1F(char const*, char const*, int, double, double)
[sushil-laptop@PhotonIDAnalysis]
c++filt says that something wrong with TH1F in my class but could not able to find what exactly it could be.
PS: If anyone interested to see my code(its a small code) than its here:
schauhan.web.cern.ch/schauhan/BSM/RootError/
Thanks and with best regards,
sushil
sushil
October 25, 2009, 5:17pm
10
okay, loading libHist.so solves the problem.
With best regards,
sushil