[rust-dev] Impending change in RPATH behavior when linking to Rust dynamic libraries

Ilya Dmitrichenko errordeveloper at gmail.com
Sat Jul 12 17:08:03 PDT 2014

On 13 July 2014 00:43, Stepan Koltsov <stepan.koltsov at gmail.com> wrote:

> -- want to have several versions of rust side by side to investigate problems

Not true, the share object files include git revision in the name and
that's what they are being looked up by, as far as I understood.

So one can have:

DYLD_LIBRARY_PATH = /opt/Rust/0/lib/:/opt/Rust/1/lib/:/opt/Rust/2/lib/

My layout is like this:

cd /opt; ls Rust/versions/*/*/lib/libnative-*


> -- need different fixed per-project environments

They will only need to care about executable path, which is something
they would need to care about even if this change hadn't been made.

> -- don't have permission to write into /usr/local (typically on shared
> servers)

Is is not a valid reason, they can unpack the tarball into any prefix.

> -- don't want to have a mess in /usr/local

Sure, so I personally put it under /opt/Rust/

>> As detailed in the meeting where this decision was made, Linux distros
>> really dislike it when you mess with rpath; it's a deal-breaker in many
>> cases.
> I don't know about all Linux distros, but apparently Ubuntu is OK about
> rpath:
> $ objdump -x /usr/lib/jvm/java-7-openjdk-amd64/bin/java | grep RPATH
> $ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64:$ORIGIN/../jre/lib/amd64

Ubuntu is not the best example of how an OS should be built. It's
probably a longstanding OpenJDK issue too, did you check?

More information about the Rust-dev mailing list