Reputation: 1018
I'm trying to force a build internal pre-processor used for built-sources to not rely on shared libraries installed in my host machine without having to uninstall them.
Although there is a LD_PRELOAD
environment variable which forces the loader (ld-linux) to fetch the specified shared libraries before anything else, I'd like to do quite the opposite, forcing the loader not to fetch the specified libraries during the setup process (kind of LD_NEVERLOAD
variable).
Is there some way to do so without breaking my entire system (aka, removing such libraries)?
PS: I've renamed my system libraries to test this specific use case, but this is definitely not an elegant way of doing so.
Upvotes: 4
Views: 1002
Reputation: 66273
Reading the manual pages ld(1)
and ld.so(8)
you might try playing with LD_LIBRARY_PATH
, LD_RUNPATH
and options in both manuals which are related to "rpath".
Upvotes: 2