I have a system with Go 1.15.5 installed. When trying to emerge go 1.20.5 the build fails: [...] + /usr/lib/go/bin/go build -o cmd/dist/dist ./cmd/dist found packages main (build.go) and building_Go_requires_Go_1_17_13_or_later (notgo117.go) in /var/tmp/portage/dev-lang/go-1.20.5/work/go/src/cmd/dist cmd/dist/test.go:11:2: cannot find package "io/fs" in any of: /usr/lib/go/src/io/fs (from $GOROOT) /var/tmp/portage/dev-lang/go-1.20.5/homedir/go/src/io/fs (from $GOPATH) [...] Gentoo does provide go-bootstrap which is currently Go version 1.18.6 which I have installed. However the Go 1.20.5 ebuild doesn't check for the existence of go-bootstrap or provide a means of specifying that some other version of Go should be used. It keeps trying to use 1.15.5 and failing to build. I don't know the right fix for this but perhaps a "bootstrap" use flag?
Created attachment 866345 [details] Build log Go 1.20.5 build log showing old version of go failure.
William, please take a look at https://github.com/gentoo/gentoo/pull/32061.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dfeb2551b6ec5e6be74c161fa36fccbced531ac commit 0dfeb2551b6ec5e6be74c161fa36fccbced531ac Author: William Hubbs <williamh@gentoo.org> AuthorDate: 2023-08-07 18:24:13 +0000 Commit: William Hubbs <williamh@gentoo.org> CommitDate: 2023-08-07 18:26:01 +0000 dev-lang/go: add 1.20.7 We need to both depend on a new enough bootstrap version for correct upgrade ordering *and* check the version we use in src_compile rather than just picking whichever one of go or go-bootstrap is installed. So, add a minimum version variable and use it in BDEPEND & src_compile's has_version calls. Thanks to sam@gentoo.org for the go bootstrap updates. Closes: https://bugs.gentoo.org/911275 Closes: https://github.com/gentoo/gentoo/pull/32061 Signed-off-by: William Hubbs <williamh@gentoo.org> dev-lang/go/Manifest | 1 + dev-lang/go/go-1.20.7.ebuild | 210 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 211 insertions(+)