Hello,
I have a c++ program which works on SLC4. I tried to compile it on my brand new iMac but I got this error message:
g++ -O -Wall -fPIC -g -D_REENTRANT -pthread -m64 -I/Users/santocch/myPrograms/root_5.18/include -c -o partonCalib.o partonCalib.cpp
g++ -O partonCalib.o -L/Users/santocch/myPrograms/root_5.18/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lfreetype -pthread -lm -ldl -lEG /Users/santocch/myPrograms/root_5.18/lib/libMinuit.so\
-o partonCalib
ld: warning in partonCalib.o, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libCore.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libCint.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libRIO.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libNet.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libHist.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libGraf.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libGraf3d.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libGpad.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libTree.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libRint.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libPostscript.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libMatrix.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libPhysics.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libEG.dylib, file is not of required architecture
ld: warning in /Users/santocch/myPrograms/root_5.18/lib/libMinuit.so, file is not of required architecture
Undefined symbols:
"_main", referenced from:
start in crt1.10.5.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [partonCalib] Error 1
Do you have a 64 bits Mac? Why do you specify the option “-m64”.
It looks like you copied your compile instructions from SLC4 to Mac.
To see the compile instructions for any machine, do:
root-config --cflags
I downloaded the src and compiled from scratch… root is working fine (at least for simple things as read histos from file and elaborate them). Is there a logfile of the compilation which could help to understand what’s going on? I just remember that the compilation phase was OK and I didn’t remember any particular error/warning message but I could be wrong.
Thanks