According to the ld.so manual, the dynamic linker should look for libraries in
- defaults (/usr/lib)
However for some reason, the dynamic linker on nix doesn’t seem to look in the default directories. Because of that,
LD_LIBRARY_PATH to include
/usr/lib. But that results in a different behaviour, because now
/usr/lib is considered first instead of last (rpath is deprecated).
Why doesn’t the dynamic linker look in the default locations on nixos? Is there some way to get around that behaviour?