I'm building on linux amd64 system and want to execute the go binary on 
mips arch.

Go1.8

The binary is successfully compiled, but when I execute it on my specific 
architecture (mips), I got an illegal instruction.

The file information I provided is about the go binary compiled.

It's a hello world in go --> https://gobyexample.com/hello-world

I was able to run helloworld for mips but I had to build an image based on 
eglibc (glibc), instead of uClibc (based on this tutorial: 
http://akagi201.org/post/golang-on-openwrt/) 
I would like to be able to run without changing the base image.

Harmen, I build it with capitals like you said (only typed with lowercase 
here).

On Thursday, June 22, 2017 at 3:32:27 PM UTC-3, Nathan Kerr wrote:
>
> What system are you building on (OS and architecture)?
>
> What version of Go are you using?
>
> Is the result of running go build an illegal instruction?
>
> What file did you provide information for?
>
> What is in hello.go?
>
> On Thursday, June 22, 2017 at 6:19:47 PM UTC+2, luc...@kryptus.com wrote:
>>
>> I try to build a simple hello world with
>> cgo_enabled=1 goarch=mips goos=linux go build hello.go    | Result: 
>> illegal instruction 
>>
>> file information: ELF 32-bit MSB executable, MIPS, MIPS32 version 1 
>> (SYSV), statically linked, not stripped
>>
>> Also, tried to build with another compile (CC=/path/to/Compiler) instead 
>> the one go uses. Also illegal instruction 
>> on my router tp-linkwdr3500.
>>
>> If anyone could give me a hint, I would be grateful.
>>
>> Thanks,
>> Lucas.
>>
>>
>> On Thursday, June 22, 2017 at 11:37:08 AM UTC-3, Ian Lance Taylor wrote:
>>>
>>> On Wed, Jun 21, 2017 at 7:48 PM, lucas.w...@gmail.com 
>>> <luc...@kryptus.com> wrote: 
>>> > 
>>> > Since go1.8 added support for mips32, why can't build a simple hello 
>>> world 
>>> > for a mips architecture system? 
>>> > 
>>> > I successfully build programs for arm architecture, but could not do 
>>> the 
>>> > same for mips. 
>>>
>>> Tell us precisely what you did and precisely what happened. 
>>>
>>> Ian 
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to