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: tree fails to build after commit ab096d587f9bb5dcdf895511ee6d213aade7e30f #13840

Closed
siebenmann opened this issue Jan 6, 2016 · 1 comment

Comments

@siebenmann
Copy link

Attempting to build the tree after commit ab096d5 reports:

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

go tool dist: FAILED: not a Git repo; must put a VERSION file in $GOROOT

This is because the new code introduced in that commit runs git rev-parse --git-dir in the root of the repository, which on my machine (Fedora 23, git version 2.5.0) causes it to print out merely .git as the path to the Git directory instead of the absolute path. Since all.bash and thus cmd/dist is being run from $GOROOT/src instead of $GOROOT, the new stat check now fails.

On my machine:

$ cd /tmp/go
$ git rev-parse --git-dir
.git
$ cd src
$ git rev-parse --git-dir
/tmp/go/.git

Git also behaves this way on Ubuntu 14.04 LTS (git version 1.9.1), a FreeBSD 9.3 machine I have access to (git version 2.6.1), and OmniOS (git version 1.8.5.6), so I expect this is general long-standing git behavior.

@siebenmann siebenmann changed the title cmd/dist: tree fails to build on Fedora 23 after commit ab096d587f9bb5dcdf895511ee6d213aade7e30f cmd/dist: tree fails to build after commit ab096d587f9bb5dcdf895511ee6d213aade7e30f Jan 6, 2016
@ianlancetaylor
Copy link
Contributor

Fixed by https://golang.org/cl/18321.

@golang golang locked and limited conversation to collaborators Jan 7, 2017
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

3 participants