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

Keep addon introduced private shared libraries private to the addon #8342

Merged
merged 11 commits into from
Dec 20, 2023

Conversation

heitbaum
Copy link
Contributor

@heitbaum heitbaum commented Nov 19, 2023

This PR addresses 3 specific areas:

  • reduce the number of paths being added to LD_LIBRARY_PATH - a6cd2720475ac71f1ce6a475d3ad7c54a6e40ecb
  • use lib.private for private shared libraries and update calling binaries with '$ORIGIN/../lib.private'. This keeps the shared libraries from polluting the LD_LIBRARY_PATH.
  • allow for binaries that have not got the environment set to find the required shared libraries - e.g. libfuse3.so.3 missing in LE11 #7589 when called in systemd

This PR includes that addons I’m regularly using.

  • Initial testing looks correct.
  • My LD_LIBRARY_PATH is now LD_LIBRARY_PATH='/usr/lib:/usr/lib/pulseaudio'
  • Feedback on this before I continue with the other addons.

Some historical background of the following error if some one has it?

The code written in a6cd2720475ac71f1ce6a475d3ad7c54a6e40ecb checks for lib directories with .so files. It seems that the find: /usr/lib/kodi/addons/*/lib: No such file or directory does not have any addons using this format, peripheral.joystick has the shared libraries located at it’s addon directory.

See

nuc12:~ # find /usr/lib/kodi/addons ! -type d
/usr/lib/kodi/addons/peripheral.joystick/peripheral.joystick.so
/usr/lib/kodi/addons/peripheral.joystick/peripheral.joystick.so.21.0
/usr/lib/kodi/addons/peripheral.joystick/peripheral.joystick.so.21.1.7

@heitbaum
Copy link
Contributor Author

heitbaum commented Dec 1, 2023

Addressed the find: /usr/lib/kodi/addons/*/lib: No such file or directory error. PR should be GtG now.

The libsockets shared library includes plugins that are dlopened
using LD_LIBRARY_PATH unless a plugin directory is set in the
code (this is not the case with ttyd.) Thus
libwebsockets-evlib_uv.so is not found. So use LD_LIBRARY_PATH
to find the plugin.
@CvH CvH merged commit 098fb78 into LibreELEC:master Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants