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

x/website: doc/install/source instructions don't work due to distribution (ubuntu 22.04) provided go (go1.18.1) being too old #65654

Closed
twhateley opened this issue Feb 11, 2024 · 4 comments
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@twhateley
Copy link

Go version

1.22

Output of go env in your module/workspace:

GO111MODULE=""
GOARCH="amd64"
GOBIN="/home/tomwhateley/go/bin"
GOCACHE="/home/tomwhateley/.cache/go-build"
GOENV="/home/tomwhateley/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/tomwhateley/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/tomwhateley/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/tomwhateley/go/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/tomwhateley/go/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/tomwhateley/go/go/src/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1016170179=/tmp/go-build -gno-record-gcc-switches"

What did you do?

On the most recent LTS version of Ubuntu (22.04) using the default version of go installed with apt-get install golang-go, I am unable to build the recent release of go (1.22) from souce following the instructions on the website: https://go.dev/doc/install/source

Specifically this section doesn't mention/discuss the Go version requirements:
"Install Go compiler binaries for bootstrap"
"The Go toolchain is written in Go. To build it, you need a Go compiler installed. The scripts that do the initial build of the tools look for a "go" command in $PATH, so as long as you have Go installed in your system and configured in your $PATH,"

What did you see happen?

New go, Yay!

cd ~/go
git clone git@github.com:golang/go.git

cd go/src
./all.bash
Building Go cmd/dist using /usr/lib/go-1.18. (go1.18.1 linux/amd64)
found packages main (build.go) and building_Go_requires_Go_1_20_6_or_later (notgo120.go) in /home/tomwhateley/go/go/src/cmd/dist

What did you expect to see?

I was hoping to get the latest and greatest version of go built

@gopherbot gopherbot added this to the Unreleased milestone Feb 11, 2024
@thediveo
Copy link

https://go.dev/doc/go1.22#bootstrap release notes point this out.

I personally have moved on from "LTS" a long time a-go (pun intended): they tend to be long-time broken, seen both for Debian and Ubuntu, but also RHEL, and they expect everyone else to keep their slow LTS pace and totally give up innovation. They expect miracles and that simply doesn't work.

@ALTree
Copy link
Member

ALTree commented Feb 11, 2024

Note that the page says:

There are four possible ways to obtain a bootstrap toolchain:

  • Download a recent binary release of Go.

Emphasis on "recent" is mine. 1.18 is no longer supported, so it probably doesn't qualify as "recent".

It is also true that below it says:

Bootstrap toolchain from binary release

To use a binary release as a bootstrap toolchain, see the downloads page or use any other packaged Go distribution.

"any" can be misleading if LTS distros still ship 1.18. Maybe we could amend the "any other packaged Go distribution" part reiterating that is has to be a recent, supported one.

@gopherbot
Copy link

Change https://go.dev/cl/562619 mentions this issue: _content/doc/install: document minumum bootstrap versions

@twhateley
Copy link
Author

twhateley commented Feb 12, 2024

Recent can be quite subjective, especially within the context Linux distributions... it might be worth clarifying that this is referring to supported go distribution or go package.

From the perspective of someone coming from Ubuntu, 22.04 is the most recent distribution, and go1.18 (released 2022-03-15) is pretty recent as well, and will be officially supported (by Ubuntu) for another 3 years.

It is probably also worth checking over the section "Bootstrap toolchain from C source code", as this will now require an extra step to build an intermediate version of go (1.20?) from the 1.4 c source code, which can then be used to compile go 1.22+

@thanm thanm added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 12, 2024
@hyangah hyangah removed the website label Feb 20, 2024
@hyangah hyangah modified the milestones: Unreleased, Backlog Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

7 participants