[oi-dev] LD_LIBRARY_PATH and Runpath issues.

Bob Friesenhahn bfriesen at simple.dallas.tx.us
Sun Oct 13 12:55:51 UTC 2019


On Sat, 12 Oct 2019, Jeremy Andrews wrote:
>
> I can get it to find the dist/bin libraries by hardcoding that path, but
> ideally I'd want to use something like $ORIGIN so the program doesn't
> have to rely on a hardcoded install path. I can't seem to get that flag
> working. I just want the binary to search the directory it's currently
> located in for libraries. I've tried -Wl,-R,\$$ORIGIN and
> -Wl,-R,\$ORIGIN, and neither one seems to work. When I run elfdump, I
> see that it keeps mangling the $ORIGIN flag in various ways... giving me
> RIGIN with the O cut off, or a string of numbers before ORIGIN, etc.

Maybe a linker script would work better?  It seems like layers of 
shell script must be trashing this option.

> And it is being exceptionally stubborn about GCC libraries. It simply
> won't look for them in /usr/bin/gcc/7/lib/amd64 even if that path is
> hardcoded in, requiring an LD_LIBRARY_PATH as an override. I'm using GCC
> 7 because the application apparently doesn't support GCC 6, and the
> system seemingly just won't have it without an explicit override.

This seems like a strange path (under /usr/bin) to compiler run-time 
libraries.  Hard coding paths to compiler-specific libraries may be 
avoided by using 'crle' to set system-wide search paths.  This way, if 
the compiler run-time library is installed somewhere else on a 
somewhat different system, it may be found due to this local 
configuration.

Bob
-- 
Bob Friesenhahn
bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt




More information about the oi-dev mailing list