pkgsrc-Users archive

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

cmake on macOS broken?



Hi!

I just installed cmake from the binary repository
(https://pkgsrc.joyent.com/packages/Darwin/11.0/x86_64/All) on macOS
Big Sur 11.6 and tried to build some software, but it fails
immediately:

wiz@iMac build % cmake ..
-- The C compiler identification is AppleClang 13.0.0.13000029
-- The CXX compiler identification is AppleClang 13.0.0.13000029
-- 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/pkg/share/cmake-3.21/Modules/CMakeTestCCompiler.cmake:69 (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/wiz/Projects/software/build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/make -f Makefile cmTC_07014/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_07014.dir/build.make CMakeFiles/cmTC_07014.dir/build
    Building C object CMakeFiles/cmTC_07014.dir/testCCompiler.c.o
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc    -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/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -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
LDFLAGS='-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib'
but then it fails during the build because it does not find pthread.h,
which the cmake configuration step did find.)
 Thomas


Home | Main Index | Thread Index | Old Index