GNU bug report logs - #33741
Packages built with Go 1.10+ keep unnecessary references to Go inputs

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; Reported by: Pierre Neidhardt <mail@HIDDEN>; merged with #33620; dated Fri, 14 Dec 2018 15:29:01 UTC; Maintainer for guix is bug-guix@HIDDEN.
Merged 33620 33741. Request was from Leo Famulari <leo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 14 Dec 2018 15:28:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 14 10:28:25 2018
Received: from localhost ([127.0.0.1]:48439 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gXpO4-0001h2-W4
	for submit <at> debbugs.gnu.org; Fri, 14 Dec 2018 10:28:25 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44582)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1gXpO3-0001go-9J
 for submit <at> debbugs.gnu.org; Fri, 14 Dec 2018 10:28:23 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mail@HIDDEN>) id 1gXpNw-0001kc-C5
 for submit <at> debbugs.gnu.org; Fri, 14 Dec 2018 10:28:17 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43871)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mail@HIDDEN>) id 1gXpNv-0001kW-T2
 for submit <at> debbugs.gnu.org; Fri, 14 Dec 2018 10:28:16 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54190)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mail@HIDDEN>) id 1gXpNu-0002My-8o
 for bug-guix@HIDDEN; Fri, 14 Dec 2018 10:28:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mail@HIDDEN>) id 1gXpNq-0001cx-A8
 for bug-guix@HIDDEN; Fri, 14 Dec 2018 10:28:14 -0500
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:51861)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mail@HIDDEN>) id 1gXpNp-0001ba-GF
 for bug-guix@HIDDEN; Fri, 14 Dec 2018 10:28:09 -0500
X-Originating-IP: 86.246.35.59
Received: from mimimi (lfbn-1-799-59.w86-246.abo.wanadoo.fr [86.246.35.59])
 (Authenticated sender: mail@HIDDEN)
 by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id A783260004
 for <bug-guix@HIDDEN>; Fri, 14 Dec 2018 15:28:07 +0000 (UTC)
User-agent: mu4e 1.0; emacs 26.1
From: Pierre Neidhardt <mail@HIDDEN>
To: bug-guix@HIDDEN
Subject: Packages built with Go 1.10+ keep unnecessary references to Go inputs
Date: Fri, 14 Dec 2018 16:28:07 +0100
Message-ID: <877egcdt6g.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
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: -6.0 (------)

--=-=-=
Content-Type: text/plain

See https://lists.gnu.org/archive/html/guix-devel/2018-11/msg00223.html.

Go binaries are statically build, but since Go 1.10, the full paths to
the Go libraries are kept in the binaries, which results in the Go
dependencies being part of the package closure:

$ guix gc --references $(./pre-inst-env guix build --no-grafts kurly)
/gnu/store/2b2md66fbzyspsmd5dj6zkj9hilac40r-tzdata-2018e
/gnu/store/4iwksvq53rlzphfp3xvp63ihlw226c0n-go-github-com-aki237-nscjar-0.0.0-0.e2df936
/gnu/store/5rxdjbk8h0bh1hbaan8y8ib13va2bcmw-net-base-5.3
/gnu/store/ahvdlp6y44qj6kx63rmx1sq8r61x3zc2-go-github-com-alsm-ioprogress-0.0.0-0.063c372
/gnu/store/f8yps0l8p371jgzh6cki0z5n2kgfjiwy-go-github-com-urfave-cli-1.19.1-0.934abfb
/gnu/store/l4lr0f5cjd0nbsaaf8b5dmcw1a1yypr3-glibc-2.27
/gnu/store/pp0bakrbyv9xmp1kyv2114l19s11b74z-gcc-6.4.0-lib

Previously, they did not:

$ guix gc --references $(guix build --no-grafts kurly)
/gnu/store/2b2md66fbzyspsmd5dj6zkj9hilac40r-tzdata-2018e
/gnu/store/5rxdjbk8h0bh1hbaan8y8ib13va2bcmw-net-base-5.3
/gnu/store/l4lr0f5cjd0nbsaaf8b5dmcw1a1yypr3-glibc-2.27
/gnu/store/pp0bakrbyv9xmp1kyv2114l19s11b74z-gcc-6.4.0-lib

It seems to be an upstream bug:

https://github.com/golang/go/issues/16860

It's still unresolved and only planned for Go 1.13.

Note that adding

              "-asmflags=all=-trimpath=/gnu/store"
              "-gcflags=all=-trimpath=/gnu/store"

to the build system does not work, because we need to trim the hash too.
-trimpath supports only one parameter, so we can't use it for this purpose.

We could use Boyer-Moore to replace the hashes of all Go dependencies.
We must be careful to only replace paths to Go libraries.

--
Pierre Neidhardt
https://ambrevar.xyz/

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

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

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlwTzAcACgkQm9z0l6S7
zH/coAf/YvJSuI0oh+xHwPDXes3i2uw1hysc7tAesSk4mGdS6ImsWdLuUEm6V1or
gZ1fNzikwEFzY86F/h6VR0nya/gv17UiyUInZmiVkOrrM1b8tQA7x00YFqjKqr0U
jKtdgN7dXgyLYinK0XG4mnNi9UefWhyQgfeQHPs2NVczbIqsRkB7ECQU9CuSfoeM
qNUkhHVij4y5FX0nuYw5ftrvZTvoIBU+FZ7UuCR3yonNC4q7wEVbKvQiNWFEwdu/
4z2DINUnbBqOL84VjnRa95NobYpCuhse1XyQQBZDVjqUGDwbyDD8BIk15lDHvSa1
YTzzYNjC3spRhE8FdymB0qIc+SE0gg==
=/d4s
-----END PGP SIGNATURE-----
--=-=-=--




Acknowledgement sent to Pierre Neidhardt <mail@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#33741; Package guix. 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: Sun, 16 Dec 2018 21:30:02 UTC

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