I am running ROOT 6.17/01 on MacOS Sierra v10.12.6. I am attempting to compile a .cpp file (attached) which encodes a custom fit-shape. But ROOT throws the following error:
Undefined symbols for architecture x86_64:
“ROOT::Math::cyl_bessel_k(double, double)”, referenced from:
BK2(double, double) in RooHypatia2_cpp_ACLiC_dict.o
LnBK2(double, double) in RooHypatia2_cpp_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 : Compilation failed!
On browsing through previous similar posts in the ROOT forum, I feel like it might be related to the MathMore library, but am unable to diagnose beyond that. I can libMathMore in my ROOT lib folder.
In case it is useful, my ROOT build command was the following:
cmake -Dall=ON -Dimt=ON -DPYTHON_EXECUTABLE=/Users/Arvind/anaconda2/bin/python -DPYTHON_INCLUDE_DIR=/Users/Arvind/anaconda2/include/python2.7 -DPYTHON_LIBRARY=/Users/Arvind/anaconda2/lib/libpython2.7.dylib …/root
Does anyone have any idea on how to fix this? I would appreciate any advice.
Undefined symbols for architecture x86_64:
“ROOT::Math::cyl_bessel_k(double, double)”, referenced from:
BK2(double, double) in RooHypatia2_cpp_ACLiC_dict.o
LnBK2(double, double) in RooHypatia2_cpp_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 : Compilation failed!
I see this error when I compile it on my laptop. But when I try to compile it on my research groups cluster, then I see no error. This tells me it might be an environment issue of some sort…