guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kodi: LD_LIBRARY_PATH vs. RUNPATH


From: Ludovic Courtès
Subject: kodi: LD_LIBRARY_PATH vs. RUNPATH
Date: Tue, 21 Mar 2017 14:10:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi Marius,

address@hidden (Marius Bakke) skribis:

> commit 4b9a5bd990a4c734828571147f9fec01c7053fcc
> Author: Marius Bakke <address@hidden>
> Date:   Tue Mar 21 07:02:36 2017 +0100
>
>     gnu: kodi: Wrap executable so it finds libcurl.
>     
>     * gnu/packages/kodi.scm (kodi)[arguments]: Add 'wrap' phase.

[...]

> +         (add-after 'install 'wrap
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out"))
> +                   (curl (string-append (assoc-ref inputs "curl") "/lib")))
> +               (wrap-program (string-append out "/bin/kodi")
> +                 `("LD_LIBRARY_PATH" suffix (,curl)))
> +               #t))))))

I think it would be nicer to add libcurl to the RUNPATH of kodi, by
adding -Wl,-rpath=/…/curl/lib to the LDFLAGS for the ‘kodi’ executable,
rather than clobbering LD_LIBRARY_PATH (that’s more “controlled” and
less intrusive).

Perhaps that’s more complicated to do though (finding the right makefile
or makefile variable to pass, etc.)

WDYT?

Thanks,
Ludo’.

PS: Apologies if I missed an earlier discussion of this!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]