pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cmake on macOS broken?


I just installed cmake from the binary repository
( on macOS
Big Sur 11.6 and tried to build some software, but it fails

wiz@iMac build % cmake ..
-- The C compiler identification is AppleClang
-- The CXX compiler identification is AppleClang
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /Applications/
-- Check for working C compiler: /Applications/ - broken
CMake Error at /opt/pkg/share/cmake-3.21/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler


  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/wiz/Projects/software/build/CMakeFiles/CMakeTmp
    Run Build Command(s):/usr/bin/make -f Makefile cmTC_07014/fast && /Applications/  -f CMakeFiles/cmTC_07014.dir/build.make CMakeFiles/cmTC_07014.dir/build
    Building C object CMakeFiles/cmTC_07014.dir/testCCompiler.c.o
    /Applications/    -MD -MT CMakeFiles/cmTC_07014.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_07014.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_07014.dir/testCCompiler.c.o -c /Users/wiz/Projects/software/build/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_07014
    /opt/pkg/bin/cmake -E cmake_link_script CMakeFiles/cmTC_07014.dir/link.txt --verbose=1
    /Applications/ -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_07014.dir/testCCompiler.c.o -o cmTC_07014 
    ld: library not found for -lSystem
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [cmTC_07014] Error 1
    make: *** [cmTC_07014/fast] Error 2


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

That's with cmake-3.21.3nb2.  Does this work for anyone else, or does
anyone have an idea what the problem is?

(I found a workaround of setting
but then it fails during the build because it does not find pthread.h,
which the cmake configuration step did find.)

Home | Main Index | Thread Index | Old Index