Hi, Rutherther <[email protected]> writes:
> eruwero <[email protected]> writes: > >> Rutherther <[email protected]> writes: >>> This is wrong. Did you by any chance set LD_LIBRARY_PATH variable? If >>> so, unset it, I don't see other reason your so files would point to >>> ~/.guix-profile/lib. LD_LIBRARY_PATH is a dirty workaround, I would >>> suggest you to refrain from using it, it is bound to break stuff. >> >> Yes, this is what caused the issue, thank you! I think I tried to make >> some non-guix software find the installed libraries and forgot about it. >> Is there a recommended way to do that with guix (apart from writing a >> package) or is the solution to just never set it globally? > > Ideally it should never be set, not even locally. As the env var will > propagate to processes where one doesn't really want it. If you do not > want to patch the binaries via patchelf, I think the best solution would > be if someone packaged https://github.com/nix-community/nix-ld and made > a service for it. Then one can safely set NIX_LD_LIBRARY_PATH and > unpatched programs would then be able to find the binaries, while guix > binaries started by those unpatched programs wouldn't get libraries > replaced. Maybe we should do like Nix and use RPATH instead of RUNPATH to avoid LD_LIBRARY_PATH from affecting the Guix binaries. It's supposed to be a feature, but for a reproducible system like Guix, I've come to appreciate that package rewriting makes more sense than altering the runtime execution like this. -- Thanks, Maxim
