[swift-users] Dynamic linker DT_RPATH

Daniel Dunbar daniel_dunbar at apple.com
Fri Dec 4 22:49:28 CST 2015

> On Dec 4, 2015, at 6:37 PM, Ugo Arangino <swift at ua94.de> wrote:
> Why is the Dynamic linker DT_RPATH set, instead of configure it like this `/etc/ld.so.conf.d/swift.conf` or copying the libraries to a appropriate place?

For the initial release, we felt it was more important for things to work locally (and simply) for people downloading our snapshots than to support this and have more complicated installation instructions. We also suspected that people would quickly try things like building Docker images with Swift, and this problem doesn't show up for users who are building their projects that way.

That said, we would welcome concrete proposals for how to improve the support for portable or distributable binaries. Those proposals should take into account whatever is happening with regard to system Swift packages.

 - Daniel

> If I install Swift for Linux on different systems in different directories I can’t run the same binary.
> The swift linux shared objects path ist hardcoded.
>> objdump -p Hello 
> Dynamic Section
>  NEEDED               libswiftCore.so
> ...
>  RPATH                /opt/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu15.10/usr/lib/swift/linux
> ...
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

More information about the swift-users mailing list