-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: gccgo and GOROOT not quite there yet #3246
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
Labels
Comments
""" /opt/gccgo/lib64/go/4.8.0/x86_64-redhat-linux /opt/gccgo/lib64/go/4.8.0/x86_64-redhat-linux/path /opt/gccgo/lib64/go/4.8.0/x86_64-redhat-linux/debug /opt/gccgo/lib64/go/4.8.0/x86_64-redhat-linux/regexp /opt/gccgo/lib64/go/4.8.0/x86_64-redhat-linux/archive /opt/gccgo/lib64/go/4.8.0/x86_64-redhat-linux/text /opt/gccgo/lib64/go/4.8.0/x86_64-redhat-linux/text/template /opt/gccgo/lib64/go/4.8.0/x86_64-redhat-linux/testing /opt/gccgo/lib64/go/4.8.0/x86_64-redhat-linux/mime /opt/gccgo/lib64/go/4.8.0/x86_64-redhat-linux/log """ This is a completely different layout than the go tool expects. If you run GOROOT=/opt/gccgo go list -compiler=gccgo -json -e text/template you should be able to see the expected target file, which is along the lines of $GOROOT/pkg/gccgo/text/libtemplate.a. I have no idea how the go tool is supposed to get from /opt/gccgo to this new archive list; maybe it should just assume that the known packages are there without any check for a target at all, but then it needs a list of known packages. What are other people doing? remy, minux? |
Some more output from this gccgo build if that helps: $ gccgo -m32 -print-file-name=libgo.so /opt/gccgo/lib/gcc/x86_64-redhat-linux/4.8.0/../../../../lib/libgo.so $ gccgo -m64 -print-file-name=libgo.so /opt/gccgo/lib/gcc/x86_64-redhat-linux/4.8.0/../../../../lib64/libgo.so $ gccgo -print-search-dirs install: /opt/gccgo/lib/gcc/x86_64-redhat-linux/4.8.0/ programs: =/opt/gccgo/libexec/gcc/x86_64-redhat-linux/4.8.0/:/opt/gccgo/libexec/gcc/x86_64-redhat-linux/4.8.0/:/opt/gccgo/libexec/gcc/x86_64-redhat-linux/:/opt/gccgo/lib/gcc/x86_64-redhat-linux/4.8.0/:/opt/gccgo/lib/gcc/x86_64-redhat-linux/:/opt/gccgo/lib/gcc/x86_64-redhat-linux/4.8.0/../../../../x86_64-redhat-linux/bin/x86_64-redhat-linux/4.8.0/:/opt/gccgo/lib/gcc/x86_64-redhat-linux/4.8.0/../../../../x86_64-redhat-linux/bin/ libraries: =/opt/gccgo/lib/gcc/x86_64-redhat-linux/4.8.0/:/opt/gccgo/lib/gcc/x86_64-redhat-linux/4.8.0/../../../../x86_64-redhat-linux/lib/x86_64-redhat-linux/4.8.0/:/opt/gccgo/lib/gcc/x86_64-redhat-linux/4.8.0/../../../../x86_64-redhat-linux/lib/../lib64/:/opt/gccgo/lib/gcc/x86_64-redhat-linux/4.8.0/../../../x86_64-redhat-linux/4.8.0/:/opt/gccgo/lib/gcc/x86_64-redhat-linux/4.8.0/../../../../lib64/:/lib/x86_64-redhat-linux/4.8.0/:/lib/../lib64/:/usr/lib/x86_64-redhat-linux/4.8.0/:/usr/lib/../lib64/:/opt/gccgo/lib/gcc/x86_64-redhat-linux/4.8.0/../../../../x86_64-redhat-linux/lib/:/opt/gccgo/lib/gcc/x86_64-redhat-linux/4.8.0/../../../:/lib/:/usr/lib/ |
FWIW, here's a look into the contents of the current Fedora gcc go packages for 4.7.0: gcc-go: http://koji.fedoraproject.org/koji/rpminfo?rpmID=2985972 libgo: http://koji.fedoraproject.org/koji/rpminfo?rpmID=2985997 libgo-devel: http://koji.fedoraproject.org/koji/rpminfo?rpmID=2985974 |
I also have the usual Go tree installed, but it's not clear how it's supposed to interact with building with gccgo. Does gccgo need GOROOT to be set at all? When building with -compiler=gccgo, can't GOROOT be ignored entirely? It doesn't really make sense to try to rebuild "std" packages if they're missing, since gccgo will usually be installed to a read-only system location. This is probably also true for when the [568]g distribution gets installed to a system location. A missing "std" package in this case should just be an error. |
Labels changed: added priority-go1, gccgo, toolbug, removed priority-triage. Owner changed to @ianlancetaylor. |
There's another issue here. The following mostly works if you have a GOROOT to appease the go tool to the point that it builds with gccgo: go test -compiler=gccgo -gccgoflags --coverage -v -work ./... but with benchmarks added, there's some errors: go test -compiler=gccgo -gccgoflags --coverage -v -work -test.bench=. ./... E.g., with my experiment of building parts of the 6g standard library with gccgo, I see stuff like: === RUN TestReader-16 --- PASS: TestReader-16 (0.00 seconds) === RUN TestPartialRead-16 --- PASS: TestPartialRead-16 (0.00 seconds) === RUN TestIncrementalRead-16 --- PASS: TestIncrementalRead-16 (0.00 seconds) === RUN TestNonSeekable-16 --- PASS: TestNonSeekable-16 (0.00 seconds) === RUN TestWriter-16 --- PASS: TestWriter-16 (0.82 seconds) PASS ok std/archive/tar 0.833s # testmain gccgo: error: : No such file or directory FAIL std/archive/zip [build failed] # testmain gccgo: error: : No such file or directory gccgo: error: $WORK/std/archive/zip/_test/zip.test: No such file or directory gccgo: error: : No such file or directory FAIL std/bufio [build failed] Also, it doesn't seem as if the "building out-of-date packages" warning is displayed more than once, although I think it should. |
I've tried including a fix in CL http://golang.org/cl/5797046/ |
Can't compile latest go.crypto or goprotobuf. https://groups.google.com/d/msg/golang-dev/CDWldKSFOeg/kJzfLhklV8IJ https://groups.google.com/d/msg/golang-dev/ODBBMvFuEOE/pa0gMD72E2sJ |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: