-
Notifications
You must be signed in to change notification settings - Fork 10.5k
CMake build fails on macOS Sequoia with Xcode 16 release version #76631
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
Comments
Also fails with Xcode 16.1 Beta 2 swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.11 clang-1600.0.26.2) Xcode Version 16.1 beta 2 (16B5014f) |
Do you get a different result if you first revert the change in swiftlang/swift-testing#690? |
What's your thinking Stuart? |
@stmontgomery Yes, applying this diff on top of 47b127f1c98a9f4ff593288c7ee0c6618a912e6b allows the build to complete diff --git a/Sources/TestingMacros/CMakeLists.txt b/Sources/TestingMacros/CMakeLists.txt
index c916204..bb55f09 100644
--- a/Sources/TestingMacros/CMakeLists.txt
+++ b/Sources/TestingMacros/CMakeLists.txt
@@ -31,8 +31,8 @@ if(SwiftTesting_BuildMacrosAsExecutables)
set(FETCHCONTENT_BASE_DIR ${CMAKE_BINARY_DIR}/_d)
FetchContent_Declare(SwiftSyntax
GIT_REPOSITORY https://github.com/swiftlang/swift-syntax
- GIT_TAG cb53fa1bd3219b0b23ded7dfdd3b2baff266fd25) # 600.0.0
- FetchContent_MakeAvailable(SwiftSyntax)
+ GIT_TAG 27b74edd5de625d0e399869a5af08f1501af8837)
+FetchContent_MakeAvailable(SwiftSyntax)
endif() Edit: Double checked, 47b127f1 definitely still fails unaltered, and works with the diff applied when using Xcode 16.1 Beta 2 swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.11 clang-1600.0.26.2) |
Sounds like a compiler bug that's conflicting with the 600.0.0 tag. We aren't seeing the compiler issue with the latest main-branch toolchain (our CI is happy.) We should send this over to the Swift repo for triage, I think. |
Failed to build for me as well. |
I did see some interesting compiler warnings (visible in my gist in the initial post) about experimental features not being enabled as expected, so it could be some CMake flag trickery with the swift-testing repo and the imported swift-syntax target is causing conflicts that cause an unsupported configuration to be built. |
That's interesting to note. Here are those warnings pulled out for convenience:
|
This should resolve the issue: swiftlang/swift-syntax#2872 |
Thanks @rintaro ! I'll be happy to update that, once your fix lands in a new tag of swift-syntax. |
FWIW the same happens in a whole-toolchain build under macOS 15 w/ Xcode 16:
and AFAICT |
@Bo98 would you let know know your environment ?
|
Swift 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2), from Xcode 16.0
I've slimmed it down a bit to:
|
@Bo98 thank you for the info! The crash happens when
Building In short, package CMO enabled serialized |
Would I be correct in assuming this is tracked as rdar://134584629 (as indicated from #76338)? |
Good spot! Cherry-picking that onto 6.0.1 does indeed fix the build. |
@rintaro @bnbarham Can we get this fix cherry-picked to a 6.0.x release branch, so we can reference that newer tag from swift-testing's CMake rules? |
Description
Cloning the repo with Xcode 16 selected and CMake 3.30.3 fails to build using the following steps:
Xcode Version 16.0 (16A242d)
swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx15.0
cmake version 3.30.3
ninja version: 1.12.1
The build fails in the same way on both:
main: 47b127f1c98a9f4ff593288c7ee0c6618a912e6b
release/6.0.2: 3755346b1da0f611d3a8bd531831ac48c126b9d4
Expected behavior
Same build as
swift build
is producedActual behavior
Backtrace in the linked gist below
https://gist.github.com/ADKaster/8c62194d219a6f6599c2409d24e304e4
It appears to be a problem with swift-syntax?
Steps to reproduce
git clone
cd swift-testing
cmake -B build -GNinja
cmake --build build
swift-testing version/commit hash
47b127f1c98a9f4ff593288c7ee0c6618a912e6b
Swift & OS version (output of
swift --version ; uname -a
)swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx15.0
Darwin Andrews-MacBook-Pro.local 24.0.0 Darwin Kernel Version 24.0.0: Mon Aug 12 20:52:12 PDT 2024; root:xnu-11215.1.10~2/RELEASE_ARM64_T6020 arm64
The text was updated successfully, but these errors were encountered: