Geant4 cvmfs works on a first machine, but doens't work on a second one

Hello, I use Geant4 on cvmfs installed on a machine on a first laboratory and it works.
This is the compiling of the simulation

-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/gcc
-- Check for working C compiler: /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/g++
-- Check for working CXX compiler: /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found EXPAT: /cvmfs/sft.cern.ch/lcg/views/LCG_geant4ext20210118/x86_64-centos7-gcc8-opt/lib64/libexpat.so (found suitable version "2.2.6", minimum required is "2.2.6")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Found XercesC: /cvmfs/sft.cern.ch/lcg/views/LCG_geant4ext20210118/x86_64-centos7-gcc8-opt/lib/libxerces-c.so (found suitable version "3.2.3", minimum required is "3.2.3")
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found OpenGL: /usr/lib64/libOpenGL.so
-- Found Motif: /usr/lib64/libXm.so
-- Configuring done
-- Generating done
-- Build files have been written to:SimulazionLNGS/kinematics/B1/B1-build

On the contrary, Geant4 on cvmfs using a machine on a second laboratory doesn’t work…the compiling is different and I get error

-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/gcc
-- Check for working C compiler: /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/g++
-- Check for working CXX compiler: /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Found XercesC: /cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc8-opt/lib/libxerces-c.so (found suitable version "3.2.3", minimum required is "3.2.3")
-- Detected Compiler: GCC 8.3.0
-- Performing Test check_cxx_compiler_flag__Wabi
-- Performing Test check_cxx_compiler_flag__Wabi - Success
-- Performing Test check_cxx_compiler_flag__fabi_version_0
-- Performing Test check_cxx_compiler_flag__fabi_version_0 - Success
-- Performing Test check_cxx_compiler_flag__fabi_compat_version_0
-- Performing Test check_cxx_compiler_flag__fabi_compat_version_0 - Success
-- Performing Test check_cxx_compiler_flag__ffp_contract_fast
-- Performing Test check_cxx_compiler_flag__ffp_contract_fast - Success
-- target changed from "" to "auto"
-- Detected CPU: k8
-- Performing Test check_cxx_compiler_flag__march_k8
-- Performing Test check_cxx_compiler_flag__march_k8 - Success
-- Performing Test check_cxx_compiler_flag__msse2
-- Performing Test check_cxx_compiler_flag__msse2 - Success
-- Performing Test check_cxx_compiler_flag__mno_sse3
-- Performing Test check_cxx_compiler_flag__mno_sse3 - Success
-- Performing Test check_cxx_compiler_flag__mno_ssse3
-- Performing Test check_cxx_compiler_flag__mno_ssse3 - Success
-- Performing Test check_cxx_compiler_flag__mno_sse4_1
-- Performing Test check_cxx_compiler_flag__mno_sse4_1 - Success
-- Performing Test check_cxx_compiler_flag__mno_sse4_2
-- Performing Test check_cxx_compiler_flag__mno_sse4_2 - Success
-- Performing Test check_cxx_compiler_flag__mno_sse4a
-- Performing Test check_cxx_compiler_flag__mno_sse4a - Success
-- Performing Test check_cxx_compiler_flag__mno_avx
-- Performing Test check_cxx_compiler_flag__mno_avx - Success
-- Performing Test check_cxx_compiler_flag__mno_fma
-- Performing Test check_cxx_compiler_flag__mno_fma - Success
-- Performing Test check_cxx_compiler_flag__mno_bmi2
-- Performing Test check_cxx_compiler_flag__mno_bmi2 - Success
-- Performing Test check_cxx_compiler_flag__mno_avx2
-- Performing Test check_cxx_compiler_flag__mno_avx2 - Success
-- Performing Test check_cxx_compiler_flag__mno_xop
-- Performing Test check_cxx_compiler_flag__mno_xop - Success
-- Performing Test check_cxx_compiler_flag__mno_fma4
-- Performing Test check_cxx_compiler_flag__mno_fma4 - Success
-- Performing Test check_cxx_compiler_flag__mno_avx512f
-- Performing Test check_cxx_compiler_flag__mno_avx512f - Success
-- Performing Test check_cxx_compiler_flag__mno_avx512vl
-- Performing Test check_cxx_compiler_flag__mno_avx512vl - Success
-- Performing Test check_cxx_compiler_flag__mno_avx512pf
-- Performing Test check_cxx_compiler_flag__mno_avx512pf - Success
-- Performing Test check_cxx_compiler_flag__mno_avx512er
-- Performing Test check_cxx_compiler_flag__mno_avx512er - Success
-- Performing Test check_cxx_compiler_flag__mno_avx512cd
-- Performing Test check_cxx_compiler_flag__mno_avx512cd - Success
-- Performing Test check_cxx_compiler_flag__mno_avx512dq
-- Performing Test check_cxx_compiler_flag__mno_avx512dq - Success
-- Performing Test check_cxx_compiler_flag__mno_avx512bw
-- Performing Test check_cxx_compiler_flag__mno_avx512bw - Success
-- Performing Test check_cxx_compiler_flag__mno_avx512ifma
-- Performing Test check_cxx_compiler_flag__mno_avx512ifma - Success
-- Performing Test check_cxx_compiler_flag__mno_avx512vbmi
-- Performing Test check_cxx_compiler_flag__mno_avx512vbmi - Success
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
CMake Error at /cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc8-opt/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:15 (message):
  The imported target "Qt5::Gui" references the file

     "/lib64/libEGL.so"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc8-opt/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc8-opt/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:45 (_qt5_Gui_check_file_exists)
  /cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc8-opt/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:67 (_qt5gui_find_extra_libs)
  /cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc8-opt/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:174 (include)
  /cvmfs/sft.cern.ch/lcg/contrib/CMake/3.14.2/Linux-x86_64/share/cmake-3.14/Modules/CMakeFindDependencyMacro.cmake:48 (find_package)
  /cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc8-opt/lib64/Geant4-10.7.0/Geant4Config.cmake:452 (find_dependency)
  CMakeLists.txt:16 (find_package)


-- Configuring incomplete, errors occurred!

Why the compiling is different? And why do I get error on the second machine?

@bmorgan maybe do you know it?

The LCG “views” used in each case are different:

-- Found XercesC: /cvmfs/sft.cern.ch/lcg/views/LCG_geant4ext20210118/x86_64-centos7-gcc8-opt/lib/libxerces-c.so (found suitable version "3.2.3", minimum required is "3.2.3")

on the first, then

-- Found XercesC: /cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc8-opt/lib/libxerces-c.so (found suitable version "3.2.3", minimum required is "3.2.3")

on the second, hence the different configuration.

See the error:

CMake Error at /cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc8-opt/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:15 (message):
  The imported target "Qt5::Gui" references the file

     "/lib64/libEGL.so"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

All of the LCG CVMFS installs rely on a set of system packages being installed, usually the set defined by the HEP_OSlibs rpm, so get that and install on the system.

Thank you @bmorgan

How is it possible?

This is the bash profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

source /cvmfs/sft.cern.ch/lcg/contrib/gcc/8.3.0/x86_64-centos7-gcc8-opt/setup.sh
source /cvmfs/geant4.cern.ch/geant4/10.7.p01/x86_64-centos7-gcc8-optdeb-MT/bin/geant4.sh 
source /cvmfs/geant4.cern.ch/geant4/10.7.p01/x86_64-centos7-gcc8-optdeb-MT/CMake-setup.sh
source /cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc8-opt/setup.sh 
#source /cvmfs/geant4.cern.ch/geant4/11.0/x86_64-centos7-gcc8-optdeb-MT/bin/geant4.sh 
#source /cvmfs/geant4.cern.ch/geant4/11.0/x86_64-centos7-gcc8-optdeb-MT/CMake-setup.sh 
source /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.24.00/x86_64-centos7-gcc48-opt/bin/thisroot.sh
#source /cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos8-gcc10-opt/setup.sh
#source /cvmfs/geant4.cern.ch/geant4/10.6.p03/x86_64-centos7-gcc8-optdeb-MT/bin/geant4.sh
#source /cvmfs/geant4.cern.ch/geant4/10.6.p03/x86_64-centos7-gcc8-optdeb-MT/CMake-setup.sh
alias g4make='/cvmfs/sft.cern.ch/lcg/contrib/CMake/3.14.2/Linux-x86_64/bin/cmake ../'
alias g4run='nohup ./exampleB1 ../run1.mac &'
alias g4p='sps aux | grep exampleB1'
alias g4maketb21='/cvmfs/sft.cern.ch/lcg/contrib/CMake/3.14.2/Linux-x86_64/bin/cmake -DHEPMC_LIBRARIES=/home/rosati/lemmatb/HepMC-2.06.11/build/lib/libHepMC.so -DGeant4_DIR=/cvmfs/geant4.cern.ch/geant4/10.7.p01/x86_64-centos7-gcc8-optdeb-MT/lib64/Geant4-10.7.1/ ../'
alias g4runtb21='nohup ./mainMCMC ../run1.mac &'
alias g4rungem90='nohup ./gem90 ../gamma_1809keV.mac &'
alias g4ptb21='sps aux | grep mainMCMC'
alias gittb21='git clone https://github.com/LEMMA-TB/LEMMA-TB2021.git'
alias cplaytb21='cp ../../data/layout_2021_v1.gdml layout.gdml'
alias gentoo='/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/x86_64/startprefix'
#alias gentoo='/cvmfs/sft.cern.ch/lcg/contrib/gentoo/macos/10.13/startprefix'
alias cdcolla='cd /data_collamaf/DataFausto/'
alias cdtb21='cd /data_collamaf/DataFausto/Muon_Collider/III_anno/TestBeam21/'
alias cdsimgea='cd /data_collamaf/DataFausto/Muon_Collider/II_anno/Simulazione_Geant/'
alias macro='source lancia_macro.sh'
alias tailf='tail -f nohup.out'
alias bootstrap='source lancia_bootstrap.sh'
alias chmod700='chmod 700 /data_collamaf/DataFausto/Muon_Collider -R'
alias chmod755='chmod 755 /data_collamaf/DataFausto/Muon_Collider -R'
alias chmod777='chmod 777 /data_collamaf/DataFausto/Muon_Collider -R'
alias totalkill='pkill -u casaburf'
alias viewall='ps -ef'
alias bootstrap='source lancia_bootstrap.sh'

I use the same bash profile in both the machines…
And you see the source is:

/cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc8-opt/setup.sh

then, how is it possible that in the first mash the view is different???

is it a repository of cvfms???

There’s quite a bit going on there, so all I can suggest is to check the environment directly after a new, clean login session on the machines and see what gets set. It may be necessary to comment out line in the script to see what each does to the environment.

No, this is system rpm package that requires downloading and installing on the machine. As this looks like a CentOS/RH 7 machine, the README here for that platform should be suitable and provide installation instructions for it.

I see the problem…in the bash of the second laboratory, I had to add this line

source /cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc8-opt/setup.sh

otherwise ROOT doesn’t work…on the contrary, in the first laboratory root works without that line…
I don’t know…

I said it to the technician…I hope that he will solve.
Thank you

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