go: cmd/compile: "internal compiler error: weird decoding" on Raspberry Pi with Go 1.11
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version
)?
1.11
Does this issue reproduce with the latest release?
this is the latest release
What operating system and processor architecture are you using (go env
)?
raspbian stretch - up to date kernel as of today ARM6 and ARM7 - Raspberry Pi B and Raspberry Pi 3B
What did you do?
ran ./all.bash
If possible, provide a recipe for reproducing the error.
Just try compiling the latest version on a Raspberry Pi Compiled using go1.4
What did you expect to see?
A compiled version of go1.11
What did you see instead?
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
/usr/local/go/src/bytes/buffer.go:280:7: internal compiler error: weird decoding: 254, true => 129
Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new
go tool dist: FAILED: /usr/local/go/pkg/tool/linux_arm/compile -std -pack -o /tmp/go-tool-dist-682140403/bytes/_go_.a -p bytes /usr/local/go/src/bytes/buffer.go /usr/local/go/src/bytes/bytes.go /usr/local/go/src/bytes/bytes_decl.go /usr/local/go/src/bytes/reader.go: exit status 2
xxx@xxx:/usr/local/go/src $ /usr/local/go/src/strings/builder.go:100:7: internal compiler error: weird decoding: 254, true => 129
Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new
can't create /tmp/go-tool-dist-682140403/hash/adler32/_go_.a: open /tmp/go-tool-dist-682140403/hash/adler32/_go_.a: no such file or directory
can't create /tmp/go-tool-dist-682140403/math/_go_.a: open /tmp/go-tool-dist-682140403/math/_go_.a: no such file or directory
can't create /tmp/go-tool-dist-682140403/hash/crc32/_go_.a: open /tmp/go-tool-dist-682140403/hash/crc32/_go_.a: no such file or directory
can't create /tmp/go-tool-dist-682140403/syscall/_go_.a: open /tmp/go-tool-dist-682140403/syscall/_go_.a: no such file or directory
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 37 (15 by maintainers)
Thanks, @mooneyr. I’ve moved this back to NeedsInvestigation.
It seems likely that there is a bug in Go 1.4 that the Go 1.11 (and later) source code brings out. We need to either fix that bug or declare that bootstrapping on arm requires a more recent toolchain (which would be sad but may be the most practical choice). If we opt for the latter, we should consider checking GOARCH and go version during bootstrap and printing a useful error message, rather than having things crash later.
cc @benshi001 @cherrymui because arm cc @ianlancetaylor @bradfitz because bootstrapping
I compiled both Go1.9 and Go1.10 on both original raspberry pi and raspberry pi3 using go1.4 as the bootstrap. The problem only occurred with go1.11. Using a higher go than 1.4 as the bootstrap solved the issue.
Regards, Rob
It worked perfect, thank you!
Well, I’m glad. Hope it will keep working.
@bradfitz - I think you may be experiencing https://github.com/golang/go/issues/26523.