Getting a Go executable(hugo) to run Intel Galileo/Quark

85 views Asked by At

I'm trying to get hugo to work on my Alpine distro that's running on my Intel gallileo(Quark CPU).

I've overcome a few hurdles already.

This CPU Doesn't have MMX so gcc-go was needed to compile hugo into a binary (in a virtual machine)

But after copying the hugo binary to the galileo Hugo doesn't work. I get the following error:

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x44 pc=0xb7658e62]

goroutine 1 [running]:
runtime.dopanic_m
    :0
runtime.throw
    :0
runtime.sigpanic
    :0
runtime.sigtrampgo
    :0
runtime.sigtramp
    :0

    :0

goroutine 4 [select]:
go.x2eopencensus.x2eio..z2fstats..z2fview.worker.start
    /root/go/pkg/mod/[email protected]/stats/view/worker.go:154
created by go.x2eopencensus.x2eio..z2fstats..z2fview.go.x2eopencensus.x2eio..z2fstats..z2fview..init0
    /root/go/pkg/mod/[email protected]/stats/view/worker.go:32 +0x17a

This could be:

  1. Quark has 256MB of ram, The executable is 127MB, perhaps there simply isn't enough memory?
  2. Quark has a well known bug. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=738575%22 that means it mishandles LOCK instructions and causes a segfault.

On a normal C toolchain, the assembler can strip the LOCK operation using "-Xassembler '-momit-lock-prefix=yes'" CFLAG (Galileo is single core so it's not needed)

However I'm not sure what the equivalent would be on a go build toolchain, perhaps it's simply not possible?

The compiled binary works perfectly in the virtual machine.

0

There are 0 answers