Topics

Error running GO-lang executable on target device

salman.isd@...
 

I am trying to run the yocto go example on my arm target device. This is the receipe I am using https://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
I made one change to the recipe. I added GO_LINKSHARED="" which removes the runtime dependecy of the package on "go-runtime".
I have used both go 1.12 and go 1.14

The package is built correctly. I transfer and try to run on the device but this error.
./go-helloworld 
-sh: ./go-helloworld: No such file or directory

Running file on the binary shows
file go-helloworld 
go-helloworld: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, BuildID[sha1]=b5d8fa526402b35c3233f7ce3e578eb9596d9de8, for GNU/Linux 3.2.0, stripped

There is no ld-linux.so.3 on my device, only ld-linux-armhf.so.3. So I creade a symlink like shown
ld-linux.so.3 -> ld-linux-armhf.so.3

Tried to run my binary again and this time it segfaults.

Does anyone have an idea what might be going on? All my C programs built with yocto refer to the correct ld-linux-armhf.so.3 and run fine.Do I need to install some other go-related stuff before running my program?