Dear Root Experts and others,
I have been encountering similar problems since I have switched to OSX 10.9. Following the git-clone suggestions above for compiling root itself worked for me as well. However, I am deeply concerned by my incapiblity of getting the binary versions of root to work on my system.
I initally thought the problem came from a faulty installation of xcode command line tools but seems all tools are there /Library/Developer/CommandLineTools. Just to report that the command “xcode-select --install” did not work for me (I get a message saying the files are not on the server…) and I had to retrieve the .dmg manually from apple developer server. Even ended up making a clean install of Mavericks, Xcode and associated command-line tools.
Once the latest binary version of root retrieved and “. /root/bin/thisroot.sh” added to my .profile, I misrably fail to compile any code with the root interpreter :
[code].L TestFitting.cxx++
Info in TUnixSystem::ACLiC: creating shared library /Users/psaouter/Desktop/TestRootCompil/./TestFitting_cxx.so
RooFit v3.54 – Developed by Wouter Verkerke and David Kirkby
Copyright © 2000-2012 NIKHEF, University of California & Stanford University
All rights reserved, please read http://roofit.sourceforge.net/license.txt
Undefined symbols for architecture x86_64:
“std::__1::locale::use_facet(std::__1::locale::id&) const”, referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::ios_base::getloc() const", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::__init(unsigned long, char)", referenced from:
std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in TestFitting_cxx_ACLiC_dict.o
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::~basic_string()", referenced from:
std::__1::ostreambuf_iterator<char, std::__1::char_traits > std::__1::__pad_and_output<char, std::__1::char_traits >(std::__1::ostreambuf_iterator<char, std::__1::char_traits >, char const*, char const*, char const*, std::__1::ios_base&, char) in TestFitting_cxx_ACLiC_dict.o
"std::__1::basic_ostream<char, std::__1::char_traits >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits >&)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::basic_ostream<char, std::__1::char_traits >::sentry::~sentry()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::basic_ostream<char, std::__1::char_traits >::operator<<(double)", referenced from:
SetRigBinning() in TestFitting_cxx_ACLiC_dict.o
TestFitting() in TestFitting_cxx_ACLiC_dict.o
"std::__1::basic_ostream<char, std::__1::char_traits >::operator<<(int)", referenced from:
SetRigBinning() in TestFitting_cxx_ACLiC_dict.o
TestFitting() in TestFitting_cxx_ACLiC_dict.o
"std::__1::cout", referenced from:
SetRigBinning() in TestFitting_cxx_ACLiC_dict.o
TestFitting() in TestFitting_cxx_ACLiC_dict.o
"std::__1::ctype::id", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::locale::~locale()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_ACLiC_dict.o
"std::__1::ios_base::clear(unsigned int)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits >& std::__1::operator<<<std::__1::char_traits >(std::__1::basic_ostream<char, std::__1::char_traits >&, char const*) in TestFitting_cxx_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!
[/code]
I undestand the message “Undefined symbols for architecture x86_64” relates to the problem discuss in previous posts of this thread related to the fact OS X compiler (clang) uses libc++ instead of libstdc++. I have however failed to solve the problem. I tried setting explicitely CXX flag to use clang++ but did not work. Several collegues working on the exact same system had no issues running root properly after Mavericks install (without any special flag declaration). Only difference we could find is related to the famous xcode-select --install command which did not work for me. From above posts and many threads on the net, seems people are systematically solving their issues with “xcode-select --install”. But I really don’t see what should change with executing the dmg by hand…?
I am getting desperate on this problem. Any help would be really appreciated, event if it makes this thread quite redundant… :-/
Pierre