Hey, I just go get'ed the project a few mins ago and tried to install it. But I ran into an error. Full output below.
pi@NanoPi-M3:~/go/src/github.com/improbable-eng/thanos$ make
>> fetching goimports
>> fetching promu
>> fetching dep
>> dep ensure
>> formatting code
>> building binaries
> thanos
# github.com/improbable-eng/thanos/pkg/store
pkg/store/cache.go:100:23: constant 1000000000000 overflows int
!! command failed: build -o /home/pi/go/src/github.com/improbable-eng/thanos/thanos -ldflags -X github.com/improbable-eng/thanos/vendor/github.com/prometheus/common/version.Version=v0.0.1 -X github.com/improbable-eng/thanos/vendor/github.com/prometheus/common/version.Revision=64207e6985c210e75367e132f3fb40ed19226f47 -X github.com/improbable-eng/thanos/vendor/github.com/prometheus/common/version.Branch=master -X github.com/improbable-eng/thanos/vendor/github.com/prometheus/common/version.BuildUser=pi@NanoPi-M3 -X github.com/improbable-eng/thanos/vendor/github.com/prometheus/common/version.BuildDate=20180601-12:39:58 -extldflags '-static' -a -tags netgo github.com/improbable-eng/thanos/cmd/thanos: exit status 2
Makefile:21: recipe for target 'build' failed
make: *** [build] Error 1
Interesting. Thanks for letting us know.
What OS you have and what go version?
I am using Ubuntu 16.04.4 LTS on a NanoPi-M3 which is similar to a Raspberry Pi. Go version is go1.10.2 linux/arm.
32bit or 64bit?
anyway will fix this. We will use math.MaxInt or something instead this constant. This should fix your problem
I am not exactly sure what I have installed. System just says armv7l. But thanks for the upcoming fix!
Can you jump on this branch and run make build? https://github.com/improbable-eng/thanos/pull/367
Sorry for late response. It still fails with the same error:
pi@NanoPi-M3:~/go/src/github.com/improbable-eng/thanos$ make build
>> building binaries
> thanos
# github.com/improbable-eng/thanos/pkg/store
pkg/store/cache.go:102:22: constant 9223372036854775807 overflows int
!! command failed: build -o /home/pi/go/src/github.com/improbable-eng/thanos/thanos -ldflags -X github.com/improbable-eng/thanos/vendor/github.com/prometheus/common/version.Version=v0.0.1 -X github.com/improbable-eng/thanos/vendor/github.com/prometheus/common/version.Revision=ffb5b34238f243124364482e41d8fd1d1fedac67 -X github.com/improbable-eng/thanos/vendor/github.com/prometheus/common/version.Branch=maxInt -X github.com/improbable-eng/thanos/vendor/github.com/prometheus/common/version.BuildUser=pi@NanoPi-M3 -X github.com/improbable-eng/thanos/vendor/github.com/prometheus/common/version.BuildDate=20180601-22:35:29 -extldflags '-static' -a -tags netgo github.com/improbable-eng/thanos/cmd/thanos: exit status 2
Makefile:35: recipe for target 'build' failed
make: *** [build] Error 1
Ok. This is definitely something specific to your OS/HW (arm) can we have more insights what you installed? What kernel, uname -a etc? I am not familiar with running Go on something that exotic, but why not ((:
What exactly do you need?
$ uname -a
Linux NanoPi-M3 3.4.39-s5p6818 #2 SMP PREEMPT Tue Sep 12 11:39:51 HKT 2017 armv7l armv7l armv7l GNU/Linux
Board wiki:
http://wiki.friendlyarm.com/wiki/index.php/NanoPi_M3
Can try to fix this in future days. Basically instead of math.MaxInt64 we need int64(math.MaxInt64) to be able to compile on 32 bit system :eyes:
Yeah, I'd seen this before. You can test this easily like this:
$ GOARCH=386 make build
>> building binaries
> thanos
# github.com/improbable-eng/thanos/pkg/store
pkg/store/cache.go:100:23: constant 1000000000000 overflows int
(...)
ah, thanks @pharaujo will make it bit easier for me to test :+1:
Hey, any progress on this one?
Sorry, the change is pretty straightforward but there were other priorities ):
Overall, we can make Thanos supporting 32bit system but you need to be aware of all the implications. I talked with Prometheus community and Prometheus itself has mixed feeling about supporting 32 bit systems. Basically, for new TSDB library (that is used in Thanos as well) there seems to be strong limitations on how large TSDB block can be (1.5Gb). There might some other issues as well. They recommend Prometheus 1.8x for 32 bits, but Thanos is designed for 2.+ Prometheus.
Looks like your NanoPI3 has 64-bit CPU so just the kernel needs to be 64-bit as well (for example this: https://github.com/rafaello7/linux-nanopi-m3)
I would suggest, instead of waiting for my fix that most likely will not solve your issue (because of TSDB limitaitons for 32 bit systems), installing 64-bit kernel. What do you think?
Anyway will make thanos buildable on 32 bit - it is not that hard I guess. But full support is questionable.
Prometheus is running fine on it, but it doesn't collect that much data yet. I'll look into the 64 bit version. It was quite some work to install everything I needed on it and I hoped I don't have to do it again.
Considering what parts of thanos one could want to run on a Raspberry Pi (or other low end hardware) - would it make things easier to do a build with only the sidecar functionality for 32bit?
I would love to run a thanos sidecar on some sensor-node-raspberries, but the rest is on 64bit hardware anyway.
would it make things easier to do a build with only the sidecar functionality for 32bit?
Yup, but only if this would be done as a separate project, build separately. Currently, we build all components together.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Can try to fix this in future days. Basically instead of
math.MaxInt64we needint64(math.MaxInt64)to be able to compile on 32 bit system :eyes: