-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: "internal compiler error: weird decoding" on Raspberry Pi with Go 1.11 #27228
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 @randall77 |
Bootstrap with Go 1.10 works at least (on Raspberry Pi Model B Plus Rev 1.2, also on Raspbian Stretch), up until I run out of memory:
|
@mooneyr, can you post the full output, starting with Which Go 1.4 are you using? |
/cc @griesemer too for the "weird decoding" importer error. |
This looks like the new binary importer is failing (maybe for the utf8 package?) because the file is corrupted. |
Never discount that Raspberry Pis eat most SD cards for breakfast. |
@bradfitz complete output follows: Please file a bug report including a short program that triggers the error. Please file a bug report including a short program that triggers the error. |
Fair enough. I'm just scarred from many destroyed SD cards over the years. Where did you get your Go 1.4.1? Did you build it from source on the same Raspberry Pi? Or was it a binary download from somewhere? |
I honestly can't remember how I came by it, it was that long ago. All the versions I have on the separate raspberries are the same source though. Guess I can try compiling 1.4 again and try that version to bootstrap 1.11. |
I've recompiled go1.10 using my existing go1.4 to bootstrap, it works. |
I can not reproduce this issue with maybe you can try adding a USB disk as a SWAP partition? Here is my log
|
Per the comments above, this is about using Go 1.4 as the bootstrap. |
Same issue here. |
@Akito13, can you confirm the details of your environment so we know what "same issue" means? |
"Same issue" means "same issue". Same versions, same process, same hardware, everything the same. My case is a twin of this. |
I also tried to compile Go on Raspberry Pi running Raspbian. I, however, am not using an SD card. I've moved my files to a HDD and increased my swap file to 2048. Here are the commands I used to obtain, download, and install Go.
My output would look like the output listed on Sept 3 by @benshi001. |
I solved it by changing to my computer and compiling the go1.4 bootstrapper, then compiling the newest go1.11.2 and then compiling go1.11.2 on my target Raspberry Pi with the go1.11.2 I compiled earlier on the machine. Now go works flawlessly. |
Ok, so just to be sure I understand what you are saying.
You basically used a non-RPi computer to cross-compile Go for use on the RPi.
That’s a good idea. I’ll give it a try.
…________________________________
From: Akito13 <[email protected]>
Sent: Tuesday, November 20, 2018 6:53 AM
To: golang/go
Cc: Jim; Comment
Subject: Re: [golang/go] cmd/compile: "internal compiler error: weird decoding" on Raspberry Pi with Go 1.11 (#27228)
I solved it by changing to my computer and compiling the go1.4 bootstrapper, then compiling the newest go1.11.2 and then compiling go1.11.2 on my target Raspberry Pi with the go1.11.2 I compiled earlier on the machine. Now go works flawlessly.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#27228 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/APLcyF3THDluIboGpVdagz2NN4zp9VK7ks5uw_tWgaJpZM4WMmyp>.
|
Yes. I followed the official Go instructions on its website, except I compiled go1.11.2 with go1.4 on my computer and then put the compiled go1.11.2 on my Raspi so I can compile the additional go1.11.2 for my Raspi. It's important to note that I used the go1.11.2 from the computer only as the bootstrapper for the actual go1.11.2 on my Raspi. So you have to set the DEBOOTSTRAP PATH correctly to the go1.11.2 from the computer on your Raspi. Hope it will work for you. |
@Akito13 When you were compiling Go on your computer, did you get a lot of errors during the testing phase similar to:
|
I compiled it within the Linux Subsystem for Windows. I would never let Windows touch my sources. |
It sounds like there might be a bug in the Go 1.4 compiler that causes it to miscompile the Go 1.11 source code on arm. Those of you who can reproduce this reliably, would you mind trying building Go 1.10 or Go 1.9 from source, using Go 1.4 as your bootstrap compiler? Thanks! |
@pavulon18 I used these intructions to make it work. Reading this document again, I remember now that I cross-compiled it the way it shows there. I did not mention that, because by the time I answered you the first time, I did not remember what I actually did when I made it work after all. |
@Akito13 |
Did it GO well? |
@Akito13 no. I got a segmentation fault.
|
@pavulon18 So I freshly compiled the bootstrapper for the Raspi again. I uploaded it here.
|
I made a Github Repository for the readily made bootstrapper, so everyone in need can take advantage of this workaround. |
Thank you. That seems to have worked. |
Well, I'm glad. Hope it will keep working. |
It worked perfect, thank you! |
Repeating my comment from above:
In the meantime, I'll mark this as WaitingForInfo and bump to 1.14. |
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
… On 3 May 2019, at 11:45 am, Josh Bleecher Snyder ***@***.***> wrote:
Repeating my comment from above:
It sounds like there might be a bug in the Go 1.4 compiler that causes it to miscompile the Go 1.11 source code on arm.
Those of you who can reproduce this reliably, would you mind trying building Go 1.10 or Go 1.9 from source, using Go 1.4 as your bootstrap compiler? Thanks!
In the meantime, I'll mark this as WaitingForInfo and bump to 1.14.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
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 |
I cannot reproduce it on the linux-arm gomote machine, with Go 1.4 from the tip of release-branch.go1.4 as the bootstrap compiler, to build Go 1.11 from the tip of release-branch.go1.11, or to build tip. The build works fine. Which exact version of Go 1.4 and Go 1.11 are you using? Could you try the tip of release-branch.go1.4 and release-branch.go1.11? Thanks. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
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?
The text was updated successfully, but these errors were encountered: