Problem when compiling xray_TESdetector example

Geant4 Version: 11.1.3
Operating System: Mac OS Sonoma 14.1.2 (M2 chip)
Compiler/Version: Apple clang version 15.0.0
CMake Version: 3.27.6


Hi eveybody, I am a beginner to Geant4.

I want to study the example of XrayTESdetector provided by ATHENA group in example in 11.2beta. As my current Geant4 version is 11.1.3, I downloaded the 11.2beta source code and copy the xray_TESdetector example. When I try to build this example, it works well with cmake, then I use make -j8, and an error occurs as follows:

[ 15%] Building CXX object CMakeFiles/XrayTESdetector.dir/xray_TESdetector.cc.o
[ 15%] Building CXX object CMakeFiles/XrayTESdetector.dir/src/G4EmStandardPhysics_SpacePhysics.cc.o
[ 23%] Building CXX object CMakeFiles/XrayTESdetector.dir/src/XrayTESdetDetParameterisation.cc.o
[ 30%] Building CXX object CMakeFiles/XrayTESdetector.dir/src/XrayTESdetDetectorMessenger.cc.o
[ 46%] Building CXX object CMakeFiles/XrayTESdetector.dir/src/XrayTESdetDetectorConstruction.cc.o
[ 46%] Building CXX object CMakeFiles/XrayTESdetector.dir/src/XrayTESdetActionInitialization.cc.o
In file included from /Users/rxtian/geant4/work/athena/src/XrayTESdetDetectorConstruction.cc:36:
/Users/rxtian/geant4/work/athena/include/XrayTESdetDetectorConstruction.hh:46:10: fatal error: 'G4GDMLParser.hh' file not found
#include "G4GDMLParser.hh"
         ^~~~~~~~~~~~~~~~~
In file included from /Users/rxtian/geant4/work/athena/xray_TESdetector.cc:35:
/Users/rxtian/geant4/work/athena/include/XrayTESdetDetectorConstruction.hh:46:10: fatal error: 'G4GDMLParser.hh' file not found
#include "G4GDMLParser.hh"
         ^~~~~~~~~~~~~~~~~
In file included from /Users/rxtian/geant4/work/athena/src/XrayTESdetDetectorMessenger.cc:37:
/Users/rxtian/geant4/work/athena/include/XrayTESdetDetectorConstruction.hh:46:10: fatal error: 'G4GDMLParser.hh' file not found
#include "G4GDMLParser.hh"
         ^~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/XrayTESdetector.dir/src/XrayTESdetDetectorMessenger.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [CMakeFiles/XrayTESdetector.dir/src/XrayTESdetDetectorConstruction.cc.o] Error 1
1 error generated.
make[2]: *** [CMakeFiles/XrayTESdetector.dir/xray_TESdetector.cc.o] Error 1
make[1]: *** [CMakeFiles/XrayTESdetector.dir/all] Error 2
make: *** [all] Error 2

At first, I thought this is because I did not turn on GDML when I install Geant4, so I cd to my Geant4 build directory and use cmake -DGEANT4_USE_GDML=ON . (with XercesC installed with Homebrew). Then I make -j8.

After this, I try to compile xray_TESdetector example again, but the problem metioned above remains.

Sorry guys!
I know what’s wrong: I forget to make install after I turn on GDML.
I was so silly.
Sorry for disturbing you all.

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