Segmentation Fault when porting GO binary

I’m a GO newbie and just finished my first project. Its developed on an debian 8 amd64 machine. Running “go build project” creates the binary as it should. The binary runs fine on the machine it was developed on. Since I’m still in the learning phase I copied the binary to another debian 8 amd64 machine but when I run it I only get “Segmentation Fault”. I also did a build for windows which runs ok on a windows 10 machine.

I also tried with “env GOOS=linux GOARCH=amd64 go build project” but I get the same results.

Developing machine
root@laptop-acer:~# uname -m
x86_64
root@laptop-acer:~# uname -a
Linux laptop-acer 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux

Second Debian machine
root@server:~# uname -m
x86_64
root@server:~# uname -a
Linux server 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux

I get the same “Segmentation Fault” on a CentOS machine
[root@ns536702 ~]# uname -m
x86_64
[root@ns536702 ~]# uname -a
Linux hostname hidden 3.14.32-xxxx-grs-ipv6-64 #9 SMP Thu Oct 20 14:53:52 CEST 2016 x86_64 x86_64 x86_64 GNU/Linux

I have the feeling that I’m missing something since I also couldn’t find information on this error on google.

Has anybody encountered this issue or knows a solution ?

Only thing I can think of, that could cause something like this is a dynamically linked library that is not available on the other systems or has an incompatible version.

Please compare the output of ldd $your_binary on the three systems.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.