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

cmd/compile: internal compiler error: missing reader for "sync/atomic".LoadPointer #51857

Closed
thesyncim opened this issue Mar 22, 2022 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@thesyncim
Copy link

thesyncim commented Mar 22, 2022

What version of Go are you using (go version)?

$ go1.18 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/thesyncim/Library/Caches/go-build"
GOENV="/Users/thesyncim/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/thesyncim/go/pkg/mod"
GONOPROXY="github.com/GetStream"
GONOSUMDB="github.com/GetStream"
GOOS="darwin"
GOPATH="/Users/thesyncim/go"
GOPRIVATE="github.com/GetStream"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/thesyncim/skipset/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 -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/m3/yrklg3ys4xv28m70sb1x8fcw0000gn/T/go-build1309898556=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

go build -gcflags=-d=unified=1 github.com/thesyncim/skipset

What did you expect to see?

No error

What did you see instead?

➜  skipset git:(master) go build -gcflags=-d=unified=1 github.com/thesyncim/skipset
# github.com/thesyncim/skipset
./util.go:34:2: internal compiler error: missing reader for "sync/atomic".LoadPointer
@thesyncim
Copy link
Author

cc @mdempsky

@thesyncim
Copy link
Author

thesyncim commented Mar 22, 2022

works fine with GOEXPERIMENT=unified

➜  skipset git:(master) GOEXPERIMENT=unified go build -gcflags=-d=unified=1 github.com/thesyncim/skipset
➜  skipset git:(master)

@mknyszek mknyszek changed the title internal compiler error: missing reader for "sync/atomic".LoadPointer cmd/compile: internal compiler error: missing reader for "sync/atomic".LoadPointer Mar 22, 2022
@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 22, 2022
@mknyszek mknyszek added this to the Go1.19 milestone Mar 22, 2022
@cuonglm
Copy link
Member

cuonglm commented Mar 22, 2022

You have to use -gcflags=all=-d=unified to make all packages compiled with unified IR, or using GOEXPERIMENT=unified go build without any further compiler flags.

Closing since when this works as intended.

@cuonglm cuonglm closed this as completed Mar 22, 2022
@golang golang locked and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge 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

4 participants