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-9251: Add $ORIGIN into libFoundation.so RUNPATH #1769

Merged
merged 1 commit into from Nov 15, 2018

Conversation

spevans
Copy link
Collaborator

@spevans spevans commented Nov 15, 2018

libFoundation.so does not have $ORIGIN in its RUNPATH so it cant find the ICU libraries installed in usr/lib/swift/linux

With this PR the path now looks like :

$ readelf -aW ~/swift-install/usr/lib/swift/linux/libFoundation.so |grep RUNPATH
0x000000000000001d (RUNPATH)            Library runpath: [/home/spse/swift-source/build/buildbot_linux/swift-linux-x86_64/lib/swift/linux:/home/spse/swift-source/build/buildbot_linux/libdispatch-linux-x86_64/src:$ORIGIN]

@spevans
Copy link
Collaborator Author

spevans commented Nov 15, 2018

@swift-ci test

@benlangmuir
Copy link
Member

@spevans what do you think of adding a canary to https://github.com/apple/swift-integration-tests for running a simple file that imports Foundation?

@spevans
Copy link
Collaborator Author

spevans commented Nov 15, 2018

Sounds like a good idea. I haven't looked at swift-integration-tests before, but I will see what I can do. I think it is also worth adding some tests to check the RUNPATH in the .so files - they also seem to be accumulating some temporary build directories so I think they need to be cleaned up a bit.

@eeckstein
Copy link
Member

Can we merge this?

@spevans
Copy link
Collaborator Author

spevans commented Nov 15, 2018

@benlangmuir I had a look and there is actually a test for Foundation already in swift-integration-tests however it passes because the build directory is currently in the RUNPATH. I will do a 2nd PR to remove this but it will require some CMake changes to setup LD_LIBRARY_PATH for the TestFoundation tests to run so will be a while.

@spevans
Copy link
Collaborator Author

spevans commented Nov 15, 2018

cc @millenomi

@benlangmuir
Copy link
Member

Thanks for looking into it @spevans ! Obviously getting the new test is not a blocker for fixing the bug.

@eeckstein
Copy link
Member

ok, thanks. I'll merge it now to unblock ci

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.

None yet

3 participants