Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFE] enable lib.private via RPATH #7602

Open
heitbaum opened this issue Mar 14, 2023 · 1 comment
Open

[RFE] enable lib.private via RPATH #7602

heitbaum opened this issue Mar 14, 2023 · 1 comment

Comments

@heitbaum
Copy link
Contributor

heitbaum commented Mar 14, 2023

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
@heitbaum
Copy link
Contributor Author

Updating labels to LE13. The 2 remaining packages to be fixed are sundtek and jre.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant