---- # ldd /opt/local/bin/s6-svscan linux-vdso.so.1 => (0x00007fffddfe2000) libs6.so.2.9 => /opt/local/lib/libs6.so.2.9 (0x00007fcac61dc000) libskarnet.so.2.9 => /opt/local/lib/libskarnet.so.2.9 (0x00007fcac5f9c000) libc.so.6 => /lib64/libc.so.6 (0x00007fcac5bce000) librt.so.1 => /lib64/librt.so.1 (0x00007fcac59c6000) /lib64/ld-linux-x86-64.so.2 (0x00007fcac63e9000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fcac57aa000) ---- So, problem solved in either of the two ways. Thanks! I still wonder about best practice, though. I'm curious about whether you have any more comments on this. Your rationale for using /etc/ld.so.conf makes sense to me. However, at http://xahlee.info/UnixResource_dir/_/ldpath.html David Barr says: Half-hearted attempts to improve things Some OS's (For example, Linux) have a configurable loader. You can configure what run-time paths to look in by modifying /etc/ld.so.conf. This is almost as bad as LD_LIBRARY_PATH! Install scripts should never modify this file! This file should contain only the standard library locations as shipped with the OS. Unfortunately, he does not explain *why* he thinks modifying /etc/ld.so.conf is almost as bad as LD_LIBRARY_PATH. I think I can imagine a problem arising around having multiple versions of the same library installed in parallel. If the executables and libraries do not use rpath and instead depend on /etc/ld.so.conf, then they can't declare exactly which library they want to use, and maybe you could end up with an executable using the wrong library or a bad mix of libraries? Obviously, they can declare to some extent using the major and minor shared object version. I'm not sure how this could go wrong. It seems that Fedora is not a fan of rpath in https://docs.fedoraproject.org/en-US/packaging-guidelines/#_beware_of_rpath where it says: Since the Linux dynamic linker is usually smarter than a hardcoded path, we usually do not permit the use of rpath in Fedora. But that's in the context of packaging for a distro, and in the "Rpath for Internal Libraries" section, it *does* allow for rpath usage for internal libraries. And Debian also seems not be a fan of rpath in https://wiki.debian.org/RpathIssue where it says: While there's no policy dictating the accepted use of RPATH, it's been a general consensus that RPATH use is discouraged, given the interactions between the above reasons and Debian's way of dealing with libraries and package dependencies. But again, it allows for using rpath for internal libraries: Currently, the only generally accepted use of this feature in Debian is to add non-standard library path (like /usr/lib/<package>) to libraries that are only intended to be used by the executables or other libraries within the same source package. Lastly, pkgsrc seems to use rpath based on https://www.netbsd.org/docs/pkgsrc/fixes.html#fixes.libtool which suggests using libtool with the '-rpath' option for linking. With pkgsrc, since it's a cross-platform packaging system, perhaps they don't want to depend on a feature like /etc/ld.so.conf since it is only available on a subset of the supported platforms. Kind regards, LewisReceived on Wed Dec 04 2019 - 05:30:28 UTC
This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC