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

build: should raise error when GOROOT_BOOTSTRAP == GOROOT #12214

Closed
songgao opened this issue Aug 20, 2015 · 8 comments
Closed

build: should raise error when GOROOT_BOOTSTRAP == GOROOT #12214

songgao opened this issue Aug 20, 2015 · 8 comments
Milestone

Comments

@songgao
Copy link

songgao commented Aug 20, 2015

Despite src/all.bash asks to Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4., it seems that only a Go 1.4 tree works. Setting $GOROOT_BOOTSTRAP to a Go 1.5 tree yields error:

##### Building Go bootstrap tool.
cmd/dist

##### Building Go toolchain using /Users/songgao/go.
runtime
go tool: no such tool "compile"
go tool dist: FAILED: /Users/songgao/go/bin/go install -v bootstrap/...: exit status 3

Is this a bug?

@ianlancetaylor ianlancetaylor changed the title go1.5 cannot bootstrap from a go1.5 tree build: go1.5 cannot bootstrap from a go1.5 tree Aug 20, 2015
@ianlancetaylor
Copy link
Contributor

Yes, that would be a bug. I can't recreate it, though. I tried it and it worked fine for me.

Do you have GOROOT set in the environment?

Can you show the exact steps you followed?

@bradfitz
Copy link
Contributor

What is your environment?

Are you trying to compile Go 1.5 with the same Go 1.5 directory? That is, is your $GOROOT_BOOTSTRAP equal to your current directory (without the "src") part? That won't work.

@davecheney
Copy link
Contributor

@bradfitz that sure doesn't work, and matches the OP's report

% env GOROOT_BOOTSTRAP=$HOME/go ./all.bash
##### Building Go bootstrap tool.
cmd/dist

##### Building Go toolchain using /home/dfc/go.
runtime
go tool: no such tool "compile"
go tool dist: FAILED: /home/dfc/go/bin/go install -v bootstrap/...: exit status 3

We should add a check to ./all.bash to halt in this case

@davecheney
Copy link
Contributor

@songgao
Copy link
Author

songgao commented Aug 20, 2015

Yeah I think it's because I set the GOROOT_BOOTSTRAP to the go1.5 where all.bash is run.

Somehow I was under the impression that using a different copy of go1.5 tree gave the same error but I couldn't reproduce that one. Maybe I mis-typed something.

@gopherbot
Copy link
Contributor

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

@adg adg changed the title build: go1.5 cannot bootstrap from a go1.5 tree build: should raise error when GOROOT_BOOTSTRAP == GOROOT Aug 20, 2015
@mikioh mikioh added this to the Go1.6 milestone Aug 24, 2015
@oneumyvakin
Copy link

What it actually should means?

echo "ERROR: \$GOROOT_BOOTSTRAP must not be set to \$GOROOT" >&2
echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2

What is the right path for GOROOT_BOOTSTRAP ?

@bradfitz
Copy link
Contributor

@oneumyvakin, please bring questions to the golang-nuts@ mailing list. This is a closed bug.

The short summary is you need Go to build Go. Details are at https://golang.org/s/go15bootstrap

@golang golang locked and limited conversation to collaborators Sep 27, 2015
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

7 participants