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

[BUG] LD_LIBRARY_PATH not updated for addons with commit 581a2fe #8447

Closed
nvdias0 opened this issue Dec 22, 2023 · 7 comments
Closed

[BUG] LD_LIBRARY_PATH not updated for addons with commit 581a2fe #8447

nvdias0 opened this issue Dec 22, 2023 · 7 comments
Assignees

Comments

@nvdias0
Copy link
Contributor

nvdias0 commented Dec 22, 2023

Describe the bug

I have some add-ons from may own (nginx with some special configs, tvheadend, etc)
It has been working ok until today I've compiled LibreELEC from commit 581a2fe
And even (re)activating unknown sources in kodi, I've identified that LD_LIBRARY_PATH is not being updated for the installed ADD-ONS.

At the moment LD_LIBRARY is kept only with /usr/lib:/usr/lib/pulseaudio'

  • LibreELEC Version: 12 commit 581a2fe
  • Hardware Platform: RPi4
@chewitt
Copy link
Member

chewitt commented Dec 22, 2023

I'd guess related to #7602 which means the changes are intentional.

@nvdias0
Copy link
Contributor Author

nvdias0 commented Dec 22, 2023

yeah ! that's it. Thanks

(a lot of changes for the addos in the next days 😁 )

@nvdias0 nvdias0 closed this as completed Dec 22, 2023
@heitbaum
Copy link
Contributor

@nvdias0

@nvdias0
Copy link
Contributor Author

nvdias0 commented Dec 25, 2023

@heitbaum , thanks for the suggestions.
They will help, as I have private add-ons with a lot of libraries in ../lib.
I need now to patch some bins - it is not the best distribution approach, but I understand the need to clean LD_LIBRARY_PATH

@nvdias0
Copy link
Contributor Author

nvdias0 commented Dec 28, 2023

@heitbaum

@nvdias0

Sorry to get back to this issue, but looking into [065d3f5] it is not working as expected - LD_LIBRARY_PATH is not updated, even when there are *.so inside $addon/lib dirs.

Looking into the code: changing LD_LIBRARY_PATH in a set of code between parenthesis will keep the change only inside that scope. right ? (sorry for my bad english).
I propose replacing the parenthesis by a if then clause. something like:

for addon in /storage/.kodi/addons/*/lib /usr/lib/kodi/addons/*/lib; do
if [ -d "$addon" ]; then
    files="$(find $addon ! -type d -name '*.so*' -maxdepth 1)"
    [ ! -z "$files" ] && LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$addon"
fi
done

I will report this also in the [065d3f5] commit for easier tracing.
thanks

@nvdias0 nvdias0 reopened this Dec 30, 2023
@mglae
Copy link
Contributor

mglae commented Dec 31, 2023

@nvdias0 Confirmed.

Create a PR, it will be merged.

@nvdias0
Copy link
Contributor Author

nvdias0 commented Jan 4, 2024

@nvdias0 Confirmed.

Create a PR, it will be merged.
done:
#8471

@nvdias0 nvdias0 closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants