-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: go test -i -compiler=gccgo does not work if gc standard packages are not installed #16701
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
Comments
Looks like your gccgo build is broken. How exactly did you build and install it? Does any program work? What are the contents of the directory /opt/gccgo/lib64/go? Note that if you had an existing build directory, the libgo Makefile was recently changed, such that you need to remove your existing libgo directory and rebuild, as mentioned at https://groups.google.com/d/msg/gofrontend-dev/20qRNKwJK1M/lHwm5NSwAgAJ . |
Here's how I installed gccgo from a fresh debian jesse image on GCE:
Build gccgo:
|
Oh, and the gcc SHA I built from seems to be more recent than the email you linked:
|
Does any invocation of the newly installed go tool work to build a program? |
Yes, |
Fixed on GCC mainline by SVN revision 239486. But that fix is not great, because it only works for the gccgo-specific version of the go tool. That version of the go tool has a known list of standard packages that it relies on in various ways. Reopening this issue in order to work out a better fix in the go tool. |
go test -i ./...
fails with can't load package: ... cannot find package "<stdlib>"
The go/build package does not know that gccgo's standard packages don't have source, and will report an error saying that it can not find them. Work around that in the cmd/go sources, since the go/build sources don't currently have a list of standard packages. This should get a real fix in the master sources, somehow. Fixes golang/go#16701. Reviewed-on: https://go-review.googlesource.com/27052 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239486 138bc75d-0d04-0410-961f-82ee72b054a4
Is a fix for this still needed, given build caching? (My impression from #25138 (comment) and elsewhere is that |
I think this was fixed by https://golang.org/cl/111595. |
The go/build package does not know that gccgo's standard packages don't have source, and will report an error saying that it can not find them. Work around that in the cmd/go sources, since the go/build sources don't currently have a list of standard packages. This should get a real fix in the master sources, somehow. Fixes golang/go#16701. Reviewed-on: https://go-review.googlesource.com/27052 From-SVN: r239486
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.7rc3 gccgo (GCC) 7.0.0 20160812 (experimental) linux/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
go test -i github.com/cockroachdb/cockroach/...
What did you expect to see?
Nothing, exit code 0.
What did you see instead?
@ianlancetaylor
The text was updated successfully, but these errors were encountered: