GNU bug report logs -
#33741
Packages built with Go 1.10+ keep unnecessary references to Go inputs
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33741 in the body.
You can then email your comments to 33741 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#33741
; Package
guix
.
(Fri, 14 Dec 2018 15:29:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Pierre Neidhardt <mail <at> ambrevar.xyz>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Fri, 14 Dec 2018 15:29:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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/
[signature.asc (application/pgp-signature, inline)]
Merged 33620 33741.
Request was from
Leo Famulari <leo <at> famulari.name>
to
control <at> debbugs.gnu.org
.
(Sun, 16 Dec 2018 21:27:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 12 Apr 2019 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 9 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.