Go version

go1.22.6

Output of go env in your module/workspace:

n/a

What did you do?

Building go1.22.6 from source https://go.dev/dl/go1.22.6.src.tar.gz

What did you see happen?

$ GOROOT_BOOTSTRAP=/home/local/go1.19.5 ./make.bash

Building Go cmd/dist using /home/local/go1.19.5. (go1.19.5 linux/amd64)
found packages main (build.go) and building_Go_requires_Go_1_20_6_or_later (notgo120.go) in /home/local/go1.22.6/src/cmd/dist

But building of 1.20.6 (and up to on series 1.20.14) is not supported due to a bug See #68834

What did you expect to see?

A way to build current latest go from the official tarballs.

Comment From: gabyhelp

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Comment From: seankhliao

Duplicate of #68834

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

Comment From: non7top

This is not a question, this a bug report.

Comment From: seankhliao

As far as we can tell, it's something specific to your environment that you're not telling us about, since the instructions you provided do not reproduce the issue. Regardless, as it's an out of support version, it's not going to see any more commits, and the error for the current version is correct.

Perhaps someone in the forums would be willing to troubleshoot your issue.

Comment From: non7top

Thanks. I tried on a clean environment and wasn't able to reproduce the issue. I then ran a build with strace which revealed the problem. So the build system scans the filesystem and if it finds .git directory somewhere (even if it is outside of the go sources location) it assumes there is git involved somehow, it then runs git status --porcelain which returns fatal: not a git repository (or any of the parent directories): .git (with exist code 128) which build system treats as an error. This is where the bug is. So the bug is definitely there (in how vcs is detected), but oh well, it is an ancient software and at least it can be worked around.

Thanks for your help.