Skip to content

[lldb][Swift][CMake] Correct RUNPATH in Linux builds #7331

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 28, 2023

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Aug 27, 2023

  • When LLDB_BUILD_FRAMEWORK is not enabled, liblldb is built/installed in 'lib/'. Pass the correct path to 'add_properties_for_swift_modules
  • '$ORIGIN' instead of '@loader_path' in Linux-like platforms

* When LLDB_BUILD_FRAMEWORK is not enabled, liblldb is built/installed
  in 'lib/'. Pass the correct path to 'add_properties_for_swift_modules
* '$ORIGIN' instead of '@loader_path' in Linux-like platforms
@finagolfin
Copy link
Member

Please check the resulting rpaths on linux for any libraries you put in usr/lib/swift/host/. Right now, there is only one host library and its rpath is set wrong, ie that second path doesn't exist:

> readelf -d swift-DEVELOPMENT-SNAPSHOT-2023-08-25-a-ubuntu20.04/usr/lib/swift/host/lib_InternalSwiftScan.so |ag runpath
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN:$ORIGIN/./swift/linux]

I tried to notify that author months ago, but nothing has changed.

@rintaro
Copy link
Member Author

rintaro commented Aug 27, 2023

Huh, thanks for notifying. I will fix that in my swift repo PR 👍

Copy link

@bnbarham bnbarham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need this change cherry-picked to next + stable/20230725 as well

@rintaro
Copy link
Member Author

rintaro commented Aug 28, 2023

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Aug 28, 2023

Windows failure seems to be unrelated

          Start 1342: TestFoundation.TestProcess-test_redirect_stdout_using_null
Build timed out (after 60 minutes). Marking the build as aborted.
Build was aborted

@rintaro rintaro merged commit 5903ab1 into swiftlang:stable/20221013 Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants