Unable to build ROOT in ubuntu 18.04.4 LTS?

I have a 4GB RAM and my cmake version is 3.17.3. The default python version used by ROOT is 2.7.17.
Commands used:

  1. For building ROOT:
    cmake -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" -Dcxx14=“ON” -Dall=“ON” -Ddavix> -Dbuiltin_ftgl=“OFF” -Dbuiltin_glew=“OFF” -Dsoversion=“ON” /home/uroojmurtaza/Downloads/Pyroot/root
    where /home/uroojmurtaza/Downloads/Pyroot/root is the path to source.

  2. For checking the build:
    “cmake --build .” and I have also tried the command “cmake --build . -j 1”

I have been trying to build root but it keeps displaying this error “/home/uroojmurtaza/Downloads/Pyroot/new-build/include/module.modulemap:20:42: error: header ‘RConfigure.h’ not found” at the “cmake --build . -j 1” command. I have checked the file and it exists inside the dconfig folder. I am attaching the error down below. I have also updated cmake but even that doesnt help. I have also noticed that the number of files build, varies from 59 to 63 each time I try to start from scratch. This is my first time working with ROOT and its very important for my project so any help will be appreciated.

ERROR at command “cmake --build . -j 1”

"Scanning dependencies of target Unix
[ 45%] Building CXX object core/unix/CMakeFiles/Unix.dir/src/TUnixSystem.cxx.o
[ 45%] Built target Unix
[ 45%] Generating G__Core.cxx, …/lib/Core.pcm
/home/uroojmurtaza/Downloads/Pyroot/build-root/include/module.modulemap:20:42: error: header ‘RConfigure.h’ not found
module “RConfigure.h” { textual header “RConfigure.h” export * }
^
/home/uroojmurtaza/Downloads/Pyroot/build-root/include/RtypesCore.h:25:10: note: submodule of top-level module ‘ROOT_Config’ implicitly imported here
#include “DllImport.h”
^
/home/uroojmurtaza/Downloads/Pyroot/build-root/include/RtypesCore.h:117:1: error: unknown type name ‘R__EXTERN’
R__EXTERN Int_t gDebug;
^
/home/uroojmurtaza/Downloads/Pyroot/build-root/include/RtypesCore.h:117:16: error: expected ‘;’ after top level declarator
R__EXTERN Int_t gDebug;
^
;
In file included from input_line_5:1:
/home/uroojmurtaza/Downloads/Pyroot/build-root/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/uroojmurtaza/Downloads/Pyroot/build-root/include/Rtypes.h:26:
In file included from <module-includes>:1:
/home/uroojmurtaza/Downloads/Pyroot/build-root/include/ThreadLocalStorage.h:61: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/uroojmurtaza/Downloads/Pyroot/build-root/include/Rtypes.h:193:
In file included from <module-includes>:5:
/home/uroojmurtaza/Downloads/Pyroot/build-root/include/TIsAProxy.h:16:10: fatal error: could not build module 'ROOT_Rtypes'
#include "RtypesCore.h"
~~~~~~~~^~~~~~~~~~~~~~
Error: Error loading the default header files.
core/CMakeFiles/G__Core.dir/build.make:455: recipe for target 'core/G__Core.cxx' failed
make[2]: *** [core/G__Core.cxx] Error 1
CMakeFiles/Makefile2:16329: recipe for target 'core/CMakeFiles/G__Core.dir/all' failed
make[1]: *** [core/CMakeFiles/G__Core.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2"

@Urooj_Murtaza, which version of ROOT are you using?

Root version is 6.23.01

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

Hi,
in case this is still a problem, this bug, which I think is what you encountered, has been fixed in master and in the v6-22-00-patches branch.

Cheers,
Enrico

1 Like

This topic was automatically closed after 4 days. New replies are no longer allowed.