So I was building root from source with the following cmake options (setting it to build with the standard set to C++20)
cmake -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/home/jade/bin/root ..
I’ve attached the configuration results (
my-config.txt (14.2 KB))which didn’t have any errors. But about 75% into the build, I get a bunch of compilation errors:
In file included from <module-includes>:1: /home/jade/root/linux-build/etc/cling/Interpreter/RuntimeUniverse.h:27:10: fatal error: could not build module 'Cling_Runtime_Extra' #include "cling/Interpreter/Visibility.h" ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ input_line_2:1:10: fatal error: could not build module 'Cling_Runtime' #include <cling/Interpreter/RuntimeUniverse.h> ~~~~~~~~^ In file included from input_line_3:1: In file included from /home/jade/root/linux-build/etc/cling/lib/clang/13.0.0/include/assert.h:8: In file included from /usr/include/assert.h:35: In file included from /usr/include/features.h:485: /usr/include/x86_64-linux-gnu/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found # include <gnu/stubs-32.h> ... /home/jade/root/linux-build/include/TClassEdit.h:34:10: note: submodule of top-level module 'std' implicitly imported here #include <typeinfo> ^ /home/jade/root/linux-build/include/TClassEdit.h:126:49: error: no type named 'string' in namespace 'std' virtual bool ExistingTypeCheck(const std::string & /*tname*/, ~~~~~^ /home/jade/root/linux-build/include/TClassEdit.h:127:43: error: no type named 'string' in namespace 'std' std::string & /*result*/) = 0; ~~~~~^ /home/jade/root/linux-build/include/TClassEdit.h:128:51: error: no type named 'string' in namespace 'std' virtual void GetPartiallyDesugaredName(std::string & /*nameLong*/) = 0; ~~~~~^ /home/jade/root/linux-build/include/TClassEdit.h:129:63: error: no type named 'string' in namespace 'std' virtual bool IsAlreadyPartiallyDesugaredName(const std::string & /*nondef*/, ~~~~~^ /home/jade/root/linux-build/include/TClassEdit.h:130:63: error: no type named 'string' in namespace 'std' const std::string & /*nameLong*/) = 0;
I’ve attached error log to that shows all the compilation errors(
compile-error.txt (15.2 KB)).
I had initially built root without specifying the C++ standard (which I believe defaulted to C++14) and had no build issues. Is there other cmake options I should be adding to get it build for C++20?
Please fill also the fields below. Note that
root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call
.forum bug from the ROOT prompt to pre-populate a topic.