News for hackers. Stuff that matters.
Re:Prometheus on Raspberry Pi by laumars on Tuesday February 10, 2015 @10:57AM (#9027913)
> "Cross-compiling this for Raspberry Pi is a pain. ARM != ARM, there are several variants and when I tried to cross-compiling Prometheus with CGO, it just lead to segfaults or invalid instructions."

I'm pretty sure I had similar issues on the original model B and found I was missing specifying which ARM version it was:

    export GOARCH="arm"
    export GOARM="5"
I don't know if the same is required for the Raspberry Pi 2 nor even which ARM chipset version it is (the same I'm going to assume since Raspbian / Arch / etc still run) but it might be worth checking you have your GOARM environmental variable set
Re:Prometheus on Raspberry Pi by simcop2387 on Tuesday February 10, 2015 @11:53AM (#9028309)
The PI2 should be much easier to get going with this since it's finally updated to ARMv7 and can actually run normal distros along with raspbian. I don't know what other extensions it has but i'd hope it'll work out of the box there.
Re:Prometheus on Raspberry Pi by discordianfish on Tuesday February 10, 2015 @02:20PM (#9029263)
Just for completeness, my answer to the same Q on the blog: ---

his doesn't solve cross compilation CGO. For that, you need the gcc cross compiler for the raspberry pi. I've tried to build it with CGO enabled like this:

CC=arm-linux-gnueabihf-gcc GOARCH=arm CGO_ENABLED=1 go build -ldflags="-extld=$CC"

But the binary still segfaulted on the raspberry pi. I also tried the cc from https://github.com/raspberrypi... but with the same result.

Re:Prometheus on Raspberry Pi by laumars on Tuesday February 10, 2015 @05:17PM (#9030288)
Ah ok. Shame.

Thanks for the update though :)