Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: not rebuilding something when cross-compiling nacl #13655

Closed
bradfitz opened this issue Dec 17, 2015 · 4 comments
Closed

cmd/go: not rebuilding something when cross-compiling nacl #13655

bradfitz opened this issue Dec 17, 2015 · 4 comments
Milestone

Comments

@bradfitz
Copy link
Contributor

bradfitz@dev-bradfitz-debian2:~/go/src$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/bradfitz"
GORACE=""
GOROOT="/home/bradfitz/go"
GOTOOLDIR="/home/bradfitz/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

bradfitz@dev-bradfitz-debian2:~/go/src$ go version
go version devel +d270a67 Thu Dec 17 17:56:15 2015 +0000 linux/amd64

bradfitz@dev-bradfitz-debian2:~/go/src$ git diff

bradfitz@dev-bradfitz-debian2:~/go/src$ GOOS=nacl GOARCH=amd64p32 go install std
# runtime
runtime/atomic_pointer.go:8: import /home/bradfitz/go/pkg/nacl_amd64p32/runtime/internal/atomic.a: object is [nacl amd64p32 devel +5ef8991 Thu Dec 10 19:12:13 2015 +0000 X:none] expected [nacl amd64p32 devel +d270a67 Thu Dec 17 17:56:15 2015 +0000 X:none]

Using -a unborks it:

bradfitz@dev-bradfitz-debian2:~/go/src$ GOOS=nacl GOARCH=amd64p32 go install -a std
# net
net/hook_unix.go:16: undefined: dnsDialer
bradfitz@dev-bradfitz-debian2:~/go/src$ GOOS=nacl GOARCH=amd64p32 go install std
# net
net/hook_unix.go:16: undefined: dnsDialer

(and now I get the error I was looking for)

But -a should not be required.

@bradfitz bradfitz added this to the Go1.6 milestone Dec 17, 2015
@bradfitz
Copy link
Contributor Author

Same with Windows here:

bradfitz@dev-bradfitz-debian2:~/go/src$ GOOS=linux go install net
bradfitz@dev-bradfitz-debian2:~/go/src$ GOOS=windows go install net
# runtime
runtime/atomic_pointer.go:8: import /home/bradfitz/go/pkg/windows_amd64/runtime/internal/atomic.a: object is [windows amd64 devel +5ef8991 Thu Dec 10 19:12:13 2015 +0000 X:none] expected [windows amd64 devel +d270a67 Thu Dec 17 17:56:15 2015 +0000 X:none]

@ianlancetaylor
Copy link
Contributor

Taking a look.

@ianlancetaylor
Copy link
Contributor

https://golang.org/cl/17916 . I think I can write a test using go list.

@gopherbot
Copy link

CL https://golang.org/cl/17916 mentions this issue.

@golang golang locked and limited conversation to collaborators Dec 29, 2016
@rsc rsc removed their assignment Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants