You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmake fails to verify that clang can build a simple test program.
We will need to upgrade eventually since GitHub removes older xcode versions over time. My rough estimate is that we probably have about a year before that happens. I think it would be good to be prepared. There is also the possibility that GitHub will drop the x86_64 macos runners, in which case this will be moot.
I tested Xcode 15, but that still had the same problems.
Cmake error
The cmake error looks like this:
-- Check for working C compiler: /Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin/clang - broken
The C compiler
"/Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin/clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/Users/runner/work/rust/rust/build/x86_64-apple-ios/native/sanitizers/build/CMakeFiles/CMakeScratch/TryCompile-DlTLuP'
Run Build Command(s): /usr/local/bin/ninja -v cmTC_4a181
[1/2] /Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin/clang --target=x86_64-apple-ios -fPIC --target=x86_64-apple-ios -m64 -mios-simulator-version-min=7.0 -isysroot /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk -fembed-bitcode -fdebug-prefix-map=/Users/runner/work/rust/rust=/rustc/llvm -fembed-bitcode=off -MD -MT CMakeFiles/cmTC_4a181.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_4a181.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_4a181.dir/testCCompiler.c.o -c /Users/runner/work/rust/rust/build/x86_64-apple-ios/native/sanitizers/build/CMakeFiles/CMakeScratch/TryCompile-DlTLuP/testCCompiler.c
[2/2] : && /Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin/clang --target=x86_64-apple-ios -fPIC --target=x86_64-apple-ios -m64 -mios-simulator-version-min=7.0 -isysroot /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk -fembed-bitcode -fdebug-prefix-map=/Users/runner/work/rust/rust=/rustc/llvm -fembed-bitcode=off -Wl,-search_paths_first -static-libstdc++ CMakeFiles/cmTC_4a181.dir/testCCompiler.c.o -o cmTC_4a181 && :
FAILED: cmTC_4a181
: && /Users/runner/work/rust/rust/clang+llvm-14.0.5-x86_64-apple-darwin/bin/clang --target=x86_64-apple-ios -fPIC --target=x86_64-apple-ios -m64 -mios-simulator-version-min=7.0 -isysroot /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk -fembed-bitcode -fdebug-prefix-map=/Users/runner/work/rust/rust=/rustc/llvm -fembed-bitcode=off -Wl,-search_paths_first -static-libstdc++ CMakeFiles/cmTC_4a181.dir/testCCompiler.c.o -o cmTC_4a181 && :
clang-14: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
ld: unknown options: -ios_simulator_version_min
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:14 (project)
One workaround is to set USE_XCODE_CLANG: 1 in ci.yml. I'm not sure if there is a strong reason to use USE_XCODE_CLANG or not. Another possibility is to update the pre-built clang to match the version in Xcode and see if that helps. My guess is that having clang and ld out of sync might contribute to the problem.
The text was updated successfully, but these errors were encountered:
ehuss
added
O-macos
Operating system: macOS
T-infra
Relevant to the infrastructure team, which will review and decide on the PR/issue.
A-ci
Area: Our Github Actions CI
labels
Feb 13, 2024
In #120914 we downgraded Xcode from 14 to 13 due to two issues:
invalid r_symbolnum
when testing craneliftWe will need to upgrade eventually since GitHub removes older xcode versions over time. My rough estimate is that we probably have about a year before that happens. I think it would be good to be prepared. There is also the possibility that GitHub will drop the x86_64 macos runners, in which case this will be moot.
I tested Xcode 15, but that still had the same problems.
Cmake error
The cmake error looks like this:
One workaround is to set
USE_XCODE_CLANG: 1
inci.yml
. I'm not sure if there is a strong reason to useUSE_XCODE_CLANG
or not. Another possibility is to update the pre-built clang to match the version in Xcode and see if that helps. My guess is that having clang and ld out of sync might contribute to the problem.The text was updated successfully, but these errors were encountered: