ROOT for the THERMUS code: symbol lookup error


ROOT Version: v5.34.36
Platform: ubuntu 14.04
Compiler: C++


Dear all,

This is my first time to use the ROOT code and THERMUS code.

The ROOT version: 5.34.36
The THERMUS code (also can be seen in the attachment)

Here I use the different way to install the ROOT such as the approach mentioned by the YOUTUBER: ROOT CERN for ubuntu. i think that the ROOT is installed properly. The THERMUS code had also been installed followed by the file “InstallationInstructions.txt” in the folder of “~/THERMUS/Code”.

Unlike the old question " Root & THERMUS code" by the ROOTer “valentina_ms”, i can load the dynamical library, i.e. there is no problems for running “root [ ] gSystem->Load(”./lib/*.so")" . However, the errors come when i run the example code, namely,
root [ ] .L SampleMacro.C
root [ ] SampleMacro()
The error i got here is : /home/mahhao/root/bin/root.exe: symbol lookup error: /home/mahhao/THERMUS/lib/libTHERMUS.so: undefined symbol: _ZN3TF1C1EPKcPFdPdS2_Eddi

  1. It seems that the version of c++ I used is not suitable for the THERMUS code which leads to the “symbol lookup error”? I’m not sure about that.

  2. Then I found out that the version of ROOT used in THERMUS_v1.0 is 3.10/02, but this ROOT version is not available now. Is this the main reason for the error here? Anyway there seems no this resource on the network~

Any ideas for the reason and the solutions about this error here? Or can someone provide the ROOT with the version 3.10/02 ?

By the way, the THERMUS code, numerical repices for c and the manual for the THERMUS are uploaded as the attachment.

thermus_total.zip (412.8 KB)

Cheers,
Hong-Hao

Edit three files:

THERMUS/Code/THERMUS/functions/makefile
THERMUS/Code/THERMUS/nrc/makefile
THERMUS/Code/THERMUS/main/makefile

and modify the line:

ROOTLIBS     := $(shell root-config --libs)

into:

ROOTLIBS     := $(shell root-config --libs) -lMinuit

and the line:

$(LD) $(SOFLAGS) $(LIBS) $(LDFLAGS) $^ $(OutPutOpt) $@

into:

$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(LIBS)

then rebuild everything from scratch (execute “make distclean” then “make all” in each subdirectory).

Thanks, it works! I really appreciate it!

However, when I run the “SampleFit” code which should be linked with “libFunctions.so” , as

root [ ] .L SampleFit.C
root [ ] SampleFit()

there will be a similar error: /home/mahhao/root/bin/root.exe: symbol lookup error: /home/mahhao/THERMUS/././lib/libFunctions.so: undefined symbol: _ZN7TMinuitC1Ei

Here is the code of “SampleFit.c”

void SampleFit(){

cout<<endl;
cout<<"#####################################################################################"<<endl;
cout<<"Output to compare to that of Section 3.9.5"<<endl;
cout<<endl;

TTMParticleSet set("/home/mahhao/THERMUS/particles/PartList_PPB2002.txt");
set.InputDecays("/home/mahhao/THERMUS/particles/",true);

TTMParameterSetBSQ par(0.160,0.05,0.,0.,1.);
par.FitT(0.160);
par.FitMuB(0.05);
par.FitMuS(0.);

TTMThermalFitBSQ fit(&set,&par,"/home/mahhao/THERMUS/ExpData.txt");
fit.SetQStats(kFALSE);
fit.SetWidth(kFALSE);
fit.GenerateYields();
fit.ListYields();


fit.FitData(0);
par.List();

cout<<endl;
cout<<"#####################################################################################"<<endl;
cout<<endl;

}

The line “fit.FitData(0)” leads to the error. And the fucnition FitData at that line is defined in “./THERMUS/functions/TThermalFit.cxx”.

By the way: libFunctions.so for ./THERMUS/functions
libTHERMUS.so for ./THERMUS/main

Sorry there is a mistake in the previous reply:

The sentence

"The line “fit.FitData(0)” leads to the error. And the fucnition FitData at that line is defined in “./THERMUS/functions/TThermalFit.cxx”." 

should be modified by

"The line “fit.FitData(0)” leads to the error. And the fucnition FitData at that line is defined in “./THERMUS/main/TThermalFit.cxx”."  The included function at the "TThermalFit.cxx" is fit_function and the fit_ function is associated with the file “./THERMUS/functions/fit_function.c”

See my first post again (I improved it).

Note also that you do not need to create new posts if you want to improve your old post. You can simply edit / modify your old post (there is the “edit this post” button among all buttons down here).

BTW. You can get meaningful information about that “undefined symbol”. Try:

c++filt _ZN3TF1C1EPKcPFdPdS2_Eddi
c++filt _ZN7TMinuitC1Ei

Ok, it is really helpful to me.

Thanks for your patient!

And it works now!

Cheers!

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