Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
cmd/go: TestCgoConsistentResults fails on s390x with gcc 6 #16780
Comments
|
The difference in the files is because the build path is ending up in the symbol table of the _all.o files:
(confirmed by diffing xxd output that this is the only difference). Probably a gcc issue? Paging @ianlancetaylor |
|
That was supposed to have been fixed by the change to cmd/link in https://golang.org/cl/19363. I don't know why there would be anything s390x specific here. Can you show the diff with readelf -s --wide? (Always use --wide with readelf, I consider the fact that --wide is not the default to be a bug in readelf.) |
|
Heh, I have readelf aliased to readelf --wide locally, which means I tend to forget it on remote machines...
I agree it's deeply odd that this only happens on s390x (and only with gcc 6). It could be a problem in the set up of the gcc-6 package in Ubuntu I guess. |
|
So the CL @ianlancetaylor referenced has a hint to what is going on here:
What has changed between gcc-5 and gcc-6 (and apparently only on s390x) is that gcc no longer adds a file symbol when compiling a file:
I don't know if this counts as a gcc bug or something we should be trying to work around or what. I'll ask doko I guess. |
|
It's because the function |
|
This has now been fixed in gcc tip, nothing to do in Go, so closing. |
mwhudson commentedAug 17, 2016
Please answer these questions before submitting your issue. Thanks!
go version)?go version devel +17eee31 Wed Aug 17 23:28:20 2016 +0000 linux/s390x
but it happens with 1.7 too (see https://launchpadlibrarian.net/279519590/buildlog_ubuntu-yakkety-s390x.golang-1.7_1.7-2ubuntu1_BUILDING.txt.gz)
go env)?Ubuntu 16.10, s390x
go test cmd/go -run TestCgoConsistentResults
ok cmd/go 2.538s
It passes if I set CC=gcc-5.