Dear experts,
I am trying to install Geant4 on my Mac with Qt6. I am building from the source using cmake
.
The cmake
flags are the following:
cmake -DCMAKE_INSTALL_PREFIX=/Users/arkasantra/Geant4_Install_Qt6 -DGEANT4_INSTALL_DATA=ON -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_PYTHON=ON -DGEANT4_USE_QT=ON -DGEANT4_USE_QT_QT6=ON -DGEANT4_INSTALL_EXAMPLES=ON -DGEANT4_USE_SYSTEM_ZLIB=ON -DGEANT4_BUILD_TLS_MODEL=global-dynamic -DGEANT4_USE_GDML=ON -DCMAKE_PREFIX_PATH=$(brew --prefix qt) -DCMAKE_CXX_STANDARD=20 -DGEANT4_USE_FREETYPE=ON -DGEANT4_USE_RAYTRACER_X11=ON /Users/arkasantra/geant4-v11.2.1
The configuration message from the system is the following:
-- The C compiler identification is AppleClang 15.0.0.15000309
-- The CXX compiler identification is AppleClang 15.0.0.15000309
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking C++ feature CXXSTDLIB_FILESYSTEM_NATIVE - Success
-- Performing Test HAVE_TLS
-- Performing Test HAVE_TLS - Success
-- Found EXPAT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/lib/libexpat.tbd (found version "2.5.0")
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/lib/libz.tbd (found version "1.2.12")
-- Found XercesC: /usr/local/lib/libxerces-c.dylib (found version "3.2.5")
-- Found Freetype: /usr/local/lib/libfreetype.dylib (found version "2.13.2")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/OpenGL.framework
-- Found WrapOpenGL: TRUE
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
-- Found XQuartzGL: /usr/X11R6/include
-- Found X11: /usr/local/include
-- Looking for XOpenDisplay in /usr/local/lib/libX11.dylib;/usr/local/lib/libXext.dylib
-- Looking for XOpenDisplay in /usr/local/lib/libX11.dylib;/usr/local/lib/libXext.dylib - 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
-- Configuring download of missing dataset G4NDL (4.7)
-- Configuring download of missing dataset G4EMLOW (8.5)
-- Configuring download of missing dataset PhotonEvaporation (5.7)
-- Configuring download of missing dataset RadioactiveDecay (5.6)
-- Configuring download of missing dataset G4PARTICLEXS (4.0)
-- Configuring download of missing dataset G4PII (1.3)
-- Configuring download of missing dataset RealSurface (2.2)
-- Configuring download of missing dataset G4SAIDDATA (2.0)
-- Configuring download of missing dataset G4ABLA (3.3)
-- Configuring download of missing dataset G4INCL (1.2)
-- Configuring download of missing dataset G4ENSDFSTATE (2.3)
-- Building PTL with option BUILD_STATIC_LIBS - OFF
-- Building PTL with option BUILD_SHARED_LIBS - ON
-- Building PTL with option BUILD_OBJECT_LIBS -
-- Building PTL with CMAKE_CXX_STANDARD - 20
-- Building PTL with option PTL_USE_COVERAGE -
-- Building PTL with option PTL_USE_SANITIZER -
-- Building PTL with option PTL_USE_CLANG_TIDY -
-- Building PTL with option PTL_USE_TBB - OFF
-- Building PTL with option PTL_USE_LOCKS - OFF
-- Building PTL with option PTL_INSTALL_HEADERS - ON
-- Building PTL with option PTL_INSTALL_CONFIG - ON
CMake Warning at cmake/Modules/G4CMakeMain.cmake:78 (message):
Geant4Py is no longer distributed with the Geant4 toolkit. It can be
downloaded from:
https://github.com/koichi-murakami/g4python
and requests for support on installation and use should be directed there.
Call Stack (most recent call first):
CMakeLists.txt:49 (include)
-- The following Geant4 features are enabled:
CMAKE_CXX_STANDARD: Compiling against C++ Standard '20'
GEANT4_BUILD_MULTITHREADED: Build multithread enabled libraries
GEANT4_BUILD_TLS_MODEL: Building with TLS model 'global-dynamic'
GEANT4_USE_SYSTEM_EXPAT: Using system EXPAT library
GEANT4_USE_SYSTEM_ZLIB: Using system zlib library
GEANT4_USE_GDML: Building Geant4 with GDML support
GEANT4_USE_FREETYPE: Building Geant4 Analysis/Visualization with Freetype support
GEANT4_USE_OPENGL_X11: Build Geant4 OpenGL driver with X11 support
GEANT4_USE_RAYTRACER_X11: Build RayTracer driver with X11 support
GEANT4_USE_QT: Build Geant4 with Qt6 support
GEANT4_USE_QT3D: Build Geant4 Qt3D driver
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/arkasantra/Geant4_Build_Qt6
The compilation using cmake --build . -j8
is successful.
Subsequently, I built the geant4-v11.2.1/examples/basic/B1
using:
cmake -DGeant4_DIR=$HOME/Geant4_Install_Qt6/lib/Geant4-11.2.1 ../B1
make -j8
make install
Again there is no issue during the compilation.
However when I am running ./exampleB1
, I am getting:
dyld[42928]: Symbol not found: _FT_Get_Color_Glyph_ClipBox
Referenced from: <CD3FC454-4C6D-38DE-904E-B105A6499B06> /usr/local/Cellar/harfbuzz/8.4.0/lib/libharfbuzz.0.dylib
Expected in: <8C99F699-CED2-3B79-8221-073E18249C9F> /opt/X11/lib/libfreetype.6.dylib
zsh: abort ./exampleB1
May I know what is going wrong here? Any suggestion/comment to solve this issue will be greatly appreciated.
Thank you very much,
Arka
[ My system has qt@5
as well, but I made sure that in the PATH
variable, the qt
option comes first:
PATH=/usr/local/opt/openjdk/bin:/usr/local/opt/jpeg/bin:/usr/local/opt/krb5/sbin:/usr/local/opt/krb5/bin:/usr/local/opt/qt/bin:/usr/local/opt/qt@5/bin:/opt/anaconda3/bin
]
_Geant4 Version: 11.2.1
_Operating System: MacOS Sonoma 14.5, Intel Core i9
_Compiler/Version: AppleClang 15.0.0.15000309
_CMake Version: 3.25.0