unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: Frederick Muriithi <fredmanglis@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [go-build-system]
Date: Thu, 31 Aug 2017 08:17:15 -0400	[thread overview]
Message-ID: <20170831121715.GA18591@jasmine.lan> (raw)
In-Reply-To: <CALjrZwaT_5wgMcq0BUtAZzcp8gT9TJKWkbMftjt3A2jdG3yn9A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2981 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-08-31 21:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29 12:54 [go-build-system] How to access properties or keys of a package on the build side? Frederick Muriithi
2017-08-31 12:17 ` Leo Famulari [this message]
2017-09-02 17:00   ` [go-build-system] 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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170831121715.GA18591@jasmine.lan \
    --to=leo@famulari.name \
    --cc=fredmanglis@gmail.com \
    --cc=guix-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).