Not setting LD_LIBRARY_PATH
is usually the right choice because usually the native binaries find their libraries using RUNPATH
which is specific to the binary. Setting LD_LIBRARY_PATH
has an obvious problem of potentially messing up other programs.
For things like scripting languages though, not having LD_LIBRARY_PATH
set presents a problem because they find the library from essentially a runtime string…
Not sure how to solve this, just some details of the problem.
Yes, that seems to be the convention. There’s a helper function lib.makeLibraryPath
that (IIUC) implements this convention.