# ROOT compilation error with TStorage

**URL:** <https://root-forum.cern.ch/t/root-compilation-error-with-tstorage/58703>\
**Category:** TMVA\
**Tags:** root\
**Created:** [March 24, 2024, 3:22pm UTC](https://root-forum.cern.ch/t/root-compilation-error-with-tstorage/58703 "2024-03-24T15:22:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vega](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vega/32/14386_2.png) [@vega](https://root-forum.cern.ch/u/vega)\
**Post date:** [March 24, 2024, 3:22pm UTC](https://root-forum.cern.ch/t/root-compilation-error-with-tstorage/58703/1 "2024-03-24T15:22:05Z")

</div>

Hello ROOT Team,  
Greetings.  
I am facing some issues with ROOT (latest-stable) in Ubuntu-20.04.

Configuration using cmake issues warning for SetROOTVersion showing GIT\_DESCRIBE\_ALL is set with unexpected formats ‘heads/latest-stable’.

Configure shows “Using Cuda+CuDNN for TMVA Deep Learning on GPU” while after Generate, warning shows Policy CMP0104 is not set: CMAKE\_CUDA\_ARCHITECTURE now detected for NVCC, empty CUDA\_ARCHITECTURE is not allowed. Since generate did not produce any error, cmake procedure was complete. Then during “make” step, after completion of 89%, TStorage.h shows error as “parameter packs not expanded with …'” during TMVA compilation.

There is also another error for RooFitHS3 " Error in \<UnknownClass: ReadCitInfo()\>: Cannot determine git info: etc/gitinfo.txt not found"

I tried also to run spack install ROOT which ‘spack.pkg.builtin.ROOT’ not found. Use ‘spack create’ to create a new package. However, there comes the issue to configure for CUDA, TMVA etc.

The system is Ubuntu20.04 having 6.5.0-7 kernel with Nvidia GeForce GPU driver 525.147.05, CUDA 12.0 Please advice how to proceed.

Best,  
Abhijit

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [March 24, 2024, 7:36pm UTC](https://root-forum.cern.ch/t/root-compilation-error-with-tstorage/58703/2 "2024-03-24T19:36:41Z")

</div>

Hi Abhijit,

I am sorry you are experiencing issues. It’s not clear to me what is your cmake configuration and the first error that blocks the compilation.  
Could you please share both informations?

Best,  
D

---

<div class="post-metadata">

**Author:** ![vega](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vega/32/14386_2.png) [@vega](https://root-forum.cern.ch/u/vega)\
**Post date:** [March 25, 2024, 8:17am UTC](https://root-forum.cern.ch/t/root-compilation-error-with-tstorage/58703/3 "2024-03-25T08:17:45Z")

</div>

Thanks Danilo.

After `ccmake ../` I see the configurations below.

> ROOT Configuration

> System Linux-6.5.0-27-generic  
> Processor 2 core Intel(R) Core™ i5-7200U CPU @ 2.50GHz (x86\_64)  
> Build type RelWithDebInfo  
> Install path /usr/local/ROOT  
> Compiler GNU 11.4.0  
> Compiler flags:  
> C -Wno-implicit-fallthrough -pipe -Wall -W -pthread -O2 -g -DNDEBUG  
> C++ -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O2 -g -DNDEBUG  
> Linker flags:  
> Executable -rdynamic  
> Module  
> Shared -Wl,–no-undefined -Wl,–hash-style=“both”

> Enabled support for: asimage builtin\_afterimage builtin\_clang builtin\_cling builtin\_cppzmq builtin\_fftw3 builtin\_freetype builtin\_ftgl builtin\_gl2ps builtin\_glew builtin\_gsl builtin\_llvm  
> builtin\_lz4 builtin\_nlohmannjson builtin\_openssl builtin\_openui5 builtin\_tbb builtin\_unuran builtin\_xxhash builtin\_zeromq ccache clad cuda cudnn dataframe test\_distrdf\_pyspark test\_distrdf\_dask  
> fftw3 fitsio fortran gdml gviz http imt mathmore mlp mpi mysql opengl proof pyroot pythia8 roofit webgui root7 rpath runtime\_cxxmodules shared sqlite ssl tmva tmva-cpu tmva-gpu tmva-pymva  
> spectrum unuran vc vdt veccore vecgeom x11 xml  
> Configuring done

After generating I see the following messages:

```auto
CMake Warning (dev) in tmva/tmva/CMakeLists.txt:
   Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
   empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104"
   for policy details. Use the cmake_policy command to set the policy and
   suppress this warning.

   CUDA_ARCHITECTURES is empty for target "TMVA".
 This warning is for project developers. Use -Wno-dev to suppress it.
 CMake Warning (dev) in roofit/batchcompute/CMakeLists.txt:
   Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
   empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104"
   for policy details. Use the cmake_policy command to set the policy and
   suppress this warning.

   CUDA_ARCHITECTURES is empty for target "RooBatchCompute_CUDA".
 This warning is for project developers. Use -Wno-dev to suppress it.
 CMake Warning (dev) in roofit/batchcompute/CMakeLists.txt:
   Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
   empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104"
   for policy details. Use the cmake_policy command to set the policy and
   suppress this warning.

   CUDA_ARCHITECTURES is empty for target "RooBatchCompute_CUDA".
 This warning is for project developers. Use -Wno-dev to suppress it.
 CMake Warning (dev) in roofit/roofitcuda/CMakeLists.txt:
   Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
   empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104"
   for policy details. Use the cmake_policy command to set the policy and
   suppress this warning.

   CUDA_ARCHITECTURES is empty for target "RooFitCuda".
   This warning is for project developers. Use -Wno-dev to suppress it.
   Generating done

```

I tried adding `cmake_policy(SET CMP0104 OLD)` in the CMakeLists.txt after line #31 so that warning is taken cared instead of suppressing the warning meassage. It did not help.

Then I run `make` instead of `make -jN` so that any error can be seen immediately.  
During the `make` process I find errors as shown below while the compilation did not STOP.

> [52%] Building CXX object core/rint/CMakeFiles/Rint.dir/src/TTabCom.cxx.o  
> [52%] Linking CXX shared library …/…/lib/libRint.so  
> [52%] Built target Rint  
> [52%] Building CXX object main/CMakeFiles/rootcling.dir/src/rootcling.cxx.o  
> [52%] Linking CXX executable …/bin/rootcling  
> [52%] Built target rootcling  
> [52%] Generating G\_\_Net.cxx, …/…/lib/Net.pcm  
> Error in UnknownClass::ReadGitInfo(): Cannot determine git info: etc/gitinfo.txt not found!  
> Scanning dependencies of target G\_\_Net  
> [52%] Building CXX object net/net/CMakeFiles/G\_\_Net.dir/G\_\_Net.cxx.o  
> [52%] Built target G\_\_Net  
> [52%] Building CXX object net/net/CMakeFiles/Net.dir/src/NetErrors.cxx.o  
> [52%] Building CXX object net/net/CMakeFiles/Net.dir/src/TApplicationRemote.cxx.o  
> [52%] Building CXX object net/net/CMakeFiles/Net.dir/src/TApplicationServer.cxx.o  
> [52%] Building CXX object net/net/CMakeFiles/Net.dir/src/TFileStager.cxx.o

That `UnknownClass error` appeared frequently during the course of compilation.

**Finally the compilation stops for the following error.**

> [89%] Building CXX object tmva/tmva/CMakeFiles/TMVA.dir/src/DNN/Architectures/Reference/TensorDataLoader.cxx.o  
> [89%] Building CXX object tmva/tmva/CMakeFiles/TMVA.dir/src/DNN/Architectures/Cpu.cxx.o  
> [89%] Building CXX object tmva/tmva/CMakeFiles/TMVA.dir/src/DNN/Architectures/Cpu/CpuBuffer.cxx.o  
> [89%] Building CXX object tmva/tmva/CMakeFiles/TMVA.dir/src/DNN/Architectures/Cpu/CpuMatrix.cxx.o  
> [89%] Building CUDA object tmva/tmva/CMakeFiles/TMVA.dir/src/DNN/Architectures/Cuda.cu.o  
> /home/vega/CERNSOFT/SOURCES/ROOT\_GIT\_SRC/core/base/inc/TStorage.h:123:37: warning: declaration of ‘static void TStorage::UpdateIsOnHeap(const volatile UInt\_t&, volatile UInt\_t&)’ with attribute ‘noinline’ follows inline declaration [-Wattributes]  
> 123 | R\_\_NEVER\_INLINE void TStorage::UpdateIsOnHeap(volatile const UInt\_t &uniqueID, volatile UInt\_t &bits) {  
> | ^ ~~~~~~~  
> /home/vega/CERNSOFT/SOURCES/ROOT\_GIT\_SRC/core/base/inc/TStorage.h:83:20: note: previous declaration of ‘static void TStorage::UpdateIsOnHeap(const volatile UInt\_t&, volatile UInt\_t&)’ here  
> 83 | static void UpdateIsOnHeap(volatile const UInt\_t &uniqueID, volatile UInt\_t &bits);  
> | ^ ~~~~~~~~~~~~~  
> /usr/include/c++/11/bits/std\_function.h:435:145: error: parameter packs not expanded with ‘…’:  
> 435 | function(\_Functor&& \_\_f)  
> | ^  
> /usr/include/c++/11/bits/std\_function.h:435:145: note: ‘\_ArgTypes’  
> /usr/include/c++/11/bits/std\_function.h:530:146: error: parameter packs not expanded with ‘…’:  
> 530 | operator=(\_Functor&& \_\_f)  
> | ^  
> /usr/include/c++/11/bits/std\_function.h:530:146: note: ‘\_ArgTypes’  
> make[2]: \*\*\* [tmva/tmva/CMakeFiles/TMVA.dir/build.make:2372: tmva/tmva/CMakeFiles/TMVA.dir/src/DNN/Architectures/Cuda.cu.o] Error 1  
> make[1]: \*\*\* [CMakeFiles/Makefile2:43737: tmva/tmva/CMakeFiles/TMVA.dir/all] Error 2  
> make: \*\*\* [Makefile:156: all] Error 2  
> vega@aditya:~/CERNSOFT/SOURCES/ROOT\_GIT\_SRC/BUILD\_ROOT 01:36 PM $

[CMakeCache.txt](https://root-forum.cern.ch/uploads/short-url/jn9bTEBH2SgKyDWTdgrrke842aj.txt) (182.0 KB)

Please see and kindly guide me.  
Thanks, Abhijit

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [March 25, 2024, 10:07am UTC](https://root-forum.cern.ch/t/root-compilation-error-with-tstorage/58703/4 "2024-03-25T10:07:50Z")

</div>

Hi,

Thanks for the info. Do you manage to build ROOT with less options, e.g. starting to remove the GPU support?

Best,  
D

---

<div class="post-metadata">

**Author:** ![vega](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vega/32/14386_2.png) [@vega](https://root-forum.cern.ch/u/vega)\
**Post date:** [March 26, 2024, 5:27am UTC](https://root-forum.cern.ch/t/root-compilation-error-with-tstorage/58703/5 "2024-03-26T05:27:33Z")

</div>

Hello Danilo!  
Yes, TMVA-CPU only version is working.  
Best, Abhijit
