Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] new eclass: golang.eclass for compiling go packages
Date: Thu, 11 Jun 2015 23:39:17
Message-Id: 557A1C19.5090606@gentoo.org
In Reply to: Re: [gentoo-dev] new eclass: golang.eclass for compiling go packages by William Hubbs
1 On 06/11/2015 11:43 AM, William Hubbs wrote:
2 > On Thu, Jun 11, 2015 at 08:58:37AM -0700, Andrew Udvare wrote:
3 >>
4 >>> On 2015-06-11, at 08:38, William Hubbs <williamh@g.o> wrote:
5 >>>
6 >>> this eclass is meant to provide a common src_compile function for
7 >>> packages written in the Go programming language.
8 >>>
9 >>> Let me know what you think.
10 >>>
11 >>
12 >> I am wondering about bug 503324 and the issue of needing to create a GOROOT with everything except the package to be compiled. Is your way solving this issue?
13 >
14 > I looked at an example in the tree (specifically go-fuse) and the
15 > src_compile I wrote is the same as the one there.
16 >
17 > In the testing I've done here, GOPATH must be set or "go get" doesn't
18 > work. The newest code for packages will always be stored in the first
19 > directory listed in GOPATH, not in GOROOT.
20 >
21 > Given how GOPATH works in relation to GOROOT, I don't know yet why the
22 > ebuilds in the tree are copying goroot; I'm not quite sure what they are
23 > working around yet.
24
25 For example, dev-go/go-net needs this workaround. Otherwise, if
26 dev-go/go-net is already installed, it triggers a sandbox violation as
27 follows:
28
29 >>> Compiling source in
30 /var/tmp/portage/dev-go/go-net-1.4.2_p20150604/work/src/golang.org/x/net ...
31 WORK=/var/tmp/portage/dev-go/go-net-1.4.2_p20150604/temp/go-build862715022
32 golang.org/x/net/html/charset
33 mkdir -p $WORK/golang.org/x/net/html/charset/_obj/
34 mkdir -p $WORK/golang.org/x/net/html/
35 cd /usr/lib/go/src/golang.org/x/net/html/charset
36 /usr/lib/go/pkg/tool/linux_amd64/6g -o
37 $WORK/golang.org/x/net/html/charset.a -trimpath $WORK -p
38 golang.org/x/net/html/charset -complete -D
39 _/usr/lib/go/src/golang.org/x/net/html/charset -I $WORK -pack
40 ./charset.go ./table.go
41 mkdir -p /usr/lib/go/pkg/linux_amd64/golang.org/x/net/html/
42 cp $WORK/golang.org/x/net/html/charset.a
43 /usr/lib/go/pkg/linux_amd64/golang.org/x/net/html/charset.a
44 go install golang.org/x/net/html/charset: open
45 /usr/lib/go/pkg/linux_amd64/golang.org/x/net/html/charset.a: permission
46 denied
47 --
48 Thanks,
49 Zac

Replies

Subject Author
Re: [gentoo-dev] new eclass: golang.eclass for compiling go packages William Hubbs <williamh@g.o>