-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fail to build (link) executable using generated swift-sdk #7222
Comments
|
do you mind giving me a hint on the swift-sdk-generator that is going to produce usable 5.10 to test it on my side? |
This will generate one with the latest 5.11 snapshot.
Let me check the right invocation for 5.10 in a moment... |
Here's one for 5.10:
|
Thank you. I confirm that it is not an issue with Swift 5.10 and up. |
I'll reopen this for now, since apparently we don't check for |
fair enough. do you think it can be "backported" or just diagnostic and build going to fail? |
No backporting is possible, since |
I've meant automatic backport that going to use either -ld-path or -use-ld depends which one suppose to work with the toolchain |
I'm not sure there's a portable way to use Maybe @kabiroberai can clarify the context as the original author of that PR. |
This comment on the original PR has some relevant context: #6719 (comment) Passing a path to -use-ld might work in some cases but I don't think it's portable; another solution could be to set |
Swift Package Manager's linker flag handling changed between 5.9 and 5.10. The flags which work for 5.9 cause linking failures 5.10 and later, and vice versa: swiftlang/swift-package-manager#7222 This commit generates workaround flags for 5.9 and new-style flags for all other versions. The EndToEnd tests currently cannot run in CI, so this change was tested locally. (Issue swiftlang#145) * The basic 'hello world' example generated by `swift package init` built succesfully with 5.9.2, 5.10.1 and 6.0.2 SDKs on x86_64 and aarch64. * A more complex example using Vapor built succesfully with 5.9.2, 5.10.1. 6.0.2 failed because of the CShims problem reported in Issue swiftlang#138.
Swift Package Manager's linker flag handling changed between 5.9 and 5.10. The flags which work for 5.9 cause linking failures 5.10 and later, and vice versa: swiftlang/swift-package-manager#7222 This commit generates workaround flags for 5.9 and new-style flags for all other versions. The EndToEnd tests currently cannot run in CI, so this change was tested locally. (Issue swiftlang#145) * The basic 'hello world' example generated by `swift package init` built successfully with 5.9.2, 5.10.1 and 6.0.2 SDKs on x86_64 and aarch64. * A more complex example using Vapor built succesfully with 5.9.2, 5.10.1. 6.0.2 failed because of the CShims problem reported in Issue swiftlang#138.
Swift Package Manager's linker flag handling changed between 5.9 and 5.10. The flags which work for 5.9 cause linking failures 5.10 and later, and vice versa: swiftlang/swift-package-manager#7222 This commit generates workaround flags for 5.9 and new-style flags for all other versions. The EndToEnd tests currently cannot run in CI, so this change was tested locally. (Issue #145) * The basic 'hello world' example generated by `swift package init` built successfully with 5.9.2, 5.10.1 and 6.0.2 SDKs on x86_64 and aarch64. * A more complex example using Vapor built succesfully with 5.9.2, 5.10.1. 6.0.2 failed because of the CShims problem reported in Issue #138.
Description
Building executable with sdk generated with https://github.com/apple/swift-sdk-generator fail on unable to find linker error message
Expected behavior
build
Actual behavior
fatal error
Steps to reproduce
error
unable to find library
. the file at the path existsSwift Package Manager version/commit hash
3ce3894
Swift & OS version (output of
swift --version ; uname -a
)swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: arm64-apple-macosx14.0
The text was updated successfully, but these errors were encountered: