Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble building with CMake after long hiatus #8

Open
PaulWessel opened this issue Nov 30, 2023 · 2 comments
Open

Trouble building with CMake after long hiatus #8

PaulWessel opened this issue Nov 30, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@PaulWessel
Copy link
Owner

Wonder if someone knows what these Cmake errors are caused by. It has been several macOS version since I last tried to build gsfml so probably needing some updates. Running make config in the TOOLS directory (create build directory and run cmake) yields this output:

make config
mkdir -p build
(cd build; cmake -DCMAKE_INSTALL_PREFIX=gsfml -DCMAKE_BUILD_TYPE=Release ..)
CMake Warning at /opt/local/share/cmake-3.24/Modules/Platform/Darwin-Initialize.cmake:303 (message):
  Ignoring CMAKE_OSX_SYSROOT value:

   /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk

  because the directory does not exist.
Call Stack (most recent call first):
  /opt/local/share/cmake-3.24/Modules/CMakeSystemSpecificInitialize.cmake:21 (include)
  CMakeLists.txt:32 (project)


-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- 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/local/share/cmake-3.24/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/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gsfml/TOOLS/build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/opt/local/bin/gmake -f Makefile cmTC_b1040/fast && gmake[1]: Entering directory '/Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gsfml/TOOLS/build/CMakeFiles/CMakeTmp'
    /opt/local/bin/gmake  -f CMakeFiles/cmTC_b1040.dir/build.make CMakeFiles/cmTC_b1040.dir/build
    gmake[2]: Entering directory '/Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gsfml/TOOLS/build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_b1040.dir/testCCompiler.c.o
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc   -arch arm64 -MD -MT CMakeFiles/cmTC_b1040.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_b1040.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_b1040.dir/testCCompiler.c.o -c /Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gsfml/TOOLS/build/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_b1040
    /opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b1040.dir/link.txt --verbose=1
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc  -arch arm64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_b1040.dir/testCCompiler.c.o -o cmTC_b1040 
    ld: library not found for -lSystem
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    gmake[2]: *** [CMakeFiles/cmTC_b1040.dir/build.make:100: cmTC_b1040] Error 1
    gmake[2]: Leaving directory '/Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gsfml/TOOLS/build/CMakeFiles/CMakeTmp'
    gmake[1]: *** [Makefile:127: cmTC_b1040/fast] Error 2
    gmake[1]: Leaving directory '/Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gsfml/TOOLS/build/CMakeFiles/CMakeTmp'
    
    

  

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


-- Configuring incomplete, errors occurred!
See also "/Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gsfml/TOOLS/build/CMakeFiles/CMakeOutput.log".
See also "/Users/pwessel/UH/RESEARCH/CVSPROJECTS/GMTdev/gsfml/TOOLS/build/CMakeFiles/CMakeError.log".
make: *** [config] Error 1

@PaulWessel PaulWessel added the bug Something isn't working label Nov 30, 2023
@PaulWessel PaulWessel self-assigned this Nov 30, 2023
@seisman
Copy link

seisman commented Dec 1, 2023

It's likely that your clang is broken and can't find the "System" library.

    ld: library not found for -lSystem
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

@PaulWessel
Copy link
Owner Author

OK, I guess I just reinstall clang from macport then, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants