Error installing ROOT 6.10.04

Good evening,
I am new with this and I am trying to install Root version 6.10.04 with the app Ubuntu 18.04 for Windows. I am doing it with the source file and it gets stuck while building Root with cmake command.
I tried it using 3 cores, then 4 cores and finally with 2 cores (I haver four in my computer) and the error appears at different % but it gets stuck anyway.
(This is the tutorial I am following, if it helps in knowing what I’m doing wrong:

Following I copy the compiler message from the point where it starts having troubles:

[ 60%] Built target clangAST
[ 61%] Built target clangSema
[ 61%] Building CXX object interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CGOpenMPRuntime.cpp.o
[ 62%] Built target clangAnalysis
[ 62%] Built target clangEdit
[ 62%] Built target clangDriver
[ 62%] Built target clangSerialization
[ 63%] Built target clangFrontend
[ 63%] Built target obj.clingUtils
[ 64%] Built target obj.clingInterpreter
[ 64%] Built target obj.clingMetaProcessor
[ 65%] Built target LLVMCore
[ 65%] Built target LLVMX86CodeGen
[ 65%] Built target LLVMX86AsmParser
[ 65%] Built target LLVMX86Disassembler
[ 65%] Built target LLVMX86AsmPrinter
[ 65%] Built target LLVMX86Desc
Scanning dependencies of target LLVMX86Info
[ 65%] Building CXX object interpreter/llvm/src/lib/Target/X86/TargetInfo/CMakeFiles/LLVMX86Info.dir/X86TargetInfo.cpp.o
[ 65%] Linking CXX static library …/…/…/libLLVMX86Info.a
[ 65%] Built target LLVMX86Info
Scanning dependencies of target LLVMX86Utils
[ 66%] Building CXX object interpreter/llvm/src/lib/Target/X86/Utils/CMakeFiles/LLVMX86Utils.dir/X86ShuffleDecode.cpp.o
/mnt/c/root-6.10.04/root-6.10.04/interpreter/llvm/src/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
/mnt/c/root-6.10.04/root-6.10.04/interpreter/llvm/src/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6078:55: error: lambda parameter ‘CGF’ previously declared as a capture
6078 | &NumOfPtrs](CodeGenFunction &CGF, PrePostActionTy &) {
| ~~~~~~~~~~~~~~~^
/mnt/c/root-6.10.04/root-6.10.04/interpreter/llvm/src/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
/mnt/c/root-6.10.04/root-6.10.04/interpreter/llvm/src/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6126:53: error: lambda parameter ‘CGF’ previously declared as a capture
6126 | &NumOfPtrs](CodeGenFunction &CGF, PrePostActionTy &) {
| ~~~~~~~~~~~~~~~^
/mnt/c/root-6.10.04/root-6.10.04/interpreter/llvm/src/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
/mnt/c/root-6.10.04/root-6.10.04/interpreter/llvm/src/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6191:56: error: lambda parameter ‘CGF’ previously declared as a capture
6191 | auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {
| ~~~~~~~~~~~~~~~^
[ 66%] Linking CXX static library …/…/…/libLLVMX86Utils.a
[ 66%] Built target LLVMX86Utils
Scanning dependencies of target clingUtils
[ 66%] Linking CXX static library …/…/…/llvm/src/lib/libclingUtils.a
[ 66%] Built target clingUtils
Scanning dependencies of target clingInterpreter
[ 67%] Linking CXX static library …/…/…/llvm/src/lib/libclingInterpreter.a
[ 67%] Built target clingInterpreter
Scanning dependencies of target clingMetaProcessor
[ 67%] Linking CXX static library …/…/…/llvm/src/lib/libclingMetaProcessor.a
[ 67%] Built target clingMetaProcessor
Scanning dependencies of target CLING
make[2]: *** [interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/build.make:427: interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CGOpenMPRuntime.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:10095: interpreter/llvm/src/tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 67%] Built target CLING
make: *** [Makefile:152: all] Error 2

Any help is welcome!

Welcome to the ROOT Forum!
Did you try to search the forum for WSL? You could find some useful information. And AFAIK, WSL id a regular Ubuntu, so you might also search the forum for the same kind of error
I have not much experience with WSL (I build ROOT natively on Windows), but I could try next week, whenever I find some time


it looks like you are running into this issue:

It was fixed quite a while ago in Clang upstream and also in ROOT. So a few questions first:
  • Is there a specific reason you want to use a specific old ROOT release? This is fixed in recent versions.
  • Are you sure you want to compile ROOT from scratch? You may also use a binary version in WSL (one compiled for regular Ubuntu) which is much easier unless you have special needs (e.g. develop on ROOT yourself).

I tried to install this version because some years ago is the one I worked with in another project in which another person installed it for me.
I have installed the last version in binary distribution and I think it works quite okey now.
Just one error appears when initiating root: ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!. Do you know what it may be caused by and how can I solve it? Thank you!

That’s good news :smile:. I’d always recommend starting with a more recent version when possible, usually many bugs are squashed and especially when it comes to new OS compatibility, new releases are essential. And if you can use the binary version, that saves a lot of work and CPU time.

The error message should also show some part after (invoking ....). Can you check what happens when you run this command manually?
On Linux, the issue is usually caused by missing gcc / g++ (they are used to find the system include paths for the interpreter). If you do not have them installed, apt install build-essential should do the trick and also give you other needed things for building applications around ROOT.