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/dist: "go tool dist: unknown $GOOS linux" #14024

Closed
danhardman opened this issue Jan 20, 2016 · 8 comments
Closed

cmd/dist: "go tool dist: unknown $GOOS linux" #14024

danhardman opened this issue Jan 20, 2016 · 8 comments

Comments

@danhardman
Copy link

@danhardman danhardman commented Jan 20, 2016

  1. Go version: 1.5.3
  2. Windows/AMD64
  3. Ran make.bat from C:/go/src
  4. Not really sure
  5. go tool dist: unknown $GOOS linux

I'm trying to set my target GOOS and GOARCH to linux/arm whilst developing using atom go that I can build on save and see appropriate error messages given to me through the atom package: go-plus. However, When I do this on Windows, I get error messages saying go tools cannot be found.

I was told running make.bat would solve this issue, however when it gets to running .\cmd\dist\ I get this error go tool dist: unknown $GOOS linux.

Obviously "linux" is included in okgoos so I'm not sure why https://github.com/golang/go/blob/master/src/cmd/dist/build.go#L115 is failing.

@davecheney
Copy link
Contributor

@davecheney davecheney commented Jan 20, 2016

This is likely to be a mistake in your Go installation, caused by step 3. I recommend removing what's left of your Go installation and replacing it with a fresh one.

As of Go 1.5 no additional steps are required to prepare for cross compilation.

@davecheney davecheney closed this Jan 20, 2016
@danhardman
Copy link
Author

@danhardman danhardman commented Jan 20, 2016

Removed my go installation completely and installed fresh.

Ran SET GOOS=linux && go build and got:

go build runtime: linux /amd64 must be bootstrapped using make.bat

Same thing if I SET GOARCH=arm too.

@minux
Copy link
Member

@minux minux commented Jan 20, 2016

@danhardman
Copy link
Author

@danhardman danhardman commented Jan 20, 2016

Hopefully... Till then I'll develop on my mac. That seems to work fine when I change the target OS

@minux
Copy link
Member

@minux minux commented Jan 20, 2016

@danhardman
Copy link
Author

@danhardman danhardman commented Jan 21, 2016

That's brilliant. The commit message also mentions the likelihood of an incorrect $GOROOT so I'll check that out as well, although it was installed in the default place so I'm pretty sure it's not even set. I'll set it and see if that makes a difference.

@davecheney
Copy link
Contributor

@davecheney davecheney commented Jan 21, 2016

Please do not set $GOROOT. This will not help in resolving this issue.

On Thu, Jan 21, 2016 at 12:51 PM, Dan Hardman notifications@github.com
wrote:

That's brilliant. The commit message also mentions the likelihood of an
incorrect $GOROOT so I'll check that out as well, although it was installed
in the default place so I'm pretty sure it's not even set. I'll set it and
see if that makes a difference.


Reply to this email directly or view it on GitHub
#14024 (comment).

@danhardman
Copy link
Author

@danhardman danhardman commented Jan 21, 2016

My build.go is completely different to the one in that commit @minux. That error doesn't exist there...

@golang golang locked and limited conversation to collaborators Jan 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.