Référence indéfinie vers « TProofOutputFile::OpenFile

Hello,

I have a error trying to compile a code on my new laptop. The content of my Makefile is attached. I'm running the following command: make MainCA

I’m tryed several versions of root, of g++,… without any change in the errors.
I’m working with a kubuntu 13.10 system, following the requirements of Berzano’s wiki.

I’m getting the error messages:

manso@manso-HP-ZBook-15:~/ALICE/MFT/tracking/CA-svn$ make MainCA
g++ -O2 -m64 MainCA.o Ca.o CaDict.o Det.o DetDict.o HijingPara.o HijingParaDict.o QEDGen.o QEDGenDict.o AliMFTClusterReader.o AliMFTClusterReaderDict.o -L/home/manso/ALICE/MFT/root/v5-34-11/lib -lEve -lEG -lTreePlayer -lGeom -lGed -lRGL -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -lMinuit -lVMC -lProof -lXMLParser -L/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc -lSTEER -lESD -lANALYSIS -lCDB -lRAWDatabase -lMUONraw -lRAWDatarec -lRAWDatasim -lSTEERBase -lMUONcore -lMUONmapping -lMUONcalib -lMUONgeometry -lMUONtrigger -lMUONbase -lMUONrec -lMFTbase -o MainCA
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libSTEER.so: référence indéfinie vers « TProofOutputFile::OpenFile(char const*) »
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libSTEER.so: référence indéfinie vers « TLinearFitter::GetChisquare() »
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libSTEER.so: référence indéfinie vers « TVirtualMCApplication::TVirtualMCApplication() »
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libCDB.so: référence indéfinie vers « TLinearFitter::GetCovarianceMatrix(TMatrixT&) »
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libCDB.so: référence indéfinie vers « TLinearFitter::GetParameters(TVectorT&) »
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libCDB.so: référence indéfinie vers « TSAXParser::TSAXParser() »
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libSTEER.so: référence indéfinie vers « TLinearFitter::AddPoint(double*, double, double) »

Why the make cannot found the TProof classe since I added the Proof libraries in my makefile? (I checked that the libProof.so.5.34 library is in the lib directory of Root).
Thanks for the help. F.M.

Try to change the order of libraries into something like:

g++ -O2 -m64 \ MainCA.o ... AliMFTClusterReaderDict.o \ -L/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc -lSTEER ... -lMFTbase \ -L/home/manso/ALICE/MFT/root/v5-34-11/lib -lEve ... -lXMLParser \ -o MainCA

Ok,

I changed the root libraries to the end (new Makefile attached), by now it's one of the MUON library which is not seen: but the AliMUONRawCluster class is in the MUONbase library which is called now before the root libraries... It's very strange that it seems impossible to call both aliroot and root libraries.

g++ -O2 -m64 MainCA.o Ca.o CaDict.o Det.o DetDict.o HijingPara.o HijingParaDict.o QEDGen.o QEDGenDict.o AliMFTClusterReader.o AliMFTClusterReaderDict.o -L/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc -lSTEER -lESD -lANALYSIS -lCDB -lRAWDatabase -lMUONraw -lRAWDatarec -lRAWDatasim -lSTEERBase -lMUONcore -lMUONmapping -lMUONcalib -lMUONgeometry -lMUONtrigger -lMUONbase -lMUONrec -lMFTbase -L/home/manso/ALICE/MFT/root/v5-34-11/lib -lEve -lEG -lTreePlayer -lGeom -lGed -lRGL -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -lMinuit -lVMC -lProof -lXMLParser -o MainCA
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libMFTbase.so: référence indéfinie vers « AliMUONRawCluster::AliMUONRawCluster() »
collect2: error: ld returned 1 exit status
make: *** [MainCA] Erreur 1

Put “-lMUONbase” AFTER the library which uses object files from it, i.e. AFTER “-lMFTbase” in this case.

Ok, I did that but now there is a lot of new “référence indéfinie” error messages as you can see:

g++ -O2 -m64 MainCA.o Ca.o CaDict.o Det.o DetDict.o HijingPara.o HijingParaDict.o QEDGen.o QEDGenDict.o AliMFTClusterReader.o AliMFTClusterReaderDict.o -L/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc -lSTEER -lESD -lANALYSIS -lCDB -lRAWDatabase -lMUONraw -lRAWDatarec -lRAWDatasim -lSTEERBase -lMUONcore -lMUONmapping -lMUONcalib -lMUONgeometry -lMUONtrigger -lMUONrec -lMFTbase -lMUONbase -L/home/manso/ALICE/MFT/root/v5-34-11/lib -lEve -lEG -lTreePlayer -lGeom -lGed -lRGL -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -lMinuit -lVMC -lProof -lXMLParser -o MainCA
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libMUONbase.so: référence indéfinie vers « AliMUONVStore::FindObject(TObject const*) const »
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libMUONbase.so: référence indéfinie vers « AliMUONTriggerCrateStore::ReadFromFile(AliMUONCalibrationData*) »
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libMUONbase.so: référence indéfinie vers « AliMUONBlockHeader::fgkHeaderLength »

So next step, I added the -lMUONCore after the -lMUONbase and I 'm getting the next message:

g++ -O2 -Wall -fPIC -pthread -m64 -I/home/manso/ALICE/MFT/root/v5-34-11/include -I/home/manso/ALICE/MFT/aliroot/trunk/build/include -I/home/manso/ALICE/MFT/aliroot/trunk/v5-04-Rev-12/MFT -I/home/manso/ALICE/MFT/aliroot/trunk/v5-04-Rev-12/MUON -c AliMFTClusterReaderDict.cxx
g++ -O2 -m64 MainCA.o Ca.o CaDict.o Det.o DetDict.o HijingPara.o HijingParaDict.o QEDGen.o QEDGenDict.o AliMFTClusterReader.o AliMFTClusterReaderDict.o -L/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc -lSTEER -lESD -lANALYSIS -lCDB -lRAWDatabase -lMUONraw -lRAWDatarec -lRAWDatasim -lSTEERBase -lMUONmapping -lMUONcalib -lMUONgeometry -lMUONtrigger -lMUONrec -lMFTbase -lMUONbase -lMUONcore -L/home/manso/ALICE/MFT/root/v5-34-11/lib -lEve -lEG -lTreePlayer -lGeom -lGed -lRGL -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -lMinuit -lVMC -lProof -lXMLParser -o MainCA
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libMUONbase.so: référence indéfinie vers « AliMUONTriggerCrateStore::ReadFromFile(AliMUONCalibrationData*) »
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libMUONbase.so: référence indéfinie vers « AliMUONBlockHeader::fgkHeaderLength »
/home/manso/ALICE/MFT/aliroot/trunk/build/lib/tgt_linuxx8664gcc/libMUONbase.so: référence indéfinie vers « AliMUONLocalTrigger::~AliMUONLocalTrigger() »

Best regards.

Ok, the problem is that my colleagues are using the same Makefile without modifying the order of the libraries and that works for themselves…

Find the libraries which provide “AliMUONTriggerCrateStore” / “AliMUONBlockHeader” / “AliMUONLocalTrigger” and put them after “-lMUONbase”. If you get another problems of this kind, repeat this procedure until you find the proper order of your libraries.

Instead of cleaning your library order, you may add “-Wl,–no-as-needed” to your linking command line flags (BEFORE any “-l…” flag).

Ok, it’s works now using the “-Wl,–no-as-needed” solution for each MUON libraries! But I don’t uderstand why I have to do that and not my colleagues… I will investigate for that.

Anyway, thanks you for your help! Have a good week-end… :wink: