_Geant4 Version:_11.3.0
_Operating System:_Red Hat Enterprise Linux 8.8
_Compiler/Version:_gcc-native/13.2.0
_CMake Version:_cmake/3.27.2
Hi all,
I’m encountering an issue with Xerces when creating an application with the following bash script (called build_sonde_neutron.sh):
#!/bin/sh
. /XXX/Geant4/scripts/env_softstack.sh
export CC=gcc
export CXX=g++
export GEANT4_VERSION=11.3.0
cd ${SOFTSTACK_HOME}/build
mkdir -p ${SOFTSTACK_HOME}/build/sonde_neutron
#rm -r ${SOFTSTACK_HOME}/build/sonde_neutron/*
#rm -r ${SOFTSTACK_HOME}/install/sonde_neutron/*
cd ${SOFTSTACK_HOME}/build/sonde_neutron
cmake \
-DWITH_GEANT4_UIVIS=OFF \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="-std=gnu++11" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX=${SOFTSTACK_HOME}/install/sonde_neutron \
-DGeant4_DIR=${SOFTSTACK_HOME}/install/geant4.${GEANT4_VERSION} \
-DXercesC_LIBRARY=${XERCES_HOME}/lib64/libxerces-c-3.2.so \
${SOFTSTACK_HOME}/src/sonde_neutron
#-DXercesC_LIBRARY=${SOFTSTACK_HOME}/install/xerces-c-3.2.3/lib64/libxerces-c-3.2.so
make
make install
##-DCMAKE_BUILD_TYPE=RelWithDebInfo \
The variables SOFTSTACK_HOME and XERCES_HOME are both defined in the env_softstack.sh script (called at the start) and correspond to directory paths.
env_softstack is defined as :
#!/bin/bash
export SOFTSTACK_HOME=/XXX/Geant4/
module load cmake
module load gcc/7.4.0
export XERCES_HOME=${SOFTSTACK_HOME}/install/xerces-c-3.2.3/
export LD_LIBRARY_PATH=${XERCES_HOME}/lib64:${LD_LIBRARY_PATH}
export PATH=${XERCES_HOME}/bin:${PATH}
export GEANT4_HOME=${SOFTSTACK_HOME}/install/geant4.10.07.p01/
export LD_LIBRARY_PATH=${GEANT4_HOME}/lib64:${LD_LIBRARY_PATH}
export PATH=${GEANT4_HOME}/bin:${PATH}
export SONDENEUTRON_HOME=${SOFTSTACK_HOME}/install/sonde_neutron
export PATH=${SONDENEUTRON_HOME}/bin:${PATH}
Trying to execute the first script gives a fail to find Xerces message (see below). I’ve tried changing the acces path to Xerces, both by specifiying it less (stop at XERCES_HOME) or by specifying it more (lib64/cmake/XercesC) and everything in between.
I’ve also tried to comment anything related to Xerces in both script (build_sonde_neutron and env_softstack) so thats it is not called, however I still get the same error message.
CMake Error at cmake/Modules/FindPackagesHandleStandardArgs.cmake:230 (message)
Failed to find XercesC (missing: XercesC_INCLUDE_DIR XercesC_VERSION)
(Required is at least version "3.2.3")
It is imoprtant to note that I inherited those scripts from an older version of G4 (ver. 10.07.p01) as far as I know the -DCMAKE commands used have not been depreciated but I might have missed something in that matter.
If anyone has any suggestion on how to solve this issue i’ll be happy to try it.
If needed I can provide more information, mostly cmake files related.
Thank you for your time and help.