From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: kodi: LD_LIBRARY_PATH vs. RUNPATH Date: Tue, 21 Mar 2017 14:10:20 +0100 Message-ID: <87k27i3hdv.fsf_-_@gnu.org> References: <20170321115836.24499.97319@vcs0.savannah.gnu.org> <20170321115837.12BE620EBA@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqJYV-0000hy-Ul for guix-devel@gnu.org; Tue, 21 Mar 2017 09:10:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqJYU-0005Ai-HY for guix-devel@gnu.org; Tue, 21 Mar 2017 09:10:31 -0400 In-Reply-To: <20170321115837.12BE620EBA@vcs0.savannah.gnu.org> (Marius Bakke's message of "Tue, 21 Mar 2017 07:58:37 -0400 (EDT)") 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: guix-devel@gnu.org, Marius Bakke 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=98kod= i=E2=80=99 executable, rather than clobbering LD_LIBRARY_PATH (that=E2=80=99s more =E2=80=9Ccontro= lled=E2=80=9D and less intrusive). Perhaps that=E2=80=99s more complicated to do though (finding the right mak= efile or makefile variable to pass, etc.) WDYT? Thanks, Ludo=E2=80=99. PS: Apologies if I missed an earlier discussion of this!