Dear all,
I am trying to compile geant4-v11.0.2 on Mac Monterey 12.3.1 with Qt5 by,
cmake -DCMAKE_INSTALL_PREFIX=../geant4-v11.0.2-install ../geant4-v11.0.2 -DGEANT4_USE_QT=ON -DCMAKE_PREFIX_PATH=/Users/ydu/Qt_/5.15.2/clang_64
until then it was successful,
GEANT4_USE_QT: Build Geant4 with Qt support
GEANT4_USE_QT3D: Build Geant4 Qt3D driver
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ydu/geant4-v11.0.2-build
then I ran,
make
which ends up with the following error,
ld: warning: ignoring file /Users/ydu/Qt_/5.15.2/clang_64/lib/QtWidgets.framework/QtWidgets, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /Users/ydu/Qt_/5.15.2/clang_64/lib/QtGui.framework/QtGui, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /Users/ydu/Qt_/5.15.2/clang_64/lib/QtCore.framework/QtCore, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
"QArrayData::deallocate(QArrayData*, unsigned long, unsigned long)", referenced from:
G4UIQt::ClearButtonCallback() in G4UIQt.cc.o
G4UIQt::SaveOutputCallback() in G4UIQt.cc.o
G4UIQt::CommandEnteredCallback() in G4UIQt.cc.o
G4UIQt::CommandEditedCallback(QString const&) in G4UIQt.cc.o
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [BuildProducts/lib/libG4interfaces.dylib] Error 1
make[1]: *** [source/CMakeFiles/G4interfaces.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 82%] Built target G4processes
make: *** [all] Error 2
I browsed some posts on the forum and seemed to share a similar problem with many people, but none of their solutions worked for me. Could anyone be kind to give a hint?
Thanks in advance,
Chloe