From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: [go-build-system] Date: Thu, 31 Aug 2017 08:17:15 -0400 Message-ID: <20170831121715.GA18591@jasmine.lan> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gBBFr7Ir9EOA20Yy" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnXAD-0006N1-1I for guix-devel@gnu.org; Thu, 31 Aug 2017 17:38:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnXAA-0000K8-7C for guix-devel@gnu.org; Thu, 31 Aug 2017 17:38:13 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:50659) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnXAA-0000Ja-3H for guix-devel@gnu.org; Thu, 31 Aug 2017 17:38:10 -0400 Content-Disposition: inline In-Reply-To: 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: Frederick Muriithi Cc: guix-devel@gnu.org --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 29, 2017 at 03:54:40PM +0300, Frederick Muriithi wrote: > Maybe the following will help clarify the issue: >=20 > The package being built needs the sources of the dependenc(y/ies) to > be available in its GOPATH. >=20 > The build system needs to set the GOPATH such that the Go build system > will find the the dependencies and build against them. Right. > I have a repository[1] where I'm currently working on definitions for > IPFS before translating them for mainline guix. > If you checkout commit f7f97edc635381384c3532eb8a2bd92cf10a5ac9 and > look at the code there, you can see that I manually set up GOPATH in > the build of go-log so that it can find go-logging (the modified > version[2]). IPFS is interesting. I hope we can get it in Guix. I have a work-in-progress of a go-build-system with packages for Syncthing up here: https://github.com/lfam/guix/tree/wip-syncthing It seems to work until the Syncthing build fails like this: ------ /gnu/store/wr8r001nxr8ryfnw1kkgrmbij4yqldxi-golang-org-x-net-0.0.0-0.ffcf1b= e/src/golang.org/x/net/internal/netreflect/socket_19.go:15:2: errInvalidTyp= e redeclared in this block previous declaration at /gnu/store/wr8r001nxr8ryfnw1kkgrmbij4yqldxi= -golang-org-x-net-0.0.0-0.ffcf1be/src/golang.org/x/net/internal/netreflect/= socket.go:15:2 /gnu/store/wr8r001nxr8ryfnw1kkgrmbij4yqldxi-golang-org-x-net-0.0.0-0.ffcf1b= e/src/golang.org/x/net/internal/netreflect/socket_19.go:16:2: errOpNoSuppor= t redeclared in this block previous declaration at /gnu/store/wr8r001nxr8ryfnw1kkgrmbij4yqldxi= -golang-org-x-net-0.0.0-0.ffcf1be/src/golang.org/x/net/internal/netreflect/= socket.go:16:2 /gnu/store/wr8r001nxr8ryfnw1kkgrmbij4yqldxi-golang-org-x-net-0.0.0-0.ffcf1b= e/src/golang.org/x/net/internal/netreflect/socket_19.go:20:37: SocketOf red= eclared in this block previous declaration at /gnu/store/wr8r001nxr8ryfnw1kkgrmbij4yqldxi= -golang-org-x-net-0.0.0-0.ffcf1be/src/golang.org/x/net/internal/netreflect/= socket.go:20:37 /gnu/store/wr8r001nxr8ryfnw1kkgrmbij4yqldxi-golang-org-x-net-0.0.0-0.ffcf1b= e/src/golang.org/x/net/internal/netreflect/socket_19.go:30:49: PacketSocket= Of redeclared in this block previous declaration at /gnu/store/wr8r001nxr8ryfnw1kkgrmbij4yqldxi= -golang-org-x-net-0.0.0-0.ffcf1be/src/golang.org/x/net/internal/netreflect/= socket.go:30:49 ------ I have a hunch about what might be wrong [0] but do any Go programmers have some guidance? [0] It could be related to the use of these package unions: https://github.com/lfam/guix/blob/wip-syncthing/gnu/packages/syncthing.scm#= L1105 The affected package is part of a group of packages that uses a union like that: https://github.com/lfam/guix/blob/wip-syncthing/gnu/packages/syncthing.scm#= L1845 I wonder if we should instead make a union of all the Go inputs so that GOPATH has a single entry, rather than just using unions for selected packages and letting GOPATH be a list of directories. --gBBFr7Ir9EOA20Yy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlmn/kcACgkQJkb6MLrK fwinXw//XtAsWYRvLKLBHoDfMBPAxLMB1WojnBjRQVFJ69meuQueYodzAi9xZErK nMdPmeiglG7xxuTZub5FkcY2PPnlojbLmgtvspHbE/eImA5mJtdwMA168x5NyUGC kZHxotTxEjvMUqMOPtBWFqZBaYveH9k5cdPDQb5God1VHV9ygJaML7XXipI+eGoQ F26puLCIvtNj5RSgrO6q3JZFiF/vdNe9vfq1odOOSgSIoybI7gHd/kEFu/4pesek ruLdvQO87GI4R9svHJEgY4uv503owm5RboqnLcnPfD3rPomtlJxwoQG0Hz/T2UlJ sRPYL7EsfWbTxrM4j4YtYjgKXW/4Sd/Iv03v2tZA+SZF03Y/NB8HIFuBz3jFIFh5 6AihYs5MFUKVkK6l4mcKngPDArkvN8aa0wMaAsLx65/s7iNXS1Uxw2p8QS9UiT3z NtyPtR+cOZzIFLcvD5tDyWaN9xIWJXGzt3aL0k28J09R3BH+6yTZ9RwX2BlS+vyM E2Fbch9i3QyHS7LKc8gWoN90xze7wntv8tZ+Bqj/k2D9X6YDshhQ+cZr5GYTShG+ ssLk3KhXc5ahRfOf02B3LL9hLFfDlOv/ZV+IXfCdrM/h3etT7Nq9KMaZrRn9b/DJ hcWyEUwPvZP5Z88HWWCzrQM4ne1rbEcXLUOJXcPAZQUK2jfCL2k= =fRNW -----END PGP SIGNATURE----- --gBBFr7Ir9EOA20Yy--