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-8890] Linker sometimes sets runtime path incorrectly on Linux with Swift 4.2 #4890

Open
swift-ci opened this issue Oct 1, 2018 · 4 comments
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Oct 1, 2018

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

md5: fcda6fd07d82bd82a985fcf6232bbf42

Issue Description:

See: https://forums.swift.org/t/weird-linker-bug-with-swift-4-2

Unfortunately, I can't seem to be able to reliably reproduce this with an example repository, the issue doesn't appear in all repositories and I can't share our source code.

@swift-ci
Copy link
Contributor Author

Comment by Tobias H (JIRA)

I think I ran into the same bug. I’m trying to use „VaporMonitoring“. Everything works fine when building and running on my Mac. But when I do the same under Linux the app won’t start because it can’t find .

I extracted the failing build in this repo:
https://github.com/t089/VaporMonitoring/tree/libmemplugin-bug?files=1

You can build and run on macOS. If you use the supplied Dockerfile, the build will succeed bin you won’t be able to run it.

docker build -t test .
docker run -it test —env testing

Hope this helps.

@ankitspd
Copy link
Member

t089 (JIRA User) Your issue is different. You're copying the binary in /app and libs in /usr/lib. The MonitoringExample binary has the rpaths: /usr/lib/swift/linux:$ORIGIN so it is failing to find the libs in /usr/lib. It should work if you copy the libs in /app directory.

@swift-ci
Copy link
Contributor Author

Comment by Tobias H (JIRA)

Ah, yes, my mistake. Thank you!

@swift-ci
Copy link
Contributor Author

swift-ci commented May 3, 2019

Comment by Pierpaolo Frasa (JIRA)

FWIW, I wasn't able to reproduce this bug with our repository with Swift 5.0.1, although I can't say whether it was due to any of our changes in the meantime or a fix in Swift 5.

@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

3 participants