You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling a small rust program with multirust (using stable rust), the resulting binary embed a relative RPATH (which is used for dynamic lib locating), as seen with objdump (look for the RPATH line):
Though DYLD_LIBRARY_PATH appears to be correctly set to an absolute path:
$ multirust run stable bash -c 'echo $DYLD_LIBRARY_PATH'
/home/gyscos/.multirust/toolchains/stable/lib:
This simple program happen to not need any of these dynamic libraries, but for other, bigger ones that do rely on these libraries, using relative RPATH obviously lead to dynamic linking error after moving the binary (a concrete example of that is rusti).
Is this a multirust issue or a rust one? Or is it just my installation?
EDIT: apparently people just don't like rpaths, and want us to set LD_LIBRARY_PATH instead. Oh well. Any way to easily add the current toolchain to this path?
The text was updated successfully, but these errors were encountered:
This is the behavior of the -C rpath flag to the compiler. It's known to be kinda buggy, though once upon a time it encoded both the relative and absolute paths in an attempt to make things just work.
Because it's unreliable across platforms there's a bug open to just disable it completely.
I'd be open to having a command that sets the LD_LIBRARY_PATH correctly via source, e.g. source multirust env nightly.
When compiling a small rust program with multirust (using stable rust), the resulting binary embed a relative RPATH (which is used for dynamic lib locating), as seen with objdump (look for the RPATH line):
Though
DYLD_LIBRARY_PATH
appears to be correctly set to an absolute path:This simple program happen to not need any of these dynamic libraries, but for other, bigger ones that do rely on these libraries, using relative RPATH obviously lead to dynamic linking error after moving the binary (a concrete example of that is rusti).
Is this a multirust issue or a rust one? Or is it just my installation?
EDIT: apparently people just don't like rpaths, and want us to set
LD_LIBRARY_PATH
instead. Oh well. Any way to easily add the current toolchain to this path?The text was updated successfully, but these errors were encountered: