From: Pierre Neidhardt <mail@ambrevar.xyz>
To: Leo Famulari <leo@famulari.name>
Cc: guix-devel@gnu.org
Subject: Re: Golang programs keeping references [gnu: go: Update default to 1.11.]
Date: Sun, 09 Dec 2018 19:46:03 +0100 [thread overview]
Message-ID: <87a7lev8r8.fsf@ambrevar.xyz> (raw)
In-Reply-To: <20181112175102.GA12783@jasmine.lan>
[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]
I've investigated the possible solutions to avoid including the paths into the
binaries.
I've found this:
https://github.com/golang/go/issues/16860
It's still unresolved and only planned for Go 1.13.
In the meantime, I've played with the -trimpath option to see if I could get
something out of it.
I've added this to Go's (build) function:
--8<---------------cut here---------------start------------->8---
"-asmflags=all=-trimpath=/gnu/store"
"-gcflags=all=-trimpath=/gnu/store"
--8<---------------cut here---------------end--------------->8---
The resulting binary is indeed trimmed, but that's not enough: it seems that
Guix detects the remaining part of the path as a store item and includes it in
the list of requisites. Is this really how Guix works? It does not need the
full path?
Go supports only one call to -trimpath, so we can't even set this to the Go
inputs.
Regarding Boyer-Moore over the binary, we would have to apply the changes for
all recursive Go libraries. Now is there a reliable way to detect what's a Go
library and what is not? We don't want to patch non-Go libraries, right?
(Let's not forget that there is CGo...)
If we can't think of a way to detect a Go library, Boyer-Moore does not seem to
be a solution either. And we might have to wait for Go 1.13...
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next prev parent reply other threads:[~2018-12-09 18:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181112093245.26230.94815@vcs0.savannah.gnu.org>
[not found] ` <20181112093246.AC1D620498@vcs0.savannah.gnu.org>
2018-11-12 17:29 ` Golang programs keeping references [gnu: go: Update default to 1.11.] Leo Famulari
2018-11-12 17:38 ` Pierre Neidhardt
2018-11-12 17:45 ` Leo Famulari
2018-11-12 17:48 ` Leo Famulari
2018-11-12 17:51 ` Leo Famulari
2018-12-09 18:46 ` Pierre Neidhardt [this message]
2018-12-14 9:15 ` Ludovic Courtès
2018-12-14 9:28 ` Pierre Neidhardt
2018-12-14 14:52 ` Ludovic Courtès
2018-12-14 15:20 ` Pierre Neidhardt
2018-12-15 18:10 ` Ludovic Courtès
2018-12-15 18:19 ` Pierre Neidhardt
2018-12-15 19:52 ` Leo Famulari
2018-12-15 19:57 ` Pierre Neidhardt
2018-12-15 19:55 ` Leo Famulari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a7lev8r8.fsf@ambrevar.xyz \
--to=mail@ambrevar.xyz \
--cc=guix-devel@gnu.org \
--cc=leo@famulari.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.