Reputation: 37
I am trying to build a project using cmake. however when cmake verifies whether I have a working c compiler it fails with the output:
Run Build Command(s):/usr/bin/make -f Makefile cmTC_a842e/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_a842e.dir/build.make CMakeFiles/cmTC_a842e.dir/build
Building C object CMakeFiles/cmTC_a842e.dir/testCCompiler.c.o
/usr/bin/clang -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -MD -MT CMakeFiles/cmTC_a842e.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_a842e.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_a842e.dir/testCCompiler.c.o -c /Users/simon/Desktop/Sommer22/DA_Lab/cpp_impl/lab22-p4-streaming/SHJ_producer_consumer/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_a842e
/usr/local/Cellar/cmake/3.24.0/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a842e.dir/link.txt --verbose=1
/usr/bin/clang -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_a842e.dir/testCCompiler.c.o -o cmTC_a842e
ld: library not found for -lSystem
indeed, I do not have a libSystem.dylib installed on my Mac.
I am using clang 13 to build it.
Upvotes: -2
Views: 227
Reputation: 37
deleting CommandLine tools directory and doing Xcode-select --install fixed the problem
Upvotes: 0