Nikita Karetnikov <nik...@karetnikov.org> skribis:

>> ‘ld-wrapper’ is a wrapper around the linker that adds a -rpath argument
>> for each -l argument (see the top of ld-wrapper.scm), such that all the
>> needed libraries are in the resulting binary’s RUNPATH.
>
> Could you show how it helps to avoid the need to set environment
> variables?

In the general case, you wouldn’t want to type:

  export LD_LIBRARY_PATH=/nix/store/foo:/nix/store/bar:...

More importantly, you could easily get it wrong, leading to crashes or
random behavior.

Setting RUNPATH at build time allows us to live our computing life in
peace and harmony.

HTH.  :-)

Ludo’.

Reply via email to