Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911275 - dev-lang/go: Building Go 1.20 requires go >= 1.17.13 but provides no facility for bootstraping or using go-bootstrap
Summary: dev-lang/go: Building Go 1.20 requires go >= 1.17.13 but provides no facility...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: William Hubbs
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-07-27 04:51 UTC by Brandon Enright
Modified: 2024-11-18 06:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (build.log,3.35 KB, text/x-log)
2023-07-27 04:54 UTC, Brandon Enright
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brandon Enright 2023-07-27 04:51:41 UTC
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?
Comment 1 Brandon Enright 2023-07-27 04:54:47 UTC
Created attachment 866345 [details]
Build log

Go 1.20.5 build log showing old version of go failure.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-27 05:16:21 UTC
William, please take a look at https://github.com/gentoo/gentoo/pull/32061.
Comment 3 Larry the Git Cow gentoo-dev 2023-08-07 18:30:40 UTC
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(+)