On 06/11/2015 11:43 AM, William Hubbs wrote: > On Thu, Jun 11, 2015 at 08:58:37AM -0700, Andrew Udvare wrote: >> >>> On 2015-06-11, at 08:38, William Hubbs <willi...@gentoo.org> wrote: >>> >>> this eclass is meant to provide a common src_compile function for >>> packages written in the Go programming language. >>> >>> Let me know what you think. >>> >> >> 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? > > I looked at an example in the tree (specifically go-fuse) and the > src_compile I wrote is the same as the one there. > > In the testing I've done here, GOPATH must be set or "go get" doesn't > work. The newest code for packages will always be stored in the first > directory listed in GOPATH, not in GOROOT. > > Given how GOPATH works in relation to GOROOT, I don't know yet why the > ebuilds in the tree are copying goroot; I'm not quite sure what they are > working around yet.
For example, dev-go/go-net needs this workaround. Otherwise, if dev-go/go-net is already installed, it triggers a sandbox violation as follows: >>> Compiling source in /var/tmp/portage/dev-go/go-net-1.4.2_p20150604/work/src/golang.org/x/net ... WORK=/var/tmp/portage/dev-go/go-net-1.4.2_p20150604/temp/go-build862715022 golang.org/x/net/html/charset mkdir -p $WORK/golang.org/x/net/html/charset/_obj/ mkdir -p $WORK/golang.org/x/net/html/ cd /usr/lib/go/src/golang.org/x/net/html/charset /usr/lib/go/pkg/tool/linux_amd64/6g -o $WORK/golang.org/x/net/html/charset.a -trimpath $WORK -p golang.org/x/net/html/charset -complete -D _/usr/lib/go/src/golang.org/x/net/html/charset -I $WORK -pack ./charset.go ./table.go mkdir -p /usr/lib/go/pkg/linux_amd64/golang.org/x/net/html/ cp $WORK/golang.org/x/net/html/charset.a /usr/lib/go/pkg/linux_amd64/golang.org/x/net/html/charset.a go install golang.org/x/net/html/charset: open /usr/lib/go/pkg/linux_amd64/golang.org/x/net/html/charset.a: permission denied -- Thanks, Zac