-
-
Notifications
You must be signed in to change notification settings - Fork 464
Open
Labels
Description
Describe the bug
Since Xcode 16.3 any build using this toolchain file for PLATFORM=MAC_UNIVERSAL fails during configuration with clang: error: version 'arm64' in target triple 'arm64-apple-macosx11.0-arm64' is invalid
. Looking through our CI logs, this was not a problem for Xcode 16.2. Cmake version is pinned by Nix so that is not an issue either.
To Reproduce
Steps to reproduce the behavior:
- Create a minimal c++ hello world example using cmake
- build with this toolchain file and
-DPLATFORM=MAC_UNIVERSAL
Full output is
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - broken
CMake Error at /usr/local/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/Users/vv/Downloads/cmakeg/build/CMakeFiles/CMakeScratch/TryCompile-mNVkdp'
Run Build Command(s): /usr/local/bin/cmake -E env VERBOSE=1 /run/current-system/sw/bin/make -f Makefile cmTC_1eb89/fast
/run/current-system/sw/bin/make -f CMakeFiles/cmTC_1eb89.dir/build.make CMakeFiles/cmTC_1eb89.dir/build
make[1]: Entering directory '/Users/vv/Downloads/cmakeg/build/CMakeFiles/CMakeScratch/TryCompile-mNVkdp'
Building C object CMakeFiles/cmTC_1eb89.dir/testCCompiler.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --target=x86_64-arm64-apple-macosx11.0 -target x86_64-arm64-apple-macosx11.0 -fvisibility=hidden -fvisibility-inlines-hidden -target x86_64-arm64-apple-macosx11.0 -fvisibility=hidden -fvisibility-inlines-hidden -arch x86_64 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk -mmacosx-version-min=11.0 -fvisibility=hidden -MD -MT CMakeFiles/cmTC_1eb89.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_1eb89.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_1eb89.dir/testCCompiler.c.o -c /Users/vv/Downloads/cmakeg/build/CMakeFiles/CMakeScratch/TryCompile-mNVkdp/testCCompiler.c
clang: error: version 'arm64' in target triple 'arm64-apple-macosx11.0-arm64' is invalid
make[1]: *** [CMakeFiles/cmTC_1eb89.dir/build.make:82: CMakeFiles/cmTC_1eb89.dir/testCCompiler.c.o] Error 1
make[1]: Leaving directory '/Users/vv/Downloads/cmakeg/build/CMakeFiles/CMakeScratch/TryCompile-mNVkdp'
make: *** [Makefile:134: cmTC_1eb89/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
Environment
-
Cmake versions 3.30.5 and 4.0.0 (identical error)
-
Your faulty CMakeLists.txt here:
cmake_minimum_required(VERSION 3.10)
project (example)
add_executable(eg example.cpp)
and c++ file
#include <iostream>
int main() {
std::cout << "hello" << std::endl;
}
bugra9 and zhivkob