Skip to content

runtime: Suddenly started getting error roundupsize redeclared in this block #65663

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

Closed
tw-surveynerds opened this issue Feb 11, 2024 · 2 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.

Comments

@tw-surveynerds
Copy link

Go version

go version go1.22.0 linux/amd64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/vscode/.cache/go-build'
GOENV='/home/vscode/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.0'
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-build100524131=/tmp/go-build -gno-record-gcc-switches'

What did you do?

After rebooting my ubuntu machine and loaded my MS Devcontainers. I can't compile my api project anymore.

I haven't change any code so I'm not sure I've introduced any errors.
Things I've tried in an attempt to fix this error:

  1. Uninstall go version 1.21 and upgraded 1.22
  2. Rebuild the Devcontainer
  3. Researched online with no success.

I have other Devcontainers set up the same way and they build as usual but this api is using some additional crypto packages.

go 1.22

require github.com/gorilla/mux v1.8.0

require (
github.com/go-redis/redis v6.15.9+incompatible
github.com/google/uuid v1.3.0
github.com/joho/godotenv v1.5.1
github.com/lib/pq v1.10.9
github.com/microcosm-cc/bluemonday v1.0.25
github.com/swaggo/swag v1.8.1
golang.org/x/crypto v0.14.0
)

require (
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/spec v0.20.6 // indirect
github.com/go-openapi/swag v0.19.15 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.27.10 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/tools v0.9.3 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect

What did you see happen?

runtime

/usr/local/go/src/runtime/msize_allocheaders.go:16:6: roundupsize redeclared in this block
/usr/local/go/src/runtime/msize.go:13:6: other declaration of roundupsize
/usr/local/go/src/runtime/map.go:357:25: too many arguments in call to roundupsize
have (uintptr, bool)
want (uintptr)
/usr/local/go/src/runtime/slice.go:191:41: too many arguments in call to roundupsize
have (uintptr, bool)
want (uintptr)
/usr/local/go/src/runtime/slice.go:197:56: too many arguments in call to roundupsize
have (uintptr, bool)
want (uintptr)
/usr/local/go/src/runtime/slice.go:210:48: too many arguments in call to roundupsize
have (uintptr, bool)
want (uintptr)
/usr/local/go/src/runtime/slice.go:218:32: too many arguments in call to roundupsize
have (uintptr, bool)
want (uintptr)
/usr/local/go/src/runtime/string.go:273:36: too many arguments in call to roundupsize
have (uintptr, bool)
want (uintptr)
/usr/local/go/src/runtime/string.go:288:38: too many arguments in call to roundupsize
have (uintptr, bool)
want (uintptr)

What did you expect to see?

No errors

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Feb 11, 2024
@seankhliao
Copy link
Member

sounds like a corrupt installation.

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Feb 11, 2024
@rbucker
Copy link

rbucker commented Jun 26, 2024

I had this problem when I built a new instance of go over a previous version/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

4 participants