s6-svscan can't find shared libraries

From: J. Lewis Muir <jlmuir_at_imca-cat.org>
Date: Tue, 3 Dec 2019 16:57:54 -0600

Hello!

I compiled s6 2.9.0.1 and the skalibs 2.9.1.0 and execline 2.5.3.0
dependencies with shared libraries enabled and static libraries disabled
on RHEL 7, and when I run s6-svscan, it can't find libs6.so.2.9:

----
# /opt/local/bin/s6-svscan -S /run/service
/opt/local/bin/s6-svscan: error while loading shared libraries: libs6.so.2.9: cannot open shared object file: No such file or directory
# ldd /opt/local/bin/s6-svscan
	linux-vdso.so.1 =>  (0x00007ffc9cdf0000)
	libs6.so.2.9 => not found
	libskarnet.so.2.9 => not found
	libc.so.6 => /lib64/libc.so.6 (0x00007faee63b6000)
	/lib64/ld-linux-x86-64.so.2 (0x00007faee6784000)
# ls -1 /opt/local/lib/lib{s6,skarnet}.*
/opt/local/lib/libs6.so
/opt/local/lib/libs6.so.2.9
/opt/local/lib/libs6.so.2.9.0
/opt/local/lib/libs6.so.2.9.0.1
/opt/local/lib/libskarnet.so
/opt/local/lib/libskarnet.so.2.9
/opt/local/lib/libskarnet.so.2.9.1
/opt/local/lib/libskarnet.so.2.9.1.0
----
Is this because the '-rpath' linker option is not used at compile time
to add the library directory to the runtime library search path?
If I set the LD_LIBRARY_PATH environment variable to /opt/local/lib, it
starts successfully:
----
# LD_LIBRARY_PATH=/opt/local/lib /opt/local/bin/s6-svscan -S /run/service
----
But I wish I didn't have to do that since setting LD_LIBRARY_PATH for
anything outside of development is considered harmful:
  https://gms.tf/ld_library_path-considered-harmful.html
I suppose another option would be to add /opt/local/lib to
/etc/ld.so.conf, but I kind of wish I didn't have to do that either.
Thank you,
Lewis
Received on Tue Dec 03 2019 - 22:57:54 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC