Navigation Menu

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

[SR-9182] Not detecting libraries deployed with binary, $ escaped in runpath #4885

Open
swift-ci opened this issue Nov 5, 2018 · 4 comments
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Nov 5, 2018

Previous ID SR-9182
Radar None
Original Reporter trametheka (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler, Package Manager
Labels Bug, Screened
Assignee None
Priority Medium

md5: 1685ab99f5197a7100a6205822ad3e93

Issue Description:

I'm not sure if something has changed in the package manager or compiler or something else sorry, so I'll tag both.

In previous version of Swift, I've been able to deploy libraries beside the compiled binary (on Ubuntu in this case).

As of 4.2.1, libraries are not detected beside the binary. It looks like that rpath is being escaped and breaking this.

4.1.2 binary:

readelf -d test
<snip>
0x000000000000001d (RUNPATH)            Library runpath: [/home/eric/.swiftenv/versions/4.1.2/usr/lib/swift/linux:$ORIGIN]

4.2.1 binary:

readelf -d test
<snip>
0x000000000000001d (RUNPATH)            Library runpath: [/home/eric/.swiftenv/versions/4.2.1/usr/lib/swift/linux:\$ORIGIN]

Building with -Xlinker -rpath=$ORIGIN is also escaped to \$ORIGIN.

@belkadan
Copy link

belkadan commented Nov 5, 2018

@compnerd, @aciidb0mb3r, someone just fixed this on master, didn't they? I didn't realize it had escaped to the 4.2 branch. :-(

@ankitspd
Copy link
Member

ankitspd commented Jan 2, 2019

I haven't been able to reproduce this

@swift-ci
Copy link
Contributor Author

Comment by Eric Thorpe (JIRA)

Sorry @aciidb0mb3r, been away from swift for a while. I can no longer reproduce this either. I have two VMs Ubuntu 16.04, one desktop, one server, both exhibiting this behaviour on build. I've run up some new 16.04 installs using the same swift download and having no problems now. I guess I'll write it off to something in those VMs, archive them and move on. Thanks for taking a look.

@swift-ci
Copy link
Contributor Author

Comment by Eric Thorpe (JIRA)

This issue has resurfaced and I'm at a loss to understand what's going on. I have it with some projects, but not others. One way I've been able to consistently replicate it:

Ubuntu 16.04.5 Desktop clean and up to date

sudo apt install clang libicu-dev libpython2.7 libssl-dev git curl

Install Swift, swiftenv, following Swift.org instructions or via Vapors deb repo seems to make no difference, 4.2+

git clone https://github.com/vapor/auth-template.git

cd auth-template && swift build

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
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

4 participants