Merged
Conversation
For certain build systems (e.g. nix, guix, spack) we need to tell libwhich about non-standard search paths. Currently the only way of doing so is by setting `LD_LIBRARY_PATH`, which difficult to scope just to libwhich execution, and as a result can influence the runtime behavior of other executables. This patch allows you to set `LIBWHICH_LIBRARY_PATH=x:y:z`, which libwhich uses to set `LD_LIBRARY_PATH` before it reruns itself, so `dlopen(...)` can locate libraries in these search paths. Signed-off-by: Harmen Stoppels <me@harmenstoppels.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For certain build systems (e.g. nix, guix, spack) we need to tell
libwhich about non-standard search paths. Currently the only way of
doing so is by setting
LD_LIBRARY_PATH, which is difficult to scope justto libwhich execution, and as a result can influence the runtime
behavior of other executables.
This patch allows you to set
LIBWHICH_LIBRARY_PATH=x:y:z, whichlibwhich uses to init
LD_LIBRARY_PATHbefore it reruns itself, sodlopen(...)can locate libraries in these search paths.(Specifically a user reported a build issue of
juliawith areadelfexecutable that has
debuginfodsupport (don't ask), which pullsin
libcurl.so. Because we setLD_LIBRARY_PATH=/path/to/other/curl/libhis
readelfexecutable started picking up another libcurl.so,which ultimately used an incompatible libcrypto.so library used by
libdebuginfo.so, preventing readelf from running 🙃)