-
Notifications
You must be signed in to change notification settings - Fork 18.1k
misc/cgo/testshared: TestCgoExecutable fails on linux/arm (Raspberry Pi 2) #15696
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
CC @crawshaw |
Can you put the |
Of course. I hope it can wait until Saturday, where I can access the Pi2 again. |
Here is the execgo executable from the TestCgoExecutable test, as well as the libruntime,sync-atomic.so it is linked against. Both files were created by running "go test" in the misc/cgo/testshared directory, with the os.Remove calls commented out. |
TestCgoExecutable completes successfully on go 1.6.2, so this is a regression (at least on this machine. I'm still not sure why the test doesn't fail on the builders). Consider bumping its milestone to Go1.7. The test failure is completely reproducible for me, so here's what git bisect had to say:
The offending CL 21396 seems plausible. |
That binary is full of COPY relocations:
This was fixed on the linux/arm builders by switching to the gold linker in 3c8d6af. Is your toolchain using gold for external linking? (Compiling with -ldflags=-v may give this away.) |
I see. On my system,
I'm running a fairly old rasbian version (based on wheezy) so that explains why it's not using the gold linker. It doesn't even seem to be supported:
I guess the issue is why building with the |
Yes, I was hoping that |
CL https://golang.org/cl/23400 mentions this issue. |
Thanks! |
Huh bizarre, because -fuse-ld=gold without gold does fail sometimes:
(from building tip on arm64 ubuntu 14.04, https://launchpadlibrarian.net/259960116/buildlog_ubuntu-trusty-arm64.golang-tip_201605162130.1b86862~ppa1~ubuntu14.04.1_BUILDING.txt.gz) |
CL 23400 introduced a check to make sure the gold linker is used on ARM host links. The check itself works, but the error checking logic was reversed; fix it. I manually verified that the check now correctly rejects host links on my RPi2 running an ancient rasbian without the gold linker installed. Updates #15696 Change-Id: I927832620f0a60e91a71fdedf8cbd2550247b666 Reviewed-on: https://go-review.googlesource.com/23421 Run-TryBot: Elias Naur <[email protected]> Reviewed-by: David Crawshaw <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Please answer these questions before submitting your issue. Thanks!
go version
)?go version devel +a101b85 Sun May 15 20:56:39 2016 +0000 linux/arm
go env
)?GOROOT_BOOTSTRAP=$HOME/go1.6 ./all.bash
All tests passed, just like the linux/arm builders on build.golang.org
The text was updated successfully, but these errors were encountered: