Skip to content

[Linux] Set rpath in add_swift_executable. #67712

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

Merged
merged 1 commit into from
Aug 5, 2023

Conversation

al45tair
Copy link
Contributor

@al45tair al45tair commented Aug 3, 2023

Because the rpath isn't set, the dynamic linker can't find the Swift libraries when we try to run swift-backtrace on Linux (when we actually install everything).

rdar://113337854

Because the rpath isn't set, the dynamic linker can't find the Swift
libraries when we try to run `swift-backtrace` on Linux (when we
actually install everything).

rdar://113337854
@al45tair al45tair requested a review from a team as a code owner August 3, 2023 15:54
@al45tair
Copy link
Contributor Author

al45tair commented Aug 3, 2023

@swift-ci Please test

@al45tair al45tair added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels Aug 3, 2023
@al45tair
Copy link
Contributor Author

al45tair commented Aug 3, 2023

Explanation: Having actually got swift-backtrace installed in the nightly Docker image, I discovered that we haven't set the rpath for the binary for Linux, so it can't find the Swift libraries.
Risk: Low. Only affects Linux (the swift-backtrace program isn't installed on Windows; we already set the rpath for macOS).
Original PR: #67711
Reviewed by: @mikeash
Resolves: rdar://113337854
Tests: There aren't any explicit tests for the actual installation. We will be checking the Docker images to make sure that the backtracer is installed there and works (that's how I found this, in fact).

@al45tair
Copy link
Contributor Author

al45tair commented Aug 3, 2023

@swift-ci Please test linux platform

@al45tair
Copy link
Contributor Author

al45tair commented Aug 3, 2023

@swift-ci Please test Windows platform

@al45tair
Copy link
Contributor Author

al45tair commented Aug 3, 2023

@swift-ci Please test linux platform

@al45tair
Copy link
Contributor Author

al45tair commented Aug 3, 2023

@swift-ci Please test Windows platform

@al45tair
Copy link
Contributor Author

al45tair commented Aug 4, 2023

@swift-ci Please test Linux platform

@al45tair
Copy link
Contributor Author

al45tair commented Aug 4, 2023

@swift-ci Please test Windows platform

@al45tair
Copy link
Contributor Author

al45tair commented Aug 4, 2023

@swift-ci Please test linux platform

@al45tair al45tair merged commit 09a4f35 into swiftlang:release/5.9 Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants