-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Use RPATH to target local lib.private shared libraries. This keeps the shared libraries from polluting the LD_LIBRARY_PATH. Add the following RPATH to the binaries '$ORIGIN/../lib.private'
tested using patchelf
$ patchelf --add-rpath '$ORIGIN/../lib.private' rar2fs
$ patchelf --print-rpath rar2fs
$ORIGIN/../lib.private
shown below
nuc12:~ # ldd .kodi/addons/virtual.network-tools/bin/rar2fs.rpath
linux-vdso.so.1 (0x00007ffd39bd8000)
libfuse.so.2 => /storage/.kodi/addons/virtual.network-tools/bin/../lib.private/libfuse.so.2 (0x00007f322f01f000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f322ee05000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f322ede3000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f322ec24000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f322eb4d000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f322f05f000)
still to do
./jre.zulu:target/tools.jre.zulu/lib/libX11.so.6
./jre.zulu:target/tools.jre.zulu/lib/libXrender.so.1
./jre.zulu:target/tools.jre.zulu/lib/libxcb.so.1
./jre.zulu:target/tools.jre.zulu/lib/libXi.so.6
./jre.zulu:target/tools.jre.zulu/lib/libXtst.so.6
./jre.zulu:target/tools.jre.zulu/lib/libXinerama.so.1
./jre.zulu:target/tools.jre.zulu/lib/libXext.so.6
./sundtek-mediatv:target/driver.dvb.sundtek-mediatv/lib/libmediaclient.so
./sundtek-mediatv:target/driver.dvb.sundtek-mediatv/lib/libmcsimple.so
- for sundtek - how are these .so files used?
- for jre - how/when are the X11 libraries included. Need to test - but maybe simple addition of $ORIGIN/../../lib.private
$ cd build.LibreELEC-Generic.x86_64-12.0-devel/addons/jre.zulu:target/tools.jre.zulu/jre/bin
$ patchelf --print-rpath *
$ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
$ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
$ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
$ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
$ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
$ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
$ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
$ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
$ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
$ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
$ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
$ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
$ORIGIN