root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.67k stars 1.27k forks source link

Many broken tests after recent Clang update on CentOS 8 Stream #11601

Open hahnjo opened 2 years ago

hahnjo commented 2 years ago

After updating to clang-14.0.6-1.module_el8.7.0+1198+0c3eb6e2.x86_64, many tests started failing when compiling ROOT with Clang (134 tests in my configuration). The reason seems to be that Clang is now built with GCC_INSTALL_PREFIX=/opt/rh/gcc-toolset-12/root/usr to detect and use libstdc++ from GCC 12. Even if that was not the case, https://github.com/llvm/llvm-project/commit/35aaf548237a4f213ba9d95de53b33c5ce1eadce in Clang 15 will have a similar effect for people building the compiler from source.

According to our own documentation, ROOT does not guarantee "compatibility with compilers shipped with devtoolsets on CentOS or Red Hat" which right now only leaves building with the system-default GCC 8.5 to get a fully working installation of ROOT.

hahnjo commented 2 years ago

FWIW many of the failures are due to

root [0] std::string_view sv;
root [1] (std::string) sv;
IncrementalExecutor::executeFunction: symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12__sv_wrapperC1ESt17basic_string_viewIcS2_E' unresolved while linking [cling interface function]!
You are probably missing the definition of std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::__sv_wrapper::__sv_wrapper(std::basic_string_view<char, std::char_traits<char> >)
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17_S_to_string_viewESt17basic_string_viewIcS2_E' unresolved while linking [cling interface function]!
You are probably missing the definition of std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_to_string_view(std::basic_string_view<char, std::char_traits<char> >)
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ENS4_12__sv_wrapperERKS3_' unresolved while linking [cling interface function]!
You are probably missing the definition of 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> >::__sv_wrapper, std::allocator<char> const&)
Maybe you need to load the corresponding shared library?
hahnjo commented 2 years ago

As a workaround, cmake -DCLING_CXX_PATH=/usr/bin/g++ seems to work. I would have loved to add this as a tweak to the build system, but we have to address https://github.com/root-project/root/issues/11612 first...

dpiparo commented 8 months ago

Sorry for coming back to this after all these months: but is this still relevant?

hahnjo commented 8 months ago

Yes, the workaround is still needed for all Clang builds on EL8 (see for example also the ASan build configuration)