From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: kodi: LD_LIBRARY_PATH vs. RUNPATH Date: Tue, 21 Mar 2017 14:50:06 +0100 Message-ID: <87inn268oh.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> References: <20170321115836.24499.97319@vcs0.savannah.gnu.org> <20170321115837.12BE620EBA@vcs0.savannah.gnu.org> <87k27i3hdv.fsf_-_@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqKAv-0000l6-Hi for guix-devel@gnu.org; Tue, 21 Mar 2017 09:50:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqKAs-00020i-Gd for guix-devel@gnu.org; Tue, 21 Mar 2017 09:50:13 -0400 In-Reply-To: <87k27i3hdv.fsf_-_@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= , guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hi Marius, > > mbakke@fastmail.com (Marius Bakke) skribis: > >> commit 4b9a5bd990a4c734828571147f9fec01c7053fcc >> Author: Marius Bakke >> Date: Tue Mar 21 07:02:36 2017 +0100 >> >> gnu: kodi: Wrap executable so it finds libcurl. >>=20=20=20=20=20 >> * 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=3D/=E2=80=A6/curl/lib to the LDFLAGS for the =E2=80=98k= odi=E2=80=99 executable, > rather than clobbering LD_LIBRARY_PATH (that=E2=80=99s more =E2=80=9Ccont= rolled=E2=80=9D and > less intrusive). > > Perhaps that=E2=80=99s more complicated to do though (finding the right m= akefile > 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAljRL44ACgkQoqBt8qM6 VPqL9ggAw5zv2wTEPsafga4m5i749Jay5ZCmKc2LBQqOdwlvNLyaZbo8wtoiAuge +4zUHyw3cb8R00SeOisbf2XrelEJ+OnkrbtrqC+0zFHOG0WbKOrvfhzacCcIbGZE UGk8R7SrCbmP62IB9RNZYWmA9fEuSzS+RYM5qH75MGvbmx8wQNAApugw6X8mzcLg Dbf3oznI7RTa5z5T2B1srpPP9aQTG7NdMmaiDPEBZ+6k7MOvB6xjY1Iy1ijHoQKq sgEQ89kNhArduvL1kAz9xgLBByJn8Afxb7+eMIm44sz79vgHgOfKO55NCE4PCWKH 6ug85BcHCik67M1Zkoj9uHF+8HcDNw== =XGSN -----END PGP SIGNATURE----- --=-=-=--