Including ROOT headers in GEANT4 both on windows machine and cvmf

Hello, I need to include ROOT headers in GEANT4 simulation. I did it following GEANT4 examples, but both running my simulation and preset examples I get errors that look like related to ROOT headers.

Here th warnings and error got in my computer (windows machine)
windows errors.txt (4.3 KB)

Here the errors got using cvmfs

cvmfs errors.txt (465.2 KB)

Are there ROOT problems?

About the CVMFS errors → you try to mix ROOT binaries compiled with GCC 4.8(.5) with GEANT4 binaries compiled with GCC 8.3.0. This will not work. You need to have both tools built with the same compiler and using the same C++ standard (i.e., C++11 or C++14 or C++17):

ROOT Forum → Search → Geant4 C++ standard

Hello @Wile_E_Coyote , in my bash profile I use

these sources for geant4

source /cvmfs/
source /cvmfs/ 
source /cvmfs/

and this one for ROOT

source /cvmfs/

do you know which one I should use?

Hello @wile_e_coyote, I tried to use

for geant

source /cvmfs/
source /cvmfs/
source /cvmfs/

and for Root

source /cvmfs/

so that, both ROOT and GEANT have been compilied by gcc9.3, but if I try to use Geant (a simuluation not including TH1D, then working on my previous GEANT version)

I get this error

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /cvmfs/
-- Check for working C compiler: /cvmfs/ -- broken
CMake Error at /cvmfs/ (message):
  The C compiler


  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/casaburf/20221027/B1/B1-build/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/gmake cmTC_b392e/fast
    /usr/bin/gmake -f CMakeFiles/cmTC_b392e.dir/build.make CMakeFiles/cmTC_b392e.dir/build
    gmake[1]: Entering directory `/home/casaburf/20221027/B1/B1-build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_b392e.dir/testCCompiler.c.o
    /cvmfs/    -o CMakeFiles/cmTC_b392e.dir/testCCompiler.c.o   -c /home/casaburf/20221027/B1/B1-build/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_b392e
    /cvmfs/ -E cmake_link_script CMakeFiles/cmTC_b392e.dir/link.txt --verbose=1
    /cvmfs/      CMakeFiles/cmTC_b392e.dir/testCCompiler.c.o  -o cmTC_b392e
    /cvmfs/ /lib64/ version `GLIBC_2.27' not found (required by /cvmfs/
    collect2: error: ld returned 1 exit status
    gmake[1]: *** [cmTC_b392e] Error 1
    gmake[1]: Leaving directory `/home/casaburf/20221027/B1/B1-build/CMakeFiles/CMakeTmp'
    gmake: *** [cmTC_b392e/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:7 (project)

-- Configuring incomplete, errors occurred!

while, if I try to run ROOT I get this one

root: /lib64/ version GLIBC_2.18’ not found (required by /cvmfs/`

Then, I don’t know which version of GEANT and ROOT I should use…
Here the bash file
.bash_profile.txt (2.8 KB)

I’m tryin a lot of ROOTS on cvmfs…but it looks like that only the ones compiled as


could it depends on some setting in the laboratory machine where cvmfs is installed?

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