Closed rkelmar closed 4 years ago
Apparently, this is a bug resulting from incompatibilities with the root version 6.14. due to the TString::TString(std::string const&) method.
Workaround: use an older root version.
TODO: Fix incompatibility with root 6.14.
It seems like the problem is fixed by explicitly setting the CXX compiler for Cmake to g++ instead of gcc in the CMakeLists.txt files.
Problem should be solved now.
When I run build.sh on Linux system I get the error
Linking CXX executable sapphire CMakeFiles/sapphire.dir/Modules/Module_OldSapphire.cpp.o: In function, std::allocator >::compare(unsigned long, unsigned long, char const, unsigned long) const@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to cxx11::basic_stringstream<char, std::char_traits, std::allocator >@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to , std::allocator >::find_first_not_of(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libHist.so: undefined reference to `std:: cxx11::basic_string<char, std::char_traits, std::allocator >::assign(char const)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libGraf.so: undefined reference to , std::allocator >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to `std:: cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string()@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libtbb.so.2: undefined reference to , std::allocator >::_M_erase(unsigned long, unsigned long)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libRIO.so: undefined reference to , std::allocator >::find_last_not_of(char const , unsigned long, unsigned long) const@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to , std::allocator >::_M_assign(std:: cxx11::basic_string<char, std::char_traits, std::allocator > const&)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libRIO.so: undefined reference to , std::allocator >::append(char const)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to , std::allocator >::compare(char const ) const@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libROOTDataFrame.so: undefined reference to `std::runtime_error::runtime_error(std:: cxx11::basic_string<char, std::char_traits, std::allocator > const&)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to , std::allocator >::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libHist.so: undefined reference to cxx11::basic_string<char, std::char_traits, std::allocator >::_M_construct(unsigned long, char)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to , std::allocator > const&)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libRIO.so: undefined reference to , std::allocator >::_M_replace(unsigned long, unsigned long, wchar_t const, unsigned long)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libtbb.so.2: undefined reference to `std::__exception_ptr::exception_ptr::exception_ptr(void)@CXXABI_1.3.11'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to cxx11::basic_istringstream<char, std::char_traits, std::allocator >@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to , std::allocator >::reserve(unsigned long)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to cxx11::basic_string<char, std::char_traits, std::allocator >::push_back(char)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to , std::allocator >::_M_construct(unsigned long, wchar_t)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to cxx11::basic_istringstream<char, std::char_traits, std::allocator >::~basic_istringstream()@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to , std::allocator >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to cxx11::basic_string<char, std::char_traits, std::allocator >::operator=(std::cxx11::basic_string<char, std::char_traits, std::allocator >&&)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libRIO.so: undefined reference to cxx11::basic_string<char, std::char_traits, std::allocator >::_M_replace(unsigned long, unsigned long, char const, unsigned long)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to , std::allocator >@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libtbb.so.2: undefined reference to `std::range_error::range_error(char const )@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libRIO.so: undefined reference to , std::allocator >::str(std:: cxx11::basic_string<char, std::char_traits, std::allocator > const&)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to , std::allocator >::_M_sync(char, unsigned long, unsigned long)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits, std::allocator >::find_first_of(char const , unsigned long, unsigned long) const@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to `std:: cxx11::basic_ostringstream<char, std::char_traits, std::allocator >::~basic_ostringstream()@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to , std::allocator >::swap(std:: cxx11::basic_string<char, std::char_traits, std::allocator >&)@GLIBCXX_3.4.21'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libtbb.so.2: undefined reference to `operator delete[](void , unsigned long)@CXXABI_1.3.9'
/afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to , std::allocator >::str() const@GLIBCXX_3.4.21'
collect2: error: ld returned 1 exit status
make[2]: [src/sapphire] Error 1
make[1]: [src/CMakeFiles/sapphire.dir/all] Error 2
make: *** [all] Error 2
Module_OldSapphire::parseCommandLineForDecay(std::vector<std::string, std::allocator<std::string> >&, int&, int&, double&, int&, double&, double&, int&)': Module_OldSapphire.cpp:(.text+0x513f): undefined reference to
TString::TString(std::string const&)' Module_OldSapphire.cpp:(.text+0x5242): undefined reference toTString::TString(std::string const&)' Module_OldSapphire.cpp:(.text+0x52de): undefined reference to
TString::TString(std::string const&)' Module_OldSapphire.cpp:(.text+0x5587): undefined reference toTString::TString(std::string const&)' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::cxx11::basic_string<char, std::char_traitsstd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(unsigned long, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libtbb.so.2: undefined reference to
std::length_error::length_error(char const)@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libGraf.so: undefined reference tostd::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_M_mutate(unsigned long, unsigned long, wchar_t const*, unsigned long)@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
VTT for std::std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libTreePlayer.so: undefined reference to
std::cxx11::basic_string<char, std::char_traitsstd::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_M_assign(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libGraf.so: undefined reference to
std::cxx11::basic_string<wchar_t, std::char_traits__cxa_init_primary_exception@CXXABI_1.3.11' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::__cxx11::basic_string<char, std::char_traitstypeinfo for std::thread::_State@GLIBCXX_3.4.22' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libTreePlayer.so: undefined reference to
std::__cxx11::basic_string<char, std::char_traitsstd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::cxx11::basic_string<char, std::char_traitsstd::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())@GLIBCXX_3.4.22' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libRIO.so: undefined reference to
std::thread::_State::~_State()@GLIBCXX_3.4.22' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libHist.so: undefined reference tostd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::rfind(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::cxx11::basic_string<char, std::char_traitsstd::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::__cxx11::basic_string<char, std::char_traitsvtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::cxx11::basic_string<char, std::char_traitsstd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::rfind(char, unsigned long) const@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, unsigned long)@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
cxa_throw_bad_array_new_length@CXXABI_1.3.8' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libRIO.so: undefined reference to `std::invalid_argument::invalid_argument(std::cxx11::basic_string<char, std::char_traitsstd::invalid_argument::invalid_argument(char const*)@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libGraf.so: undefined reference to
std::cxx11::basic_string<wchar_t, std::char_traitsstd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(unsigned long, unsigned long, char const*) const@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libROOTDataFrame.so: undefined reference to
VTT for std::std::runtime_error::runtime_error(char const*)@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::cxx11::basic_string<char, std::char_traitsvtable for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::out_of_range::out_of_range(char const*)@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference tostd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::resize(unsigned long, char)@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char, unsigned long) const@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libGraf.so: undefined reference to
std::cxx11::basic_string<wchar_t, std::char_traitsstd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned long, unsigned long) const@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libROOTDataFrame.so: undefined reference to
std::std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_last_of(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::cxx11::basic_string<char, std::char_traitsVTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::std::domain_error::domain_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libROOTDataFrame.so: undefined reference to
vtable for std::__cxx11::basic_istringstream<char, std::char_traitsstd::out_of_range::out_of_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::cxx11::basic_stringbuf<char, std::char_traitsstd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libROOTDataFrame.so: undefined reference to
std::cxx11::basic_stringbuf<char, std::char_traitsstd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libtbb.so.2: undefined reference to
operator delete(void, unsigned long)@CXXABI_1.3.9' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference tostd::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char)@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::cxx11::basic_string<char, std::char_traitsvtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21' /afs/crc.nd.edu/user/n/nsl/nuclear/x86_64_linux_el6/install/root_v6.14.06/lib/libCore.so: undefined reference to
std::__cxx11::basic_stringbuf<char, std::char_traits