cmd/5a,5l: get illegal instruction error when running a cross-compiled go program on freescale i.mx28(armv5) #9795
Comments
Which version of Go? /cc @minux @davecheney |
I grabbed it today off https://code.google.com/p/go https://code.google.com/p/go ~/builds/go-stuff$ go version
|
Go no longer lives there. You were reading an 18 month old blog post. See https://golang.org/doc/install/source |
ahh..if only posts like that would be better updated to indicate they were out of date.
|
Blog posts get out of date, that is why I out ye version of Go that the Things have changed a bit and very time, I certainly couldn't have Please try with 1.4 and if you are still seeing he problem run the program Dave
|
with version go1.4.1, Program received signal SIGILL, Illegal instruction.
|
It looks like that binary is still compiled with hardware floating point You will have to rebuild your go cross compile environment cd go/src Then env GOARM=5 GOARCH=arm GOOS=linux go install your/package
|
that worked! thanks,
|
What has changed since Go 1.3 (from memory) is the decision to specialise a There has been some discussion on this, On Sat, Feb 7, 2015 at 11:03 AM, Tyler notifications@github.com wrote:
|
@tylerarnold Sorry to bump such an old thread, but I have not found much info on cross compiling Go binaries for this specific processor. (freescale i.mx28 armv5). Were you able to get programs to execute on this in the end? I get an illegal instruction error message when I compile using GOARM=5. If I use GOARM=6 I get a warning about how the hardware does not support floating point and I need to compile with GOARM=5. My program is a bare bones "Hello World". I'm hoping to run some Go binaries on a rooted Winkhub |
@icecreammatt this issue is long closed. I recommend taking your question to the golang-nuts mailing list. |
@davecheney will do, sorry for the inconvenience. |
on a ubuntu linux(3.16.2) machine, I downloaded go from source and built the cross-compilers according to:
http://dave.cheney.net/2013/07/09/an-introduction-to-cross-compilation-with-go-1-1
and built hello.go with GOARM=5, targeting the i.mx28 ( # cat /proc/cpuinfo
processor : 0
model name : ARM926EJ-S rev 5 (v5l)
Features : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant : 0x0
CPU part : 0x926
CPU revision : 5
Hardware : Freescale MXS (Device Tree)
Revision : 0000
Serial : 0000000000000000
)
running linux (3.16.2)
when I run the hello world binary on the target machine/i.mx, I get an "illegal instruction" error, and nothing in the kernel logs.
The text was updated successfully, but these errors were encountered: