From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Golang programs keeping references [gnu: go: Update default to 1.11.] Date: Sun, 09 Dec 2018 19:46:03 +0100 Message-ID: <87a7lev8r8.fsf@ambrevar.xyz> References: <20181112093245.26230.94815@vcs0.savannah.gnu.org> <20181112093246.AC1D620498@vcs0.savannah.gnu.org> <20181112172925.GA8875@jasmine.lan> <87efbqb3gy.fsf@ambrevar.xyz> <20181112174820.GB12396@jasmine.lan> <20181112175102.GA12783@jasmine.lan> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gW45m-0006lX-DO for guix-devel@gnu.org; Sun, 09 Dec 2018 13:46:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gW45i-0003VM-D3 for guix-devel@gnu.org; Sun, 09 Dec 2018 13:46:14 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:47757) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gW45i-0003N8-3j for guix-devel@gnu.org; Sun, 09 Dec 2018 13:46:10 -0500 In-reply-to: <20181112175102.GA12783@jasmine.lan> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Leo Famulari Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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: =2D-8<---------------cut here---------------start------------->8--- "-asmflags=3Dall=3D-trimpath=3D/gnu/store" "-gcflags=3Dall=3D-trimpath=3D/gnu/store" =2D-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 t= he 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 f= or 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 see= m to be a solution either. And we might have to wait for Go 1.13... =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlwNYusACgkQm9z0l6S7 zH9wVAf/b6MkOVR6HLaaurZPnbFq3g/RHGHqDdtcuE1BUqQoNU+Gzx8fitOrMMWN qYXHoA0Zspyx+qe+HKfILA2clwXyd0AM/SRtRKC0dpQG8Iya3fLB4qYdcerNswYA P6A1OZv/BUXBLmgxKFx2qlPWSq4v4LL27QRW02SjRpESoteY7mmmTmNSfKknNu6z /ALbQNjrqvXGRZSLzOPSDXmsETAetEc6H9EWZ/ABU9KxBtVjfSc2Z+RdBMsr+SAt 5qbad1VTNwZFRll/XZVv2HH0Li9MVz/GFnTGRbHLbyhHR1wMAHPLhnIfjSCZRAyI FuOaGFiLBKe1SK/hp0b/VrfPmyh6zw== =lvnL -----END PGP SIGNATURE----- --=-=-=--