[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kodi: LD_LIBRARY_PATH vs. RUNPATH
From: |
Marius Bakke |
Subject: |
Re: kodi: LD_LIBRARY_PATH vs. RUNPATH |
Date: |
Tue, 21 Mar 2017 14:50:06 +0100 |
User-agent: |
Notmuch/0.24 (https://notmuchmail.org) Emacs/25.1.1 (x86_64-unknown-linux-gnu) |
Ludovic Courtès <address@hidden> writes:
> 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?
I agree, this was a lazy fix on my part to enable some expected
functionality (scraping, add-ons) because I could not figure out how to
pass LDFLAGS (the environment variable was not enough).
Will work on a proper fix; adding it to the 'kodi-test' executable
should also sort the failing web tests, methinks.
signature.asc
Description: PGP signature