Live data from Hacker News

Golang on ARM

github.com

11–20 of 71 posts

Re: Golang on ARM

#11
post #8
post #2

Maybe I'm in the minority but I would rather have resources devoted to improving compile times in 1.5+ versions vs. having golang work on arm. Isn't the best course usually to build a solid foundation, then branch out?

Really? I know 1.5 is slower than previous versions, but it's still by far the fastest compiler I've ever worked with.

In the global scheme of things it's still pretty fast, but builds on 1.5 take 2x the time of 1.4, it's pretty bad for existing golang users.

Re: Golang on ARM

#12
post #5

This is for both development on ARM systems (standard go commands, eg: go build, etc) and deploying to ARM systems (setting ARM as a compile target). That said, I'm genuinely curious why anyone would develop on an ARM-based system as opposed to your run of the mill desktop. I realize that standard towers may be supplanted by their SoC brethren, but so what? Will we all be using iMac-like computers as desktops in the…

I run a Go program on a Raspberry Pi device, and it's actually very convenient to be able to quickly edit a Go file, and test with `go run` directly on the machine.

Re: Golang on ARM

#13
post #2

Maybe I'm in the minority but I would rather have resources devoted to improving compile times in 1.5+ versions vs. having golang work on arm. Isn't the best course usually to build a solid foundation, then branch out?

Many of the contributions for the ports aren't from the Go team themselves, but from external contributors.

Also, work is in progress to improve build times, although I don't know if that's an active focus, rather than just something that's being fixed as time permits. A few improvements have already gone back to the current development gate for a variety of cases.

I think it's important to remember that development can be done in parallel, just because you see work being done on an area that isn't important to you doesn't mean that there isn't work being done on the area that's important to you as well. Some of these changes take a long time.

Re: Golang on ARM

#14
post #11
post #8

Earlier quoted context omitted.

Really? I know 1.5 is slower than previous versions, but it's still by far the fastest compiler I've ever worked with.

In the global scheme of things it's still pretty fast, but builds on 1.5 take 2x the time of 1.4, it's pretty bad for existing golang users.

Why is that a problem for you? With golint / gocode I never have any need for extremely fast compilation. What's your setup like that you're rebuilding so often?

Re: Golang on ARM

#15
post #2

Maybe I'm in the minority but I would rather have resources devoted to improving compile times in 1.5+ versions vs. having golang work on arm. Isn't the best course usually to build a solid foundation, then branch out?

> Isn't the best course usually to build a solid foundation, then branch out?

Yes, and I think that is what they are doing. First build something stable. Then target a lot of platforms. Then optimize the language itself and also the build times.

Re: Golang on ARM

#16
post #3

It's incredible to run buildall.sh on a recent go repo and see all the cross-compilers get built with no fuss or hassle. There are at least 30 different target platforms I can get to from my ubuntu box with a single command line. I'm not aware of anything that even comes close to tooling out cross compilation so easily.

It's called NetBSD.

build.sh cross compiles one codebase for 57(+)[0] architectures. Even for a "native" build, the tooling is the same abstraction that builds for a completely foreign target, so it's continuously well-exercised.

[0] http://www.netbsd.org/ports/

Re: Golang on ARM

#17
One of the funniest experiences I had was building an ARM go binary on an x86-64 linux box using a cross compiler (nothing new there). Then, by accident I tried to run the ARM binary on my x86-64 box, instead of on the ARM box. It ran like a normal executable, which confused me until I realized I had installed QEMU-arm, which installed a linux binary format handler for ARM binaries, and it emulated ARM to run my binary. Of course, copied over to the Raspi, it ran fine there too.

Re: Golang on ARM

#18
post #5

This is for both development on ARM systems (standard go commands, eg: go build, etc) and deploying to ARM systems (setting ARM as a compile target). That said, I'm genuinely curious why anyone would develop on an ARM-based system as opposed to your run of the mill desktop. I realize that standard towers may be supplanted by their SoC brethren, but so what? Will we all be using iMac-like computers as desktops in the…

I run a Go program on a Raspberry Pi device, and it's actually very convenient to be able to quickly edit a Go file, and test with `go run` directly on the machine.

I also run go on RPi, and compiled either there or on a qemu layer because the support for cgo cross-compilation for ARM was lacking. This was back in 1.3; It may be better now.

Re: Golang on ARM

#19
post #3

It's incredible to run buildall.sh on a recent go repo and see all the cross-compilers get built with no fuss or hassle. There are at least 30 different target platforms I can get to from my ubuntu box with a single command line. I'm not aware of anything that even comes close to tooling out cross compilation so easily.

I do nightly binaries for Prometheus in all the possible archs, while things should compile perfectly there can be small things that prevent things from cross-compiling.

darwin/arm, darwin/arm64, plan9/386, plan9/amd64 and solaris/amd64 don't compile for any of the 11 binaries (e.g. plan9 doesn't work due to logrus not having support for it).

This leaves me with the list at http://www.robustperception.io/prometheus-nightly-binaries/ That's still 20 architectures I can compile almost everything to automatically with an ansible+jenkins setup.

Re: Golang on ARM

#20
post #3

It's incredible to run buildall.sh on a recent go repo and see all the cross-compilers get built with no fuss or hassle. There are at least 30 different target platforms I can get to from my ubuntu box with a single command line. I'm not aware of anything that even comes close to tooling out cross compilation so easily.

[deleted]
Post reply on HN