Hello Experts,
I’ve been trying to install the Geant4(10.7.2) on the Singularity (based on ubuntu20.04) but failed when turn on the python support. It stops at the CMake stage with the following message:
cmake -DCMAKE_INSTALL_PREFIX=/opt/geant4/install -DGEANT4_INSTALL_DATA=ON -DGEANT4_INSTALL_DATADIR=/opt/geant4/data -DGEANT4_USE_QT=ON -DGEANT4_BUILD_TLS_MODEL=global-dynamic -DGEANT4_USE_PYTHON=ON …/src/geant4.10.07.p02
– Found PythonInterp: /bin/python3 (found suitable version “3.8.5”, minimum required is “3.0”)
– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found version “3.8.5”)
– Found Boost: /lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version “1.71.0”, minimum required is “1.65”) found components: python
– The following Geant4 features are enabled:
GEANT4_BUILD_CXXSTD: Compiling against C++ Standard ‘11’
GEANT4_USE_SYSTEM_EXPAT: Using system EXPAT library
GEANT4_USE_PYTHON: Building bindings for Python 3.8
– Configuring done
CMake Error in environments/g4py/source/global/CMakeLists.txt:
Imported target “Boost::python” includes non-existent path
"/include"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
-
The path was deleted, renamed, or moved to another location.
-
An install or uninstall procedure did not complete successfully.
-
The installation package was faulty and references files it does not
provide.
It works fine without the python support. I also tried to install with the same settings when I run the Singularity with shell, and install from there, it’s also okay. So, there must be something not correct in the Singularity build.
Just for the reference, I also printed out the ENV from Singularity build as well as from interactive shell in the image to compare:
Message from the Singularity build:
- printenv
USER=root
BOOTSTRAP=docker
SINGULARITY_CHECKLEVEL=3
SHLVL=1
HOME=/root
OLDPWD=/
SINGULARITY_BUILDDEF=Singularity
SINGULARITY_CHECKTAGS=bootstrap
SINGULARITY_version=2.6.1-dist
SINGULARITY_ENVIRONMENT=/.singularity.d/env/91-environment.sh
SINGULARITY_MESSAGELEVEL=1
_=/sbin/chroot
SINGULARITY_libexecdir=/usr/lib/x86_64-linux-gnu
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
SINGULARITY_DEFFILE_FROM=rootproject/root:6.24.00-ubuntu20.04
SINGULARITY_CHECKS=no
LANG=C
SINGULARITY_IMAGE=/tmp/.singularity-build.vWJVay
FROM=rootproject/root:6.24.00-ubuntu20.04
SINGULARITY_DEFFILE_BOOTSTRAP=docker
DEBIAN_FRONTEND=noninteractive
SINGULARITY_bindir=/usr/bin
SINGULARITY_ROOTFS=/var/lib/singularity/mnt/container
PWD=/opt/geant4/build
Message from the shell within the Singularity session:
printenv
SHELL=/bin/bash
SINGULARITY_NAME=raser.simg
CLING_STANDARD_PCH=none
PWD=/opt/geant4/build
HOME=/root
LANG=C.UTF-8
SINGULARITY_CONTAINER=raser.simg
PYTHONPATH=/opt/root/lib:
TERM=xterm-256color
SHLVL=1
ROOTSYS=/opt/root
LD_LIBRARY_PATH=/.singularity.d/libs
PS1=Singularity raser.simg:\w>
PATH=/opt/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
OLDPWD=/root
_=/usr/bin/printenv
Any suggestion?
Thank you!
Xin