Microyz execute

Hello!
I tried to cmake microyz module.

CMake Error in CMakeLists.txt:
Imported target “Geant4::G4Tree” includes non-existent path

"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/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.

– Generating done (0.0s)
CMake Generate step failed. Build files cannot be regenerated correctly.

I tried to remove build directory of geant4 again and cmake and make it again, but I had the same problem.

sarahabdelaziz@Sarahs-MacBook-Pro ~ % cd  Downloads/geant4-v11.2.2/build
sarahabdelaziz@Sarahs-MacBook-Pro build % make
make: /opt/homebrew/Cellar/cmake/3.30.3/bin/cmake: No such file or directory
make: *** [cmake_check_build_system] Error 1
sarahabdelaziz@Sarahs-MacBook-Pro build % cmake ..
CMake Warning at /opt/homebrew/share/cmake/Modules/Platform/Darwin-Initialize.cmake:311 (message):
  Ignoring CMAKE_OSX_SYSROOT value:

   /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk

  because the directory does not exist.
Call Stack (most recent call first):
  /opt/homebrew/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:34 (include)
  CMakeLists.txt:29 (project)


-- The C compiler identification is AppleClang 16.0.0.16000026
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - broken
CMake Error at /opt/homebrew/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

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

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/Users/sarahabdelaziz/Downloads/geant4-v11.2.2/build/CMakeFiles/CMakeScratch/TryCompile-szBXD0'
    
    Run Build Command(s): /opt/homebrew/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_ce7ed/fast
    /Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_ce7ed.dir/build.make CMakeFiles/cmTC_ce7ed.dir/build
    Building C object CMakeFiles/cmTC_ce7ed.dir/testCCompiler.c.o
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc   -arch arm64 -mmacosx-version-min=15.0 -MD -MT CMakeFiles/cmTC_ce7ed.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_ce7ed.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_ce7ed.dir/testCCompiler.c.o -c /Users/sarahabdelaziz/Downloads/geant4-v11.2.2/build/CMakeFiles/CMakeScratch/TryCompile-szBXD0/testCCompiler.c
    Linking C executable cmTC_ce7ed
    /opt/homebrew/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ce7ed.dir/link.txt --verbose=1
    ld: library 'System' not found
    cc: error: linker command failed with exit code 1 (use -v to see invocation)
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc  -arch arm64 -mmacosx-version-min=15.0 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_ce7ed.dir/testCCompiler.c.o -o cmTC_ce7ed
    make[1]: *** [cmTC_ce7ed] Error 1
    make: *** [cmTC_ce7ed/fast] Error 2
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:29 (project)


-- Configuring incomplete, errors occurred!
sarahabdelaziz@Sarahs-MacBook-Pro build %

I updated the xcode and restart the lab. I try to build B1, but it is failed so again I removed build directory and repeated the same steps. Then, it is executable. So, I want to know should do I for every time I nned to use build new module to remove the build directory of geant4 and rebuild it again? Is there a problem related to Xcode?
Thanks for your help

I’d guess that your system has updated/upgraded since the last run of cmake/make in this directory. Try deleting the build directory completely and try again.

I’d also suggest running

brew doctor

to check of there are any other issues with that or the Xcode/Command Line Tools install.

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