ReCompile Geant4 v11.1.1 in MacOs 14with Xcode 15

_Geant4 Version:_11.1.1
_Operating System:_Macos 14 sonoma with
_Compiler/Version:_pple clang version 15.0.0 (clang-1500.0.40.1)
_CMake Version:_cmake 3.24.4

HI! I installed Geant4 11.1.1 in MacOS 13 with xcode14.x,my work worked successfully. after macOS is upgraded to macOS 14,Geant4 doesn’t work well, so I reinstall geant4,but the example B1 failed. here is the terminal in Attachment.

macos 14 + xcode15 terminal.txt (1.6 MB)

The critical lines look to be:

-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clan
g - broken
CMake Error at /opt/local/share/cmake-3.24/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"

  is not able to compile a simple test program.

  It fails with the following output:
...

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -I/usr/local/opt/libomp/include  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp  CMakeFiles/cmTC_bc87c.dir/testCCompiler.c.o -o cmTC_bc87c 
    ld: warning: search path '/usr/local/opt/libomp/lib' not found
    ld: library 'omp' not found
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [cmTC_bc87c] Error 1
    make: *** [cmTC_bc87c/fast] Error 2

Geant4 doesn’t use OpenMP at all, so I’d suspect the upgrade wiped that and you’ll either need to reinstall that, or check your environment/system settings to remove this (it might be in CXXFLAGS or LDFLAGS).

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