[pkg-golang-devel] Bug#776401: Bug#776401: [Pkg-golang-devel] Bug#776401: Bug#776401: src:golang: Set CGO_ENABLED for all platforms

Michael Hudson-Doyle michael.hudson at canonical.com
Fri Feb 5 00:56:37 UTC 2016


On 4 February 2016 at 02:12, Hilko Bengen <bengen at debian.org> wrote:
> * Tianon Gravi:
>
>> I'm not positive whether all were required for this to work, but given
>> that it _did_ work, I think this is in the realm of possible with the
>> changes of Go 1.5 and am inclined to close this bug as "fixed" --
>> thoughts? :)
>
> Unfortunately, it's not that easy. :-(
>
> Last time I checked, I was able to "go build" a package from $GOPATH,
> but not "go install" because "go install" wanted to install the
> cross-built standard library for the other architecture to $GOROOT, even
> if no CGO was involved. This is still the case with golang 2:1.5.3-1.

There is no getting around the fact that this is a consequence of the
way the golang packaging is done since 1.5.

I guess it could be fixed by going back to building lots of
golang-$GOOS-$GOARCH packages, but somehow that doesn't seem very
appealing, it would be nicer to allow the go install command to work
(which would also allow the user to use their choice of toolchain for
cgo, etc). But I don't know how to do that. Have a per-user overlayfs
over /usr/lib/go and set GOROOT to that? (not a serious suggestion!)

Cheers,
mwh



More information about the pkg-golang-devel mailing list