hypriot / golang-armbuilds

Pre-compiled GOLANG tarballs for ARM devices.
MIT License
69 stars 12 forks source link

Go 1.4.3 / Arm V6 - Segfault #4

Closed nsteinmetz closed 8 years ago

nsteinmetz commented 8 years ago

Hi,

What I did on my RPI1:

pi@raspberrypi:~ $ wget https://github.com/hypriot/golang-armbuilds/releases/download/v1.4.3/go1.4.3.linux-armv6.tar.gz
pi@raspberrypi:~ $ tar xzf go1.4.3.linux-armv6.tar.gz 
pi@raspberrypi:~ $ sudo tar xzf go1.4.3.linux-armv6.tar.gz -C /usr/local/
pi@raspberrypi:~ $ export PATH=/usr/local/go/bin:$PATH
pi@raspberrypi:~ $ go version
go version go1.4.3 linux/arm
pi@raspberrypi:~ $ mkdir go-build
pi@raspberrypi:~ $ export GOPATH="/home/pi/go-build"
pi@raspberrypi:~ $ go get github.com/tools/godep
go build github.com/tools/godep/Godeps/_workspace/src/github.com/kr/fs: /usr/local/go/pkg/tool/linux_arm/5g: signal: segmentation fault
go build github.com/tools/godep/Godeps/_workspace/src/github.com/kr/text: /usr/local/go/pkg/tool/linux_arm/5g: signal: segmentation fault
go build github.com/tools/godep/Godeps/_workspace/src/github.com/pmezard/go-difflib/difflib: /usr/local/go/pkg/tool/linux_arm/5g: signal: segmentation fault
go build github.com/tools/godep/Godeps/_workspace/src/golang.org/x/tools/go/vcs: /usr/local/go/pkg/tool/linux_arm/5g: signal: segmentation fault

Will try to see if I have the same result with go 1.4.3 installed via gvm.

nsteinmetz commented 8 years ago

It works with gvm:

pi@raspberrypi:~ $ gvm install go1.4.3
Downloading Go source...
Installing go1.4.3...
 * Compiling...
go1.4.3 successfully installed!
pi@raspberrypi:~ $ gvm use go1.4.3 --default
Now using version go1.4.3
pi@raspberrypi:~ $ gvm pkgset create influxdb
pi@raspberrypi:~ $ gvm pkgset use influxdb
Now using version go1.4.3@influxdb
pi@raspberrypi:~ $ go get github.com/tools/godep
pi@raspberrypi:~ $
DieterReuter commented 8 years ago

@nsteinmetz thanks for this report. I have to check it once again in detail. It was compiled on ARMv7 and maybe I missed something. Maybe I have to change the build step, and have to compile it within an ARMv6 Docker container - just to make sure, that all OS and gcc libraries are truly ARMv6.

With gvm you compiled it directly on your RPi1 on an ARMv6 environment.

nsteinmetz commented 8 years ago

I know that I compiled locally with gvm, I was trying to use your prebuild binary version to skip this long step ;-)

Comparison was just to check that is was not a raspberry issue.

Let me know if you need me to run some test once you update your building chain (or if you want me to build it on my rpi.)

DieterReuter commented 8 years ago

Not a problem, I do have some Pi's here. So I can run the tests locally and pretty fast too.

DieterReuter commented 8 years ago

Maybe I'll try to build Go with some extra gcc flags -march=armv6 - just a first idea now. More details on gcc options for ARM can be found here https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html.

DieterReuter commented 8 years ago

In the meantime I just did ran a complete ARMv6 build natively on a Raspberry Pi 1 board, but without the tests. This resolves the issues on ARMv6 for now and everybody can use the pre-compiled binary tarballs.