-
Notifications
You must be signed in to change notification settings - Fork 148
Build of Go's runtime package fails when cross-compiling with go1.9.4 #733
Comments
Also happening here with go1.10. |
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
this is now particularly important because the 1.8.X branch seems to have been removed from docker hub. |
I fixed it on Ubuntu as follow: Type And installing the latest version of Go(currently 1.10) following these steps:
You can set any directory as your GOROOT(the Go directory) and GOPATH(your Go workspace) as you prefer (I set these vars in my .bashrc file). Verify your Go version with |
@rbucker if you're referring to the tags of https://hub.docker.com/_/golang/, that's not accurate -- they're no longer supported, which means they'll no longer receive image rebuilds, but the tags are still very much available: $ docker pull golang:1.8
1.8: Pulling from library/golang
Digest: sha256:f0b5dab7581eddb49dabd1d1b9aa505ca3edcdf79a66395b5bfa4f3c036b49ef
Status: Image is up to date for golang:1.8
$ docker run --rm golang:1.8 go version
go version go1.8.7 linux/amd64 In fact, you can go at least as far back as Go 1.2: $ docker pull golang:1.2
1.2: Pulling from library/golang
a3ed95caeb02: Already exists
5d3df020ecd3: Already exists
067b95d26410: Already exists
9f482ce8050c: Already exists
75f31ee85880: Already exists
8d69f242035f: Already exists
cd80c24f4996: Already exists
Digest: sha256:d6b13df58f0156b21f25a23fa74de59489de5336d2c1290ac00611868203e52d
Status: Image is up to date for golang:1.2
$ docker run --rm golang:1.2 go version
go version go1.2.2 linux/amd64 |
This still seems to fail with go1.10, see https://travis-ci.org/andig/gosdm630/jobs/377325643 for an example. |
Since go1.11 features module support, this is no longer an issue. |
Cross-compiling a program that depends on Go's
runtime
package using the following compilation flags on a amd64/Linux system:It works when just using
gb build
for my native platform.To reproduce:
Compile this sample program from the Go runtime example with the following directory structure:
GOROOT=/path/to/go1.9.2 CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 gb build
works.GOROOT=/path/to/go1.9.4 CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 gb build
fails with the error:According to Ian Lance Taylor, this error was newly introduced in Go 1.9.4. See: https://groups.google.com/forum/#!topic/golang-nuts/52ZHzgo6u1k
Edit: This is with a freshly-built version of gb, built with go 1.9.4.
The text was updated successfully, but these errors were encountered: