Skip to content
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

The build fails when setting the support platform to macOS 15 #7987

Open
1 task done
omochi opened this issue Sep 20, 2024 · 0 comments
Open
1 task done

The build fails when setting the support platform to macOS 15 #7987

omochi opened this issue Sep 20, 2024 · 0 comments
Labels

Comments

@omochi
Copy link
Contributor

omochi commented Sep 20, 2024

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

When setting the support platform to macOS 15, the build fails.

The following SwiftPM project has a simple structure that just uses a code generation plugin called SotoCode Generator.

https://github.com/omochi/swiftpm-mac15-bug

However, the following error occurs, and the build cannot be completed:

error: link command failed with exit code 1 (use -v to see invocation)
Undefined symbols for architecture arm64:
  "protocol witness table for SotoCore.JMESPathMatcher<A> : SotoCore.AWSWaiterMatcher in SotoCore", referenced from:
      (1) suspend resume partial function for Soto.EC2.waitUntilImageExists(_: Soto.EC2.DescribeImagesRequest, maxWaitTime: NIOCore.TimeAmount?, logger: Logging.Logger) async throws -> () in ec2_api.swift.o
      (1) suspend resume partial function for Soto.EC2.waitUntilInstanceExists(_: Soto.EC2.DescribeInstancesRequest, maxWaitTime: NIOCore.TimeAmount?, logger: Logging.Logger) async throws -> () in ec2_api.swift.o
      (1) suspend resume partial function for Soto.EC2.waitUntilInternetGatewayExists(_: Soto.EC2.DescribeInternetGatewaysRequest, maxWaitTime: NIOCore.TimeAmount?, logger: Logging.Logger) async throws -> () in ec2_api.swift.o
      (1) suspend resume partial function for Soto.EC2.waitUntilKeyPairExists(_: Soto.EC2.DescribeKeyPairsRequest, maxWaitTime: NIOCore.TimeAmount?, logger: Logging.Logger) async throws -> () in ec2_api.swift.o
      (1) suspend resume partial function for Soto.EC2.waitUntilPasswordDataAvailable(_: Soto.EC2.GetPasswordDataRequest, maxWaitTime: NIOCore.TimeAmount?, logger: Logging.Logger) async throws -> () in ec2_api.swift.o
      (1) suspend resume partial function for Soto.EC2.waitUntilSecurityGroupExists(_: Soto.EC2.DescribeSecurityGroupsRequest, maxWaitTime: NIOCore.TimeAmount?, logger: Logging.Logger) async throws -> () in ec2_api.swift.o
      (1) suspend resume partial function for Soto.ECS.waitUntilServicesStable(_: Soto.ECS.DescribeServicesRequest, maxWaitTime: NIOCore.TimeAmount?, logger: Logging.Logger) async throws -> () in ecs_api.swift.o
      ...

This is because the support platform is set to macOS 15 or later as follows:

    platforms: [.macOS(.v15)],

Curiously, when loosening this to macOS 14 or later, the build succeeds.

    platforms: [.macOS(.v14)],

Expected behavior

Build succeeds.

Actual behavior

Build fails with linker error.

Steps to reproduce

$ git clone https://github.com/omochi/swiftpm-mac15-bug
$ cd swiftpm-mac15-bug
$ swift build
...
error: link command failed with exit code 1 (use -v to see invocation)
...
$ vim Package.swift # change to macOS 14
$ swift build
...
Build complete! (80.98s)

Swift Package Manager version/commit hash

Swift Package Manager - Swift 6.0.0-dev

Swift & OS version (output of swift --version ; uname -a)

$ swift --version
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
$ uname -a
Darwin omochi-mbp.local 24.1.0 Darwin Kernel Version 24.1.0: Mon Sep  2 20:00:14 PDT 2024; root:xnu-11215.40.48~33/RELEASE_ARM64_T6020 arm64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant