GNU bug report logs - #42576
[PATCH 1/2] gnu: llvm: Move dynamic libraries to a separate "lib" output.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Pierre Neidhardt <mail@HIDDEN>; Keywords: patch; dated Tue, 28 Jul 2020 09:59:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 42576 <at> debbugs.gnu.org:


Received: (at 42576) by debbugs.gnu.org; 1 Aug 2020 11:18:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 01 07:18:13 2020
Received: from localhost ([127.0.0.1]:39298 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k1pWn-0004RW-Mh
	for submit <at> debbugs.gnu.org; Sat, 01 Aug 2020 07:18:13 -0400
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:50385)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1k1pWk-0004RI-PR
 for 42576 <at> debbugs.gnu.org; Sat, 01 Aug 2020 07:18:12 -0400
X-Originating-IP: 86.246.37.13
Received: from bababa (lfbn-idf2-1-572-13.w86-246.abo.wanadoo.fr
 [86.246.37.13]) (Authenticated sender: mail@HIDDEN)
 by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 88A3C240005;
 Sat,  1 Aug 2020 11:18:04 +0000 (UTC)
From: Pierre Neidhardt <mail@HIDDEN>
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#42576] [PATCH 1/2] gnu: llvm: Move dynamic libraries to a
 separate "lib" output.
In-Reply-To: <20200801125953.2e898f63@HIDDEN>
References: <20200728095822.28375-1-mail@HIDDEN>
 <20200801125953.2e898f63@HIDDEN>
Date: Sat, 01 Aug 2020 13:18:03 +0200
Message-ID: <878seyaa38.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: -0.2 (/)
X-Debbugs-Envelope-To: 42576
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 42576 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.2 (/)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi Danny!

Danny Milosavljevic <dannym@HIDDEN> writes:

> Hmm, glib for example moves the binaries to a "bin" output while retainin=
g the
> libraries in "out".
>
> Any reason this patch moves the libraries and not the binaries?

Ludo suggested this way I think out of consistency with the rest.

> Also, I would have thought that those llvm programs reference the llvm
> libraries anyway, and thus in the end no space could be saved.  Is this
> not the case?

This patch not about saving space for LLVM programs, but packages that depe=
nd
on LLVM libraries and which don't need the programs.

Cheers!

=2D-=20
Pierre Neidhardt
https://ambrevar.xyz/

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl8lT2sACgkQm9z0l6S7
zH/z7QgAl/Rsvlvwt/n1hXtdF1xGZnPbuuhYxMvfuIfpZp1Kpln/vaB98OuIgidf
onowNIbi7AXHzkE1yRmE7Hjjiw80wlBeuv2kelSEFLnqkBos86rHRspEq4QIbYEz
iqiJsGefHFXCXOK02teItfckypIZ0OjiMGjzbaVleVkhu/QlLrfgN4xXcQ1SHfEB
Xs/BGb1fmB5MLdWcCG8yWg8w8+dWFeVvQ6eqgHPb/51G0qZPoSLAJ759pbN5beWS
L4NyH4Xvfyje+SD6WRsrgpAGYngYU7EhXLq9yBbmWPTYkpGWsNkSu0HK3YWwaMna
t2nZoE0583xBFinDs4t6ONW3U3yOUg==
=/bjc
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#42576; Package guix-patches. Full text available.

Message received at 42576 <at> debbugs.gnu.org:


Received: (at 42576) by debbugs.gnu.org; 1 Aug 2020 11:00:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 01 07:00:04 2020
Received: from localhost ([127.0.0.1]:39268 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k1pFE-00041a-84
	for submit <at> debbugs.gnu.org; Sat, 01 Aug 2020 07:00:04 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:47074)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1k1pFA-00040c-Np
 for 42576 <at> debbugs.gnu.org; Sat, 01 Aug 2020 07:00:02 -0400
Received: from localhost (80-110-127-146.cgn.dynamic.surfer.at
 [80.110.127.146])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id B5B453367B2C;
 Sat,  1 Aug 2020 12:59:58 +0200 (CEST)
Date: Sat, 1 Aug 2020 12:59:53 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: Pierre Neidhardt <mail@HIDDEN>
Subject: Re: [bug#42576] [PATCH 1/2] gnu: llvm: Move dynamic libraries to a
 separate "lib" output.
Message-ID: <20200801125953.2e898f63@HIDDEN>
In-Reply-To: <20200728095822.28375-1-mail@HIDDEN>
References: <20200728095822.28375-1-mail@HIDDEN>
X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/an82V0efDxicDpih2ComZuZ";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 42576
Cc: 42576 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--Sig_/an82V0efDxicDpih2ComZuZ
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hmm, glib for example moves the binaries to a "bin" output while retaining =
the
libraries in "out".

Any reason this patch moves the libraries and not the binaries?  Especially
since there are no end-user facing programs in llvm anyway (programmer-faci=
ng
maybe).  I mean we can...

Also, I would have thought that those llvm programs reference the llvm
libraries anyway, and thus in the end no space could be saved.  Is this
not the case?


--Sig_/an82V0efDxicDpih2ComZuZ
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl8lSykACgkQ5xo1VCww
uqX76QgAqCR8KGBc1m2VWuH7SNr+d1XlIAf+dVBIBgicYVPKwGJnJObHRnxtOYiX
P6euUmxjgkp2NUuAP6ldPcUGs43qcX9o8glln1mlZOeauvYScFbKg4qW3iG5tbMS
kzoQ4Mb+7Z+c6mcAvkSEg8c9qxEECwKSOjs4tx0N0XMk+Z0ebEOkYmLjECrvKtkT
PZMcPb+0xrLrM4rtoeRB1IOn3WYvrtXtvJ7KehDowfQULp+7SLpoAlkJMqCdTy2X
k5hFtU3ZiKLqP9XWrJ/0e9JgZOi2Xubj2Km1t8Q+4gCcoKSJIRMNcMcGYUs96/wA
4QwP9MziuB/U1STZF3fexf83pxqGlw==
=IXaz
-----END PGP SIGNATURE-----

--Sig_/an82V0efDxicDpih2ComZuZ--




Information forwarded to guix-patches@HIDDEN:
bug#42576; Package guix-patches. Full text available.

Message received at 42576 <at> debbugs.gnu.org:


Received: (at 42576) by debbugs.gnu.org; 28 Jul 2020 10:08:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 28 06:08:10 2020
Received: from localhost ([127.0.0.1]:57350 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k0MWn-0005m9-O0
	for submit <at> debbugs.gnu.org; Tue, 28 Jul 2020 06:08:09 -0400
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:43583)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1k0MWk-0005lc-TF
 for 42576 <at> debbugs.gnu.org; Tue, 28 Jul 2020 06:08:08 -0400
X-Originating-IP: 86.246.37.13
Received: from bababa (lfbn-idf2-1-572-13.w86-246.abo.wanadoo.fr
 [86.246.37.13]) (Authenticated sender: mail@HIDDEN)
 by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 856906000E
 for <42576 <at> debbugs.gnu.org>; Tue, 28 Jul 2020 10:08:00 +0000 (UTC)
From: Pierre Neidhardt <mail@HIDDEN>
To: 42576 <at> debbugs.gnu.org
Subject: Re: bug#42576: Acknowledgement ([PATCH 1/2] gnu: llvm: Move dynamic
 libraries to a separate "lib" output.)
In-Reply-To: <handler.42576.B.159593032321168.ack <at> debbugs.gnu.org>
References: <20200728095822.28375-1-mail@HIDDEN>
 <handler.42576.B.159593032321168.ack <at> debbugs.gnu.org>
Date: Tue, 28 Jul 2020 12:07:59 +0200
Message-ID: <877duodkao.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: -0.2 (/)
X-Debbugs-Envelope-To: 42576
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.2 (/)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

This patch is meant for core-updates since it rebuilds every LLVm
dependent, so more than 1000+ packages.  I've only tested against master
though.

It's not ready yet.

Since LLVM@10 takes a long time to compile, it's cumbersome to iterate
against it.
Instead, I found out that LLVM@HIDDEN builds much faster and the `pure'
package is a great candidate for testing.

I've added ("llvm" llvm-3.5 "lib") to the dependencies of pure.
But ("llvm" llvm-3.5) must be included as a native input because that's
where the C headers (include) files are.

The end result still depends on llvm "out" because the .so files has
references to the headers.

We could move the headers to a separate output, but LLVM@10 headers are
17MiB big already, so I'd rather not include them in the closure of
every package.

Any idea how to remove them?

=2D-=20
Pierre Neidhardt
https://ambrevar.xyz/

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl8f+P8ACgkQm9z0l6S7
zH98QAf8DC6LmFtVJ/ccpo9G3VQFhMG4TQmY8Ebud7L8qkQnjp2Pb6b7GZoSHVGL
nQCoVGe7+qiqLZm+Ic9nZ8cw3Ooh4T9PXrVl460IVJQt/kjYOncUwqdZ4JmTBr9I
PY8vZS5MpF0EZYtrzzxGwxbJq2rhUT4weihKNf9lJIGHfYtH9zfE2LKSOhfIPSjq
RkqESBD5pnXO/fOjPeJnMiStc1SB2lmfFUo0/Ee70tLHblyf05XZw/hjY6d7K2g3
grXpcPyDmpf4mRbfyufwDfLywUJoH/KJGOq1a8iXztAt1Fn+Pg8KXr4LcHFFYnx7
AcXQ23BIL43dyVc5cHmI9+ggSM06lw==
=8yjU
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#42576; Package guix-patches. Full text available.

Message received at 42576 <at> debbugs.gnu.org:


Received: (at 42576) by debbugs.gnu.org; 28 Jul 2020 10:03:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 28 06:03:56 2020
Received: from localhost ([127.0.0.1]:57345 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k0MSi-0005fj-7x
	for submit <at> debbugs.gnu.org; Tue, 28 Jul 2020 06:03:56 -0400
Received: from relay11.mail.gandi.net ([217.70.178.231]:45367)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1k0MSg-0005fV-J3
 for 42576 <at> debbugs.gnu.org; Tue, 28 Jul 2020 06:03:55 -0400
Received: from localhost.localdomain
 (lfbn-idf2-1-572-13.w86-246.abo.wanadoo.fr [86.246.37.13])
 (Authenticated sender: mail@HIDDEN)
 by relay11.mail.gandi.net (Postfix) with ESMTPSA id 30F51100010
 for <42576 <at> debbugs.gnu.org>; Tue, 28 Jul 2020 10:03:47 +0000 (UTC)
From: Pierre Neidhardt <mail@HIDDEN>
To: 42576 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: llvm-3.9.1: Move libraries to "lib" output.
Date: Tue, 28 Jul 2020 12:03:41 +0200
Message-Id: <20200728100341.31365-1-mail@HIDDEN>
X-Mailer: git-send-email 2.27.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 1.8 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  * gnu/packages/llvm.scm (llvm-3.9.1)[outputs]: Add "lib".
 --- gnu/packages/llvm.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
 diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index
 3e9d428b9f..1c099bbdd3
 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -690,7
 +690,7 @@ components which highly lever [...] 
 Content analysis details:   (1.8 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [217.70.178.231 listed in list.dnswl.org]
 0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
 [217.70.178.231 listed in wl.mailspike.net]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 2.0 FROM_SUSPICIOUS_NTLD_FP From abused NTLD
X-Debbugs-Envelope-To: 42576
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.2 (-)

* gnu/packages/llvm.scm (llvm-3.9.1)[outputs]: Add "lib".
---
 gnu/packages/llvm.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 3e9d428b9f..1c099bbdd3 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -690,7 +690,7 @@ components which highly leverage existing libraries in the larger LLVM Project."
       (sha256
        (base32
         "1vi9sf7rx1q04wj479rsvxayb6z740iaz3qniwp266fgp5a07n8z"))))
-    (outputs '("out"))
+    (outputs '("out" "lib"))
     (arguments
      (substitute-keyword-arguments (package-arguments llvm)
        ((#:phases phases)
-- 
2.27.0





Information forwarded to guix-patches@HIDDEN:
bug#42576; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 28 Jul 2020 09:58:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 28 05:58:43 2020
Received: from localhost ([127.0.0.1]:57323 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k0MNe-0005VL-OF
	for submit <at> debbugs.gnu.org; Tue, 28 Jul 2020 05:58:43 -0400
Received: from lists.gnu.org ([209.51.188.17]:43054)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1k0MNa-0005VB-Pa
 for submit <at> debbugs.gnu.org; Tue, 28 Jul 2020 05:58:40 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42882)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>) id 1k0MNa-0004a4-HA
 for guix-patches@HIDDEN; Tue, 28 Jul 2020 05:58:38 -0400
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:39825)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>) id 1k0MNY-0005Aw-2S
 for guix-patches@HIDDEN; Tue, 28 Jul 2020 05:58:38 -0400
X-Originating-IP: 86.246.37.13
Received: from localhost.localdomain
 (lfbn-idf2-1-572-13.w86-246.abo.wanadoo.fr [86.246.37.13])
 (Authenticated sender: mail@HIDDEN)
 by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id C5665240014
 for <guix-patches@HIDDEN>; Tue, 28 Jul 2020 09:58:32 +0000 (UTC)
From: Pierre Neidhardt <mail@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 1/2] gnu: llvm: Move dynamic libraries to a separate "lib"
 output.
Date: Tue, 28 Jul 2020 11:58:22 +0200
Message-Id: <20200728095822.28375-1-mail@HIDDEN>
X-Mailer: git-send-email 2.27.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=217.70.183.193; envelope-from=mail@HIDDEN;
 helo=relay1-d.mail.gandi.net
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/28 05:58:33
X-ACL-Warn: Detected OS   = Linux 3.11 and newer
X-Spam_score_int: -5
X-Spam_score: -0.6
X-Spam_bar: /
X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, FROM_SUSPICIOUS_NTLD=1,
 FROM_SUSPICIOUS_NTLD_FP=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01,
 RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

* gnu/packages/llvm.scm (llvm)[arguments]: Set configure-flags to build
a dynamic library bundle in the "lib" output.
Add phases to move the /bin and /include directories to the "out" output.

The goal of this change is to reduce the closure size of LLVM dependents.

- The dynamic library bundles saves a few dozen MiB over the separate dynamic
  libraries.

- Removing the /bin and the /include directories from the dependent input
  saves about 35 MiB for LLVM 10.
---
 gnu/packages/llvm.scm | 65 +++++++++++++++++++++++++++++++++++--------
 1 file changed, 53 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index b7bc21ea6e..3e9d428b9f 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -99,7 +99,7 @@ as \"x86_64-linux\"."
        (base32
         "1pwgm6cr0xr5a0hrbqs1zvsvvjvy0yq1y47c96804wcs795s90yz"))))
     (build-system cmake-build-system)
-    (outputs '("out" "opt-viewer"))
+    (outputs '("out" "opt-viewer" "lib"))
     (native-inputs
      `(("python" ,python-2) ;bytes->str conversion in clang>=3.7 needs python-2
        ("perl"   ,perl)))
@@ -108,12 +108,18 @@ as \"x86_64-linux\"."
     (propagated-inputs
      `(("zlib" ,zlib)))                 ;to use output from llvm-config
     (arguments
-     `(#:configure-flags '("-DCMAKE_SKIP_BUILD_RPATH=FALSE"
-                           "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
-                           "-DBUILD_SHARED_LIBS:BOOL=TRUE"
-                           "-DLLVM_ENABLE_FFI:BOOL=TRUE"
-                           "-DLLVM_REQUIRES_RTTI=1" ; For some third-party utilities
-                           "-DLLVM_INSTALL_UTILS=ON") ; Needed for rustc.
+     `(#:configure-flags (list "-DCMAKE_SKIP_BUILD_RPATH=FALSE"
+                               "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
+                               ;; LLVM cannot enable BUILD_SHARED_LIBS with LLVM_LINK_LLVM_DYLIB.
+                               ;; "-DBUILD_SHARED_LIBS:BOOL=TRUE"
+                               "-DLLVM_BUILD_LLVM_DYLIB=ON"
+                               "-DLLVM_LINK_LLVM_DYLIB=ON"
+                               (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
+                               (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
+                                              "/lib")
+                               "-DLLVM_ENABLE_FFI:BOOL=TRUE"
+                               "-DLLVM_REQUIRES_RTTI=1" ; For some third-party utilities
+                               "-DLLVM_INSTALL_UTILS=ON") ; Needed for rustc.
 
        ;; Don't use '-g' during the build, to save space.
        #:build-type "Release"
@@ -128,14 +134,49 @@ as \"x86_64-linux\"."
              (setenv "LD_LIBRARY_PATH"
                      (string-append (getcwd) "/lib"))
              #t))
-         (add-after 'install 'install-opt-viewer
+         (add-after 'install 'install-bin
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
+                    (out-lib (string-append out "/lib"))
+                    (lib-output (assoc-ref outputs "lib"))
+                    (lib-bin (string-append lib-output "/bin")))
+               (mkdir-p out)
+               (rename-file (string-append lib-output "/bin")
+                            (string-append out "/bin"))
+               ;; llvm-config is required by most lib dependents.  It's only a
+               ;; few KiB, so it does not warrant a separate output.
+               (mkdir-p lib-bin)
+               (rename-file (string-append out "/bin/llvm-config")
+                            (string-append lib-bin "/llvm-config"))
+               (rename-file (string-append lib-output "/include")
+                            (string-append out "/include"))
+               (mkdir-p out-lib)
+               (if (file-exists? (string-append lib-output "/lib/cmake"))
+                   (rename-file (string-append lib-output "/lib/cmake")
+                                (string-append out-lib "/cmake"))
+                   ;; The cmake files change location in llvm 3.9.
+                   (begin
+                     (mkdir-p (string-append out "/share/llvm"))
+                     (rename-file (string-append lib-output "/share/llvm/cmake")
+                                  (string-append out "/share/llvm/cmake"))))
+               (for-each
+                (lambda (file)
+                  (rename-file file
+                               (string-append out-lib "/" (basename file))))
+                (find-files (string-append lib-output "/lib") "\\.a$"))
+               (for-each
+                (lambda (file)
+                  (symlink file
+                           (string-append out-lib "/" (basename file))))
+                (find-files (string-append lib-output "/lib") "\\.so")))
+             #t))
+         (add-after 'install 'install-opt-viewer
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((lib-output (assoc-ref outputs "lib"))
                     (opt-viewer-out (assoc-ref outputs "opt-viewer"))
-                    (opt-viewer-share-dir (string-append opt-viewer-out "/share"))
-                    (opt-viewer-dir (string-append opt-viewer-share-dir "/opt-viewer")))
-               (mkdir-p opt-viewer-share-dir)
-               (rename-file (string-append out "/share/opt-viewer")
+                    (opt-viewer-dir (string-append opt-viewer-out "/share/opt-viewer")))
+               (mkdir-p (dirname opt-viewer-dir))
+               (rename-file (string-append lib-output "/share/opt-viewer")
                             opt-viewer-dir))
              #t)))))
     (home-page "https://www.llvm.org")

base-commit: 0e1428ac5dc3a7f1aa68988dd88885009e9706a6
-- 
2.27.0





Acknowledgement sent to Pierre Neidhardt <mail@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#42576; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 1 Aug 2020 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.