-
Notifications
You must be signed in to change notification settings - Fork 18.1k
runtime: SIGILL in runtime.asmcgocall #18748
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
Note: gofmt runs fine, godoc also gets a SIGILL |
Possibly related: #18694. cc @minux @cherrymui |
I can confirm that, on my Raspberry Pi 1. I wonder whether the release binary is really compiled to ARMv6, especially the C part (since gofmt runs ok, which is a pure Go binary). |
@cherrymui, can you inspect the binaries from the download URL and check? Otherwise, you can see how they're built in x/build/cmd/release /cc @broady |
@bradfitz, yes, I just tried the binary from https://storage.googleapis.com/golang/go1.8rc2.linux-armv6l.tar.gz, got SIGILL on the go binary and godoc, while gofmt is ok. SIGILL happened in |
It seems cmd/release just runs all.bash on the linux-arm builder, and I didn't see anywhere in the build procedure it sets gcc flags. So I assume it just builds for its native architecture, which is ARMv7. |
Which gcc flags should be set? And by what, ... should cmd/go do it? |
I wonder setting GOARM=6 should imply setting gcc flags -march=armv6, maybe by cmd/go? |
Perhaps we could just add these two environment variable before running
make.bash?
CGO_CFLAGS="-march=armv6"
CGO_LDFLAGS="-march=armv6"
If it helps, let's not change cmd/go this late, as I'd like to figure out a
complete story for ISA variants in Go 1.9.
|
@minux, SGTM. Could you send a CL? |
@minux SGTM, if it works. |
I send CL https://go-review.googlesource.com/c/35501/. It works on my raspberry pi. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.8rc2:
Illegal instruction
1.7.4:
go version go1.7.4 linux/arm
What operating system and processor architecture are you using (
go env
)?output above from 1.7.4, 1.8rc2 just gets a SIGILL
What did you do?
Install go binary from https://storage.googleapis.com/golang/go1.8rc2.linux-armv6l.tar.gz on a Raspberry Pi 1 w/ raspbian, upgraded to latest userland.
What did you expect to see?
The go version output
What did you see instead?
go binary getting a SIGILL
The text was updated successfully, but these errors were encountered: