Installing Root on POP-OS 22.04

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.27.01
Platform: linuxx8664gcc
Compiler: gcc11.2.0
CUDA Version: 11.7

I am trying to compile the aforementioned ROOT version on my rig that has the following specs:
CPU: 12th Gen Intel i9-12900F (24) @ 5.100GHz
GPU: NVIDIA GeForce RTX 3090 (24GB)
The nvidia-smi output is:

| NVIDIA-SMI 515.48.07    Driver Version: 515.48.07    CUDA Version: 11.7     |
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| 30%   28C    P8    13W / 350W |    181MiB / 24576MiB |      0%      Default |
|                               |                      |                  N/A |

My cmake flags are:

CC=/usr/bin/gcc-11 CXX=/usr/bin/g++-11  CUDACXX=/usr/local/cuda-11/bin/nvcc cmake -DCMAKE_CXX_STANDARD=17  -DPython3_EXECUTABLE=/usr/bin/python3 -Dimt=ON -Dcuda=ON  -Droofit=ON -Dminuit2=ON  -Dgvis=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda-11.7/bin/nvcc DCMAKE_CUDA_RUNTIME_LIBRARY=/usr/local/cuda-11/lib64  -DCMAKE_CUDA_STANDARD=14  -Dtmva-pymva=On -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/root ..

However, I am facing an error that I am unable to resolve in the make step make -j$(nproc):

In file included from /usr/local/root/tmva/tmva/src/DNN/Architectures/
/usr/local/root/compile/ginclude/RConfigure.h:30:4: warning: #warning "The C++ standard in this build does not match ROOT configuration (201703L); this might cause unexpected issues" [-Wcpp]
   30 | #  warning "The C++ standard in this build does not match ROOT configuration (201703L); this might cause unexpected issues"
      |    ^~~~~~~
[ 95%] Building CXX object tmva/tmva/CMakeFiles/TMVA.dir/src/DNN/Architectures/Cuda/CudaBuffers.cxx.o
In file included from /usr/local/root/tmva/tmva/src/DNN/Architectures/
/usr/local/root/tmva/tmva/inc/TMVA/DNN/Architectures/Cuda.h:28:10: fatal error: /usr/local/cuda-11.7/bin/../targets/x86_64-linux/include/cuda.h: Too many levels of symbolic links
   28 | #include "cuda.h"

I had to enable c++ std-17 as root7 complains otherwise and doesn’t accept std-11 or std-14. I tried a few other cmake flag variations, but they don’t seem to work as well. I have all the primarily recommended Ubuntu packages installed for root installation.

Here’s the cmake log:

sammy@gpurig2:/usr/local/root/compile$ CC=/usr/bin/gcc-11 CXX=/usr/bin/g++-11  CUDACXX=/usr/local/cuda-11/bin/nvcc cmake -DCMAKE_CXX_STANDARD=17  -DPython3_EXECUTABLE=/usr/bin/python3 -Dimt=ON -Dcuda=ON  -Droofit=ON -Dminuit2=ON  -Dgvis=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda-11.7/bin/nvcc DCMAKE_CUDA_RUNTIME_LIBRARY=/usr/local/cuda-11/lib64  -DCMAKE_CUDA_STANDARD=14  -Dtmva-pymva=On -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/root ..
-- Detected ROOT_VERSION 6.27.01
-- Checking internet connectivity...
-- Yes
-- Looking for Python
-- Could NOT find Python2 (missing: Python2_EXECUTABLE Python2_INCLUDE_DIRS Python2_LIBRARIES Python2_NumPy_INCLUDE_DIRS Interpreter Development NumPy Development.Module Development.Embed)
-- Found GCC. Major version 11, minor version 2
-- ROOT Platform: linux
-- ROOT Compiler: GNU 11.2.0
-- ROOT Processor: x86_64
-- ROOT Architecture: linuxx8664gcc
-- Build Type: 'Release' (flags = '-O3 -DNDEBUG')
-- Compiler Flags:  -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O3 -DNDEBUG
-- ROOT default compression algorithm: zlib
-- PyROOT will be built for version 3.10.4
-- Looking for ZLib
-- Looking for Freetype
-- Looking for PCRE
-- Building LZMA version 5.2.4 included in ROOT itself
-- Looking for ZSTD
-- Looking for X11
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
-- Building AfterImage library included in ROOT itself
-- Looking for GSL
-- Looking for OpenGL
-- Looking for LibXml2
-- Looking for MySQL
-- Looking for FFTW3
-- Downloading and building XROOTD version 5.4.3
-- Looking for TBB
-- Looking for BLAS for optional parts of TMVA
-- Building LLVM in 'Release' mode.
-- Could NOT find Z3: Found unsuitable version "0.0.0", but required is at least "4.7.1" (found Z3_LIBRARIES-NOTFOUND)
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- Linker detection: GNU ld
-- Targeting X86
-- Targeting NVPTX
-- Clang version: 9.0.1
-- Cling version (from VERSION file): ROOT_1.0~dev
-- Cling will look for C++ headers in '/usr/include/c++/11:/usr/include/x86_64-linux-gnu/c++/11:/usr/include/c++/11/backward' at runtime.
-- And then fallback to: 'x86_64-linux-gnu-g++-11'
-- Use SSL API VERSION 3.0 for civetweb
-- cuDNN not found or disabled - use only Cuda+Cublas for TMVA Deep Learning on GPU
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Success
/tmp/tmpxft_000808b1_00000000-1_stdin: In function 'int main()':
/tmp/tmpxft_000808b1_00000000-1_stdin:2:50: error: 'string_view' is not a member of 'std'
    2 | int main() { char arr[3] = {'B', 'a', 'r'}; std::string_view strv(arr, sizeof(arr)); return 0;}
      |                                                  ^~~~~~~~~~~
/tmp/tmpxft_000808b1_00000000-1_stdin:2:50: note: 'std::string_view' is only available from C++17 onwards
-- Performing Test found_stod_stringview
-- Performing Test found_stod_stringview - Failed
-- Performing Test found_stdapply
-- Performing Test found_stdapply - Success
-- Performing Test found_stdinvoke
-- Performing Test found_stdinvoke - Success
-- Performing Test found_stdindexsequence
-- Performing Test found_stdindexsequence - Success
-- ROOT Configuration

System          Linux-5.17.5-76051705-generic
Processor       16 core 12th Gen Intel(R) Core(TM) i9-12900F (x86_64)
Build type      Release
Install path    /usr/local/root
Compiler        GNU 11.2.0
Compiler flags:
C                -Wno-implicit-fallthrough -pipe -Wall -W -pthread -O3 -DNDEBUG
C++              -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O3 -DNDEBUG
Linker flags:
Executable       -rdynamic
Shared           -Wl,--no-undefined -Wl,--hash-style="both"

-- Enabled support for:  asimage builtin_afterimage builtin_clang builtin_cling builtin_gl2ps builtin_glew builtin_llvm builtin_lz4 builtin_lzma builtin_nlohmannjson builtin_openui5 builtin_vdt builtin_xrootd builtin_xxhash clad cuda dataframe exceptions fftw3 gdml http imt mathmore mlp minuit2 mysql opengl pyroot roofit webgui root7 rpath runtime_cxxmodules shared ssl tmva tmva-cpu tmva-gpu tmva-pymva spectrum vdt x11 xml xrootd
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/root/compile

Any leads on resolving this error is appreciated.

Hi @sammy ,

can you please build with make VERBOSE=1 and post the verbose build log? That will include the exact compilation commands that are being issued so we can see where the mismatch comes from.


Try with CMAKE_CUDA_STANDARD == CMAKE_CXX_STANDARD (i.e. both at C++17), not with C++17 for CPU and C++14 for CUDA as you are trying now.

1 Like

@eguiraud Will do : ) Meanwhile let’s see if @amadio 's suggestion works. Somehow I thought CMAKE_CUDA_STANDARD was different from c++ standard after trying both at 17 and the system wasn’t accepting the CUDA std as 17. Few other packages have been installed meanwhile, so I’ll reboot the system and start the build again.

So here’s what I finally gather after trying the suggestion here as well as from the other searches, but can’t say with full confidence: CUDA wouldn’t work with gcc-11.2 in ROOT installation because gcc-11.2 not supported, discussion threads frequently asked people to downgrade gcc (I got that error one time and was unable to reproduce it. NVIDIA has also confirmed, if the forum I saw is to be believed, that there’s a bug while using gcc-11 with cudnn and cuda). Using gcc-9 or gcc-10 just throws up multiple errors, which I believe is coming from incompatibility.

Hi @sammy ,

thank you for the follow up. @moneta has experience building ROOT with CUDA support, let’s ping him: what combination of compilers and C++ standards are known to work?

If you are using the latest CUDA 11.7 it should work with gcc11.2, see

In case you have problem with the CUDA_STANDARD compatibility, for compiling ROOT you don’t need to use a high CUDA_STANDARD, you can try with 14.
For me using this has worked:



1 Like

Thanks Lorenzo, I’ll try your suggestion.

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