Open SuperQ opened 5 years ago
Oh interesting.
Nice, any progress on this one? Would love to have this on Xigmanas (FreeBSD based)
FYI, I made a fork and tried to build with CircleCI for freebsd/amd64.
If I add freebsd/amd64 in either .promu.yml
or .promu-cgo.yml
, I receive the following build error:
...
go: downloading golang.org/x/text v0.3.2
# runtime/cgo
gcc_freebsd_amd64.c:7:10: fatal error: sys/signalvar.h: No such file or directory
#include <sys/signalvar.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
!! command failed: build -o .build/freebsd-amd64/node_exporter -ldflags -X github.com/prometheus/common/version.Version=1.0.1 -X github.com/prometheus/common/version.Revision=e3e1945cb79a488c927f107a485ae535f24df222 -X github.com/prometheus/common/version.Branch=master -X github.com/prometheus/common/version.BuildUser=root@3820b9eb4f51 -X github.com/prometheus/common/version.BuildDate=20200901-21:16:57 -extldflags '-static' -a -tags 'netgo static_build' github.com/prometheus/node_exporter: exit status 2
make: *** [Makefile.common:227: common-build] Error 1
!! The base builder docker image exited unexpectedly: exit status 2
Exited with code exit status 1
Any news on this? Just wondering what my options are.
I think nobody in the prometheus team does much with freebsd, let alone has a vested interested (aka getting paid for). So if people want to see that happen, best option is to submit a PR to add support for that. We will certainly try to help were possible.
Options are:
The ports version is a bit out of date and if I get an error while building from source, like the one above, I'm not sure how to solve it. Though this particular one looks like dependency issue. Between those two options maybe I can figure something out. Thank you.
This particular error listed here, is trying to cross-build on linux. linux doesn't have the same C header files nor appropriate build environment, so things like CircleCI and Travis are out.
You need to build on a FreeBSD host directly (unless you can finagle a linux->FreeBSD cross-build environment, which I would not suggest without good familiarity with the matter).
Options are:
- use the node_exporter in FreeBSD ports/packages
- build a binary yourself (it's pretty easy, but you need gmake installed)
Hello! How to build a node_ exporter 1.4.0 in freebsd10 .
FreeBSD 10.x was end-of-life'd in 2017.
For my money, I'd spin up a 10.x vm (match your version), and get a new copy of the ports tree.
Use ALLOW_UNSUPPORTED_SYSTEM=true
in your make.conf
.
Also, the new ports tree depends on a flag in /bin/sh
that doesn't exist in 10.x, so grab /rescue/sh
from 12.3 and overwrite your /bin/sh
in the vm.
Do a make package
in the new ports tree.
Cross your fingers.
Install freshly minted package on target machine.
Any progress on this? I tried to compile it myself but encountered a lot of problems, I hope to release the binaries。Greatful!
No, someone needs to fix all the issues you encountered first. Or pay someone to do so.
We closed https://github.com/prometheus/node_exporter/issues/293 as "good enough", but I would like to consider this again. We now have BuildKite to do FreeBSD native builds.
To improve on the BuildKite config, we should add the pipelines to the repo based on the BuildKite Docs.
Then we can add a release upload step like we have in CircleCI.
/cc @derekmarcotte