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

go1.23.4 linux/amd64 completely broken #70732

Closed
kazzmir opened this issue Dec 9, 2024 · 6 comments
Closed

go1.23.4 linux/amd64 completely broken #70732

kazzmir opened this issue Dec 9, 2024 · 6 comments

Comments

@kazzmir
Copy link

kazzmir commented Dec 9, 2024

Go version

go version go1.23.4 linux/amd64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/ubuntu/.cache/go-build'
GOENV='/home/ubuntu/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/ubuntu/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/ubuntu/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/ubuntu/tmp/go1.23.4'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/ubuntu/tmp/go1.23.4/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.23.4'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/ubuntu/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build4140709493=/tmp/go-build -gno-record-gcc-switches'

What did you do?

  1. download https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
  2. tar -xf ...
  3. go/bin/go build x.go

Where x.go is just

package main
func main(){}

What did you see happen?

On machine 1 (ubuntu 24):

go1.23.4/bin/go build x.go
# runtime
go1.23.4/src/runtime/proc.go:319:6: runExitHooks redeclared in this block
	go1.23.4/src/runtime/exithook.go:41:6: other declaration of runExitHooks

On another linux machine, which is nearly identical I actually get a different error

$ go1.23.4/bin/go build x.go
# runtime/internal/sys
go1.23.4/src/runtime/internal/sys/intrinsics_common.go:9:7: len8tab redeclared in this block
	go1.23.4/src/runtime/internal/sys/intrinsics.go:76:7: other declaration of len8tab
go1.23.4/src/runtime/internal/sys/intrinsics_common.go:32:6: Len64 redeclared in this block
	go1.23.4/src/runtime/internal/sys/intrinsics.go:99:6: other declaration of Len64
go1.23.4/src/runtime/internal/sys/intrinsics_common.go:50:7: m0 redeclared in this block
	go1.23.4/src/runtime/internal/sys/intrinsics.go:117:7: other declaration of m0
go1.23.4/src/runtime/internal/sys/intrinsics_common.go:51:7: m1 redeclared in this block
	go1.23.4/src/runtime/internal/sys/intrinsics.go:118:7: other declaration of m1
go1.23.4/src/runtime/internal/sys/intrinsics_common.go:52:7: m2 redeclared in this block
	go1.23.4/src/runtime/internal/sys/intrinsics.go:119:7: other declaration of m2
go1.23.4/src/runtime/internal/sys/intrinsics_common.go:55:6: OnesCount64 redeclared in this block
	go1.23.4/src/runtime/internal/sys/intrinsics.go:122:6: other declaration of OnesCount64
go1.23.4/src/runtime/internal/sys/intrinsics_common.go:86:6: LeadingZeros64 redeclared in this block
	go1.23.4/src/runtime/internal/sys/intrinsics.go:153:6: other declaration of LeadingZeros64
go1.23.4/src/runtime/internal/sys/intrinsics_common.go:89:6: LeadingZeros8 redeclared in this block
	go1.23.4/src/runtime/internal/sys/intrinsics.go:156:6: other declaration of LeadingZeros8
go1.23.4/src/runtime/internal/sys/intrinsics_common.go:92:6: Len8 redeclared in this block
	go1.23.4/src/runtime/internal/sys/intrinsics.go:159:6: other declaration of Len8
go1.23.4/src/runtime/internal/sys/intrinsics_common.go:101:6: Prefetch redeclared in this block
	go1.23.4/src/runtime/internal/sys/intrinsics.go:200:6: other declaration of Prefetch
go1.23.4/src/runtime/internal/sys/intrinsics_common.go:101:6: too many errors

What did you expect to see?

go build runs into compiler errors when it should have no errors. go 1.23.3 works fine.

@kazzmir
Copy link
Author

kazzmir commented Dec 9, 2024

As per #60983 I tried removing all my local go files, but that did not help.

$ rm -rf ~/.config/go
$ rm -rf ~/.cache/go-build
$ rm -rf ~/go

I do not have /usr/local/go or anything like that, nor is the apt golang package installed.

@Jorropo
Copy link
Member

Jorropo commented Dec 9, 2024

The repro steps works perfectly fine for me, did you unpacked 1.23.4 over a previous release ?
Try rm -rv your go1.23.4 install folder and then untar it again.

@kazzmir
Copy link
Author

kazzmir commented Dec 9, 2024

argh, not sure what happened but i erased the local untarred directory and tried again, now it works. mystery

@kazzmir kazzmir closed this as completed Dec 9, 2024
@Jorropo
Copy link
Member

Jorropo commented Dec 9, 2024

mystery

tar merged the files for your previous version of go with 1.23.4's ✨

@daltondiaz
Copy link

I have the same problem, and I install go again, following the steps of download and install:

rm -rf /usr/local/go && tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz

After that go works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants