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/go: "go run -compiler=gccgo main.go" doesn't work well with go1.19rc2 #53909

Closed
zigo101 opened this issue Jul 16, 2022 · 6 comments
Closed
Labels
FrozenDueToAge GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@zigo101
Copy link

zigo101 commented Jul 16, 2022

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

$ go version
go version go1.19rc2 linux/amd64

$ gccgo --version
gccgo (Debian 10.2.1-6) 10.2.1 20210110

Does this issue reproduce with the latest release?

Not for 1.18.x, just for 1.19rc2

What did you do?

go run -compiler=gccgo main.go

What did you expect to see?

Run well.

What did you see instead?

Errors:

../software/go/src/runtime/chan.go:21:2: cannot find package
../software/go/src/runtime/error.go:7:8: cannot find package
...

Running gccgo solely is also okay.

@gopherbot gopherbot added this to the Gccgo milestone Jul 16, 2022
@ianlancetaylor
Copy link
Contributor

I can't recreate this. Can you see when it stopped working? Thanks.

@zigo101
Copy link
Author

zigo101 commented Jul 17, 2022

At least since 1.19beta1.

1.18.4 is ok.

My gccgo version is 10, which is the newest version on debian.

My go env:

$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/myname/.cache/go-build"
GOENV="/home/myname/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/myname/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/myname/go"
GOPRIVATE=""
GOPROXY=""
GOROOT="/home/myname/software/go"
GOSUMDB="on"
GOTMPDIR=""
GOTOOLDIR="/home/myname/software/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.4"
GCCGO="/usr/bin/gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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-build3655385898=/tmp/go-build -gno-record-gcc-switches"

@ianlancetaylor
Copy link
Contributor

I can't recreate the problem with 1.19beta1 either. I'm sorry, I don't know what is happening here. Do you have GOROOT set in the environment?

@ianlancetaylor ianlancetaylor added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go labels Jul 18, 2022
@zigo101
Copy link
Author

zigo101 commented Jul 19, 2022

No. I only set /home/myname/software/go/bin in PATH.

@zigo101
Copy link
Author

zigo101 commented Jul 19, 2022

I just built the go1.19rc2 tag and the tip. The problem exists in the go1.19rc2 tag version but is fixed in tip.
I haven't enough time to bisect which revision fixed this problem.
If the tip will be merged into 1.19, then this issue may be closed now.

@ianlancetaylor
Copy link
Contributor

OK, still not sure why it worked for me, but I may have made a mistake somewhere. Glad it is working for you. This may be #53815.

@ianlancetaylor ianlancetaylor closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2022
@golang golang locked and limited conversation to collaborators Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go 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

3 participants