UPDATE!!! (see below)****************************
I have recently updated to ROOT v6.0.0 on my MacBookPro. Here is some useful, hopefully, information:
-Running Mac OSX 10.9.3
-I downloaded the following binaries from the Root webpage: OSX 10.9 x86-64 with clang 5.1, version 6.00.00 (109 MB).
-I used the ./configure method to configure Root with the “macosx” architecture and the flag “–all”.
For my code, I use CMake to create an executable and then run that executable. In my CMake file I have:
For the CMake file in my src directory, I have linked the target output with the following libraries:
When I run cmake, the configuration and all the compiler checks works fine. However, when I run make I get errors like:
Scanning dependencies of target GetThresholds.exe
[100%] Building CXX object src/CMakeFiles/GetThresholds.exe.dir/GetThresholds.cxx.o
Linking CXX executable …/…/exe/GetThresholds.exe
Undefined symbols for architecture x86_64:
“std::string::c_str() const”, referenced from:
gt_data_writer(std::basic_stringstream<char, std::char_traits, std::allocator >&, std::basic_stringstream<char, std::char_traits, std::allocator >&) in GetThresholds.cxx.o
get_thresholds(std::string) in GetThresholds.cxx.o
scaler_and_fft(std::string) in GetThresholds.cxx.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** […/exe/GetThresholds.exe] Error 1
make: *** [src/CMakeFiles/GetThresholds.exe.dir/all] Error 2
make: *** [all] Error 2
I am not sure if this error is coming from how I link things using CMake or if they are coming from ROOT or something completely different. My question is, how do I correct these errors? If more information is needed, please let me know. If others would like to see the entire error output, I will be happy to post it.
It appears I was linking the incorrect directories in the CMake file. I have since fixed this issue. Now, I get an interesting problem. I run cmake then make to produce the executable just fine. When I run the executable, the macro starts, I get an error, but the macro keeps running and finishes. The macro successfully writes out to all the files and makes all the histograms. The error that I now get is:
Error in UnknownClass::InitInterpreter(): LLVM SYMBOLS ARE EXPOSED TO CLING! This will cause problems; please hide them or dlopen() them after the call to TROOT::InitInterpreter()!
I have never run into this before and am not sure what it means. Any help is much appreciated.