From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ev9Nu-0001cY-2X for guix-patches@gnu.org; Sun, 11 Mar 2018 18:24:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ev9Nq-000301-Ub for guix-patches@gnu.org; Sun, 11 Mar 2018 18:24:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47901) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ev9Nq-0002zl-Ql for guix-patches@gnu.org; Sun, 11 Mar 2018 18:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ev9Nq-0000MY-Gt for guix-patches@gnu.org; Sun, 11 Mar 2018 18:24:02 -0400 Subject: [bug#30761] [PATCH staging 4/9] build-system/meson: Add the output directory to RUNPATH. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20180309181108.22888-1-mbakke@fastmail.com> <20180309181108.22888-4-mbakke@fastmail.com> Date: Sun, 11 Mar 2018 23:23:20 +0100 In-Reply-To: <20180309181108.22888-4-mbakke@fastmail.com> (Marius Bakke's message of "Fri, 9 Mar 2018 19:11:03 +0100") Message-ID: <87ina2tfon.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Marius Bakke Cc: 30761@debbugs.gnu.org Marius Bakke skribis: > * guix/build/meson-build-system.scm (configure): Set LDFLAGS before invok= ing meson. [...] > guix/build/meson-build-system.scm | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/guix/build/meson-build-system.scm b/guix/build/meson-build-s= ystem.scm > index 2b92240c5..e8cb5440e 100644 > --- a/guix/build/meson-build-system.scm > +++ b/guix/build/meson-build-system.scm > @@ -46,6 +46,15 @@ > ,(string-append "--buildtype=3D" build-type) > ,@configure-flags > ,source-dir))) > + > + ;; Meson lacks good facilities for dealing with RUNPATH, so we > + ;; add the output "lib" directory here to avoid doing that in > + ;; many users. Related issues: > + ;; * > + ;; * > + ;; * Terrible=E2=80=A6 > + (setenv "LDFLAGS" (string-append "-Wl,-rpath=3D" out "/lib")) Can we pass them as an argument to =E2=80=98meson=E2=80=99 somehow instead = of defining a global variable? (For example Autoconf-generated configure scripts can read variable definitions passed as arguments: ./configure LDFLAGS=3Dfoo That way we don=E2=80=99t have to define the variable globally, which could= have unintended effects.) If not, that=E2=80=99s fine. Thanks, Ludo=E2=80=99.