I’m trying to compile Geant4.10.7 on our cluster and get stuck by a compilation error immediately:
[ 1%] Automatic MOC for target G4OpenGL
cd /zfs_home/accsoft/SL68/build/Geant4/10.07-p01/GCC-8.3.0-2.32/easybuild_obj/source && /zfs_home/accsoft/SL68/software/CMake/3.8.0-GCC-8.3.0-2.32/bin/cmake -E cmake_autogen /zfs_home/accsoft/SL68/build/Geant4/10.07-p01/GCC-8.3.0-2.32/easybuild_obj/source/CMakeFiles/G4OpenGL_autogen.dir/ Release
AutoMoc: Error: /zfs_home/accsoft/SL68/build/Geant4/10.07-p01/GCC-8.3.0-2.32/geant4.10.07/source/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc
The file includes the moc file "moc_G4OpenGLQtExportDialog.cpp", but could not find header "G4OpenGLQtExportDialog{.h,.hh,.h++,.hm,.hpp,.hxx,.in,.txx}" in /zfs_home/accsoft/SL68/build/Geant4/10.07-p01/GCC-8.3.0-2.32/geant4.10.07/source/visualization/OpenGL/src/
make[2]: *** [source/CMakeFiles/G4OpenGL_autogen] Error 1
It seems to be looking for the header here:
/zfs_home/accsoft/SL68/build/Geant4/10.07-p01/GCC-8.3.0-2.32/geant4.10.07/source/visualization/OpenGL/src/
but it should end with “include” where the file actually exists.
I’m using GCC 8.3.0, Qt5.15.2. Below is EasyConfig file contents I use as part of the EasyBuild system to make an environment module - our preferre build system for our cluster. It shows the dependencies and configuration options.
It’s SLC6.
File Edit Options Buffers Tools Help
name = 'Geant4'
version = '10.07-p01'
homepage = 'http://geant4.cern.ch/'
description = """Geant4 is a toolkit for the simulation of the passage of particles through matter.
Its areas of application include high energy, nuclear and accelerator physics,
as well as studies in medical and space science."""
toolchain = {'name': 'GCC', 'version': '8.3.0-2.32'}
source_urls = ['http://geant4.cern.ch/support/source']
sources = ['%(namelower)s.10.07.tar.gz']
patches = [
'./Geant4-10.07-emd-process-id.patch',
'./Geant4-10.07-exp-underflow2.patch'
]
dependencies = [
('expat', '2.1.1'),
('CLHEP', '2.4.4.0'),
('Xerces-C++', '3.1.2'),
('Mesa','11.2.1'),
('libGLU', '9.0.0', '-Mesa-11.2.1'),
('X11','20160819'),
('Qt5','5.15.2'),
('zlib','1.2.11'),
]
parallel = 6
builddependencies = [('CMake', '3.8.0')]
configopts = "-DEXPAT_LIBRARY=$EBROOTEXPAT/lib/libexpat.so -DEXPAT_INCLUDE_DIR=$EBROOTEXPAT/include"
configopts += " -DGEANT4_BUILD_MULTITHREADED=OFF"
configopts += " -DGEANT4_INSTALL_DATA=ON"
configopts += " -DGEANT4_USE_GDML=ON"
configopts += " -DGEANT4_USE_OPENGL_X11=ON"
configopts += " -DGEANT4_USE_QT=ON"
configopts += " -DGEANT4_USE_RAYTRACER_X11=ON"
configopts += " -DGEANT4_USE_SYSTEM_CLHEP=ON"
configopts += " -DGEANT4_USE_SYSTEM_EXPAT=ON"
configopts += " -DGEANT4_USE_SYSTEM_ZLIB=ON"
moduleclass = 'phys'
Any advice would be appreciated!
Thanks,
Laurie