iOS SDK13 - Detecting C/CXX compiler ABI info - failed
CMake Version:
/Applications/CMake.app/Contents/bin/cmake --version
cmake version 3.15.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
IPhoneOS SDK Version
xcrun --sdk iphoneos --show-sdk-version
13.0
CMakeList.txt
cmake_minimum_required(VERSION 3.14)
project(foo)
add_library(foo foo.cpp)
install(TARGETS foo DESTINATION lib)
ios.toolchain.cmake
set(CMAKE_SYSTEM_NAME iOS)
set(CMAKE_DEBUG_POSTFIX d)
Execute:
/Applications/CMake.app/Contents/bin/cmake -S. -B_build -GXcode -DCMAKE_TOOLCHAIN_FILE=ios.toolchain.cmake
stdout
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Check for working C compiler: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Check for working C compiler: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-- Check for working CXX compiler: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/joergboehme/Development/cmakeexample/_build
CMakeError.log
Detecting C compiler ABI info failed to compile with the following output:
Change Dir: /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/xcodebuild -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_4e6b7 -configuration Debug -hideShellScriptEnvironment && User defaults from command line:
HideShellScriptEnvironment = YES
Prepare build
note: Using legacy build system
=== BUILD TARGET cmTC_4e6b7 OF PROJECT CMAKE_TRY_COMPILE WITH CONFIGURATION Debug ===
Check dependencies
Write auxiliary files
/bin/mkdir -p /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/Objects-normal/arm64
write-file /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/Objects-normal/arm64/cmTC_4e6b7d.LinkFileList
CompileC CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/Objects-normal/arm64/CMakeCCompilerABI.o /Applications/CMake.app/Contents/share/cmake-3.15/Modules/CMakeCCompilerABI.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -target arm64-apple-ios13.0 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DCMAKE_INTDIR=\"Debug-iphoneos\" -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk -fstrict-aliasing -Wdeprecated-declarations -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -fembed-bitcode-marker -I/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/Debug/include -I/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/DerivedSources-normal/arm64 -I/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/DerivedSources/arm64 -I/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/DerivedSources -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/Debug -v -Wl,-v -MMD -MT dependencies -MF /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/Objects-normal/arm64/CMakeCCompilerABI.d --serialize-diagnostics /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/Objects-normal/arm64/CMakeCCompilerABI.dia -c /Applications/CMake.app/Contents/share/cmake-3.15/Modules/CMakeCCompilerABI.c -o /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/Objects-normal/arm64/CMakeCCompilerABI.o
Apple clang version 11.0.0 (clang-1100.0.33.5)
Target: arm64-apple-ios13.0
Thread model: posix
InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: warning: -Wl,-v: 'linker' input unused [-Wunused-command-line-argument]
"/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple arm64-apple-ios13.0.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -fembed-bitcode=marker -fembed-bitcode=marker -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-sdk-version=13.0 -target-cpu cyclone -target-feature +fp-armv8 -target-feature +neon -target-feature +crypto -target-feature +zcm -target-feature +zcz -target-feature +sha2 -target-feature +aes -target-abi darwinpcs -fallow-half-arguments-and-returns -dwarf-column-info -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb -ggnu-pubnames -target-linker-version 512.4 -v -coverage-notes-file /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/Objects-normal/arm64/CMakeCCompilerABI.gcno -resource-dir /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0 -dependency-file /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/Objects-normal/arm64/CMakeCCompilerABI.d -skip-unused-modulemap-deps -MT dependencies -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk -D "CMAKE_INTDIR=\"Debug-iphoneos\"" -I /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/Debug/include -I /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/DerivedSources-normal/arm64 -I /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/DerivedSources/arm64 -I /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/DerivedSources -F/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/Debug -O0 -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -Wno-framework-include-private-from-public -Wno-atimport-in-framework-header -Wno-extra-semi-stmt -Wno-quoted-include-in-framework-header -fdebug-compilation-dir /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp -ferror-limit 19 -fmacro-backtrace-limit 0 -fmessage-length 0 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fobjc-runtime=ios-13.0.0 -fpascal-strings -fmax-type-align=16 -fdiagnostics-show-option -fdiagnostics-show-note-include-stack -serialize-diagnostic-file /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/Objects-normal/arm64/CMakeCCompilerABI.dia -o /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/Objects-normal/arm64/CMakeCCompilerABI.o -x c /Applications/CMake.app/Contents/share/cmake-3.15/Modules/CMakeCCompilerABI.c
clang -cc1 version 11.0.0 (clang-1100.0.33.5) default target x86_64-apple-darwin18.7.0
ignoring nonexistent directory "/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/Debug/include"
ignoring nonexistent directory "/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/DerivedSources-normal/arm64"
ignoring nonexistent directory "/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/DerivedSources/arm64"
ignoring nonexistent directory "/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/DerivedSources"
ignoring nonexistent directory "/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/Debug (framework directory)
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk/usr/include
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk/System/Library/Frameworks (framework directory)
End of search list.
Libtool Debug/libcmTC_4e6b7d.a normal arm64
cd /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only arm64 -D -syslibroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk -L/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/Debug -filelist /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug-iphoneos/cmTC_4e6b7.build/Objects-normal/arm64/cmTC_4e6b7d.LinkFileList -o /Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/Debug/libcmTC_4e6b7d.a
** BUILD SUCCEEDED **
Cannot copy output executable
''
to destination specified by COPY_FILE:
'/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/3.15.3/CMakeDetermineCompilerABI_C.bin'
Unable to find the executable at any of:
/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/libcmTC_4e6b7.a
/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/Debug/libcmTC_4e6b7.a
/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/Debug/cmTC_4e6b7.app/libcmTC_4e6b7.a
/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/cmTC_4e6b7.app/libcmTC_4e6b7.a
/Users/joergboehme/Development/cmakeexample/_build/CMakeFiles/CMakeTmp/Development/libcmTC_4e6b7.a
I find following problem:
With CMAKE_DEBUG_POSTFIX=d
the compiled output lib is named like: libcmTC_4e6b7d.a
instead of libcmTC_4e6b7.a
, but in the function cmCoreTryCompile::FindOutputFile() Line 1033 I see that only the target
name is used and here the targe name is cmTC_4e6b7
It is not a big bug and even cmake is not failing but it is looking scary when the ABI check fails.