guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [go-build-system]


From: Leo Famulari
Subject: Re: [go-build-system]
Date: Thu, 31 Aug 2017 08:17:15 -0400
User-agent: Mutt/1.8.3 (2017-05-23)

On Tue, Aug 29, 2017 at 03:54:40PM +0300, Frederick Muriithi wrote:
> Maybe the following will help clarify the issue:
> 
> The package being built needs the sources of the dependenc(y/ies) to
> be available in its GOPATH.
> 
> 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.ffcf1be/src/golang.org/x/net/internal/netreflect/socket_19.go:15:2:
 errInvalidType 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.ffcf1be/src/golang.org/x/net/internal/netreflect/socket_19.go:16:2:
 errOpNoSupport 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.ffcf1be/src/golang.org/x/net/internal/netreflect/socket_19.go:20:37:
 SocketOf 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:20:37
/gnu/store/wr8r001nxr8ryfnw1kkgrmbij4yqldxi-golang-org-x-net-0.0.0-0.ffcf1be/src/golang.org/x/net/internal/netreflect/socket_19.go:30:49:
 PacketSocketOf 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.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]