Problem installing ROOT 6.28.04 from source on Fedora 38

I am trying to build and install the latest ROOT from the ROOT homepage’s tarred zipped source. I have done this previously many times over many versions. The commands I use are:

cmake -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=/home/jmcfee/root/root-6.28.04-install /home/jmcfee/root/root-6.28.04
cmake --build . – install -j8

The first command seems to work OK, with no errors or obvious problems. The second compiles and links up to 70% completion. I then get a series of errors related to building the std module. As a newcomer, I apparently cannot upload the output. So I have put a small portion of that output at the end of this post.

This should be a straightforward build, since I am doing nothing special regarding options. I am stuck as to what to do. Can anyone tell me what to do?

Thanks for any help.

ROOT Version: 6.28.04
Platform: Fedora 38 Linux kernel 6.2.15-300.fc38.x86_64 fully updated
Compiler: gcc 13.1.1

Some build output near the start of the errors:

[ 79%] Built target rootcling_stage1
[ 79%] Generating G__Core.cxx, ../lib/Core.pcm
[ 79%] Built target Cling
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:52:
In file included from /usr/include/c++/13/memory_resource:60:
In file included from /usr/include/c++/13/bits/memory_resource.h:46:
/usr/include/c++/13/bits/utility.h:219:27: error: redefinition of '__is_in_place_type_v<in_place_type_t<_Tp>>'
    inline constexpr bool __is_in_place_type_v<in_place_type_t<_Tp>> = true;
                          ^
/usr/include/c++/13/bits/stl_pair.h:62:11: note: '/usr/include/c++/13/bits/utility.h' included multiple times, additional include site in header from module 'std.bits/stl_pair.h'
# include <bits/utility.h> // for std::tuple_element, std::tuple_size
          ^
/home/jmcfee/root/root-6.28.04-build/etc/cling/std.modulemap:505:10: note: std.bits/stl_pair.h defined here
  module "bits/stl_pair.h" {
         ^
/usr/include/c++/13/bits/memory_resource.h:46:11: note: '/usr/include/c++/13/bits/utility.h' included multiple times, additional include site in header from module 'std.memory_resource'
# include <bits/utility.h>              // index_sequence
          ^
/home/jmcfee/root/root-6.28.04-build/etc/cling/std.modulemap:257:10: note: std.memory_resource defined here
  module "memory_resource" [optional] {
         ^
input_line_1:1:10: fatal error: could not build module 'std'
#include <new>
 ~~~~~~~~^
Warning in cling::IncrementalParser::CheckABICompatibility():
  Failed to extract C++ standard library version.
While building module 'Core':
While building module 'Cling_Runtime' imported from input_line_2:1:
While building module 'Cling_Runtime_Extra' imported from /home/jmcfee/root/root-6.28.04-build/etc/cling/Interpreter/RuntimeUniverse.h:27:
In file included from <module-includes>:1:
/home/jmcfee/root/root-6.28.04-build/etc/cling/Interpreter/DynamicExprInfo.h:13:10: fatal error: could not build module 'std'
#include <string>
 ~~~~~~~~^
/home/jmcfee/root/root-6.28.04-build/etc/cling/Interpreter/RuntimeUniverse.h:27:10: fatal error: could not build module 'Cling_Runtime_Extra'
#include "cling/Interpreter/Visibility.h"
 ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
While building module 'Core':
While building module 'ROOT_Rtypes' imported from /home/jmcfee/root/root-6.28.04-build/include/Rtypes.h:23:
In file included from <module-includes>:1:
/home/jmcfee/root/root-6.28.04-build/include/RtypesCore.h:28:10: fatal error: could not build module 'std'
#include <cstddef> // size_t, NULL
 ~~~~~~~~^
In file included from input_line_3:2:
/home/jmcfee/root/root-6.28.04-build/include/Rtypes.h:23:10: fatal error: could not build module 'ROOT_Rtypes'
#include "RtypesCore.h"
 ~~~~~~~~^~~~~~~~~~~~~~
While building module 'Core':
While building module 'ROOT_Foundation_C' imported from /home/jmcfee/root/root-6.28.04-build/include/Rtypes.h:29:
In file included from <module-includes>:1:
/home/jmcfee/root/root-6.28.04-build/include/ThreadLocalStorage.h:60:10: fatal error: could not build module 'ROOT_Rtypes'
#include "RtypesCore.h"
 ~~~~~~~~^~~~~~~~~~~~~~
While building module 'Core':
While building module 'ROOT_Foundation_Stage1_NoRTTI' imported from /home/jmcfee/root/root-6.28.04-build/include/Rtypes.h:195:
In file included from <module-includes>:2:
/home/jmcfee/root/root-6.28.04-build/include/ROOT/RStringView.hxx:25:10: fatal error: could not build module 'std'
#include <string_view>
 ~~~~~~~~^
Error: Error loading the default rootcling header files.
gmake[2]: *** [core/CMakeFiles/G__Core.dir/build.make:476: core/G__Core.cxx] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:31651: core/CMakeFiles/G__Core.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
[jmcfee@upstairs root-6.28.04-build]$ 


Oh bummer. Thanks for sharing.

The rest is not for you @John_Mcfee to do anything, but just so you know what’s happening “behind the scenes”:
@vvassilev FYI - do you know which commit we’re missing? I will backport the new CI to 6-28, too, so you get a chance to see this / validate the fix. Can you already take a look, @vvassilev ? I’ll keep you posted on the CI.

Hi. Please forgive my ignorance. Does this mean that this problem has been reported as a bug? Or should I report it as a bug? Thanks.

We’re working on fixing it. Does Fix std.modulemap for gcc13 by hahnjo · Pull Request #12901 · root-project/root · GitHub fix it for you?

This appears to have fixed the problem. With the modification, Root compiled and installed. I ran a test program and it worked.
Thank you very much.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.