ROOT Compiler Settings?

Jean-François Caron jfcaron at phas.ubc.ca
Fri Oct 18 11:57:36 PDT 2013


Hi, this might be too specific of a question for the MacPorts Users list, but there is a reason for asking here, so if you are a MacPorts+ROOT person, read on. 

I am using the port "root":
root @5.34.10_2+clang32+fftw3+gcc48+graphviz+gsl+minuit2+opengl+python27+roofit+soversion+ssl+tmva+xml 

The +clang32 variant makes it compile using the MacPorts-supplied clang-3.2 port.  root has a functionality called ACLiC where it automatically compiles, loads and links programs that use the ROOT libraries using the same compiler that was used to compile ROOT.  

When trying to compile one of these ROOT programs using ACLiC, I get this error:

<<<
root [0] .L MonotCubicInterpolator.C+
Info in <TUnixSystem::ACLiC>: creating shared library /Users/jfcaron/Projects/Proto2BeamTest2/./MonotCubicInterpolator_C.so
Undefined symbols for architecture x86_64:
  "Opm::MonotCubicInterpolator::evaluate(double, double&) const", referenced from:
      __ZL48G__MonotCubicInterpolator_C_ACLiC_dict_3312_0_11P8G__valuePKcP8G__parami in MonotCubicInterpolator_C_ACLiC_dict.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in <ACLiC>: Compilation failed!
>>>

The reason I am asking here on MacPorts Users is because when I turn on verbose mode (by adding -v in the compiler option string inside ROOT), I get this output:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: arch_failure.log
Type: application/octet-stream
Size: 4414 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20131018/9ab6dc8c/attachment.obj>
-------------- next part --------------


Apparently clang is looking in /usr/include/c++ directories, but AFAIK since I am using a MacPorts-supplied clang, it should come with its own include directories, no?  Is the failure coming from a badly configured clang compile+link stage?  I've been getting this "ld: symbol(s) not found for architecture x86_64" error a lot lately, and I have not been able to figure out the source of the problem.

Thanks for any help.

Note: I also manually added -std=c++11 to the compiler option strings in order to silence some warnings, but the errors are the same without it.

Jean-Fran?ois


More information about the macports-users mailing list