I’ve been running code smoothly for the last few weeks up until today after my macOS updated to Sonoma 14.2.1 and Xcode to 15.2 overnight. I updated cmake using homebrew to the latest version: 3.28.1, but now I’m getting strange errors:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=$MU3EPREFIX/software/install $MU3EPREFIX/software/mu3eAna
CMake Warning at /usr/local/Cellar/cmake/3.28.1/share/cmake/Modules/Platform/Darwin-Initialize.cmake:308 (message):
Ignoring CMAKE_OSX_SYSROOT value:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk
because the directory does not exist.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.28.1/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:34 (include)
CMakeLists.txt:3 (project)
– The C compiler identification is AppleClang 15.0.0.15000100
– The CXX compiler identification is AppleClang 15.0.0.15000100
– Detecting C compiler ABI info
– Detecting C compiler ABI info - failed
– Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
– Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - broken
CMake Error at /usr/local/Cellar/cmake/3.28.1/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/Library/Developer/CommandLineTools/usr/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/Users/alexgavin/Project/software/build/mu3eAna/CMakeFiles/CMakeScratch/TryCompile-Hnhd8Y'
Run Build Command(s): /usr/local/Cellar/cmake/3.28.1/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_a68cb/fast
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_a68cb.dir/build.make CMakeFiles/cmTC_a68cb.dir/build
Building C object CMakeFiles/cmTC_a68cb.dir/testCCompiler.c.o
/Library/Developer/CommandLineTools/usr/bin/cc -MD -MT CMakeFiles/cmTC_a68cb.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_a68cb.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_a68cb.dir/testCCompiler.c.o -c /Users/alexgavin/Project/software/build/mu3eAna/CMakeFiles/CMakeScratch/TryCompile-Hnhd8Y/testCCompiler.c
Linking C executable cmTC_a68cb
/usr/local/Cellar/cmake/3.28.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a68cb.dir/link.txt --verbose=1
/Library/Developer/CommandLineTools/usr/bin/cc -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_a68cb.dir/testCCompiler.c.o -o cmTC_a68cb
ld: library 'System' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_a68cb] Error 1
make: *** [cmTC_a68cb/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
– Configuring incomplete, errors occurred!
Anyone got any ideas?