Cmake在Mac OS 10.13和Xcode 9.2上失败(该文件是为不支持的文件格式构建的)

时间:2019-01-14 22:04:10

标签: xcode macos cmake

尝试在MacOS 10.13(高山脉)和Xcode9.2上运行cmake,但出现以下错误:

Run Build Command:"/usr/bin/make" "cmTC_ce16d/fast"
/Applications/Xcode_9.2.0_fb.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_ce16d.dir/build.make CMakeFiles/cmTC_ce16d.dir/build
Building C object CMakeFiles/cmTC_ce16d.dir/testCCompiler.c.o
/Applications/Xcode_9.2.0_fb.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc   -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk   -o CMakeFiles/cmTC_ce16d.dir/testCCompiler.c.o   -c /Users/brucexlin/whatsApp/webclient/voip/darwin/libminiupnpc/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_ce16d
/usr/local/Cellar/cmake/3.13.2/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ce16d.dir/link.txt --verbose=1
/Applications/Xcode_9.2.0_fb.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc   -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/cmTC_ce16d.dir/testCCompiler.c.o  -o cmTC_ce16d 
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd
ld: dynamic main executables must link with libSystem.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_ce16d] Error 1
make: *** [cmTC_ce16d/fast] Error 2

gcc --version:

Configured with: --prefix=/Applications/Xcode_9.2.0_fb.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode_9.2.0_fb.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

clang --version:

Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode_9.2.0_fb.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

有什么建议吗?

0 个答案:

没有答案