I have a GO program and I want to give its binary to a customer for running on RaspberryPi 3. I am cross compiling the GO program on OS X by setting GOARM=7
and GOOS=linux
in the environment as per the instructions at https://github.com/golang/go/wiki/GoArm. However, the binary could not be run on RPi3. It fails with this error.
cannot execute binary file: Exec format error
I am pretty sure there might be issue in cross-compilation but it's clear what is the issue. Any help is appreciated.