Don’t set RUNPATH if it is the system search path - CMAKE_SKIP_RPATH
heitbaum opened this issue · 0 comments
heitbaum commented
The following encfs
commit forces RPATH 31e302c on Linux.
Lines 322 to 323 in c444f9b
With the cleanup of RPATH/RUNPATH
in - LibreELEC/LibreELEC.tv#6094 - we are cleaning up incorrect and unnecessary RPATH/RUNPATH
, we have used the CMAKE_SKIP_RPATH
build option but given that encfs
and encfsctl
are including the system search path - the RUNPATH
is unnecessary.
reading:
Suggest that RUNPATH can still be used when installing, but only if it's not a system directory (as per the wiki) so that it is not necessary to use CMAKE_SKIP_RPATH
# readelf --dynamic /usr/bin/encfs | grep '\['
0x0000000000000001 (NEEDED) Shared library: [libfuse.so.2]
0x0000000000000001 (NEEDED) Shared library: [libssl.so.3]
0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.3]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000001d (RUNPATH) Library runpath: [/usr/lib]
readelf --dynamic /usr/bin/encfsctl | grep '\['
0x0000000000000001 (NEEDED) Shared library: [libfuse.so.2]
0x0000000000000001 (NEEDED) Shared library: [libssl.so.3]
0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.3]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000001d (RUNPATH) Library runpath: [/usr/lib]
# LD_LIBRARY_PATH= LD_DEBUG=libs ldd -v encfs