#`go: no such tool "compile"` error when building Go from source

6 messages · Page 1 of 1 (latest)

minor sandal
#

I'm having trouble building Go from source using a self-built Go compiler.

steps to reproduce:

  1. clone Go repo
  2. cd src && ./all.bash
  3. Build succeeds and tests pass, yay! party
  4. Now use self-built Go to rebuild Go: PATH="$PWD/../bin:$PATH" GOROOT_BOOTSTRAP="$PWD/.." all.bash

Expected: Build should succeed again
Actual:

Building Go cmd/dist using /home/max/workspace/googlesource.com/go/src/... (go1.22.12 linux/amd64)
++ false
++ [[ /home/max/workspace/googlesource.com/go/src/.. == \/\h\o\m\e\/\m\a\x\/\w\o\r\k\s\p\a\c\e\/\g\o\o\g\l\e\s\o\u\r\c\e\.\c\o\m\/\g\o ]]
++ rm -f cmd/dist/dist
++ GOROOT=/home/max/workspace/googlesource.com/go/src/..
++ nogoenv /home/max/workspace/googlesource.com/go/src/../bin/go build -o cmd/dist/dist ./cmd/dist
++ GO111MODULE=off
++ GOENV=off
++ GOOS=
++ GOARCH=
++ GOEXPERIMENT=
++ GOFLAGS=
++ /home/max/workspace/googlesource.com/go/src/../bin/go build -o cmd/dist/dist ./cmd/dist
go: no such tool "compile"
go: no such tool "compile"
go: no such tool "compile"
go: no such tool "compile"
go: no such tool "compile"
go: no such tool "compile"
go: no such tool "compile"
go: no such tool "compile"
fatal error: internal error: exit hook invoked exit

How do I fix this?

limpid linden
#

r u able to compile a smaller go program using ur self built compiler

minor sandal
#

All the tests passed so I sure hope so 😄

minor sandal
woven lily
#

maybe get a cleaner path without ..