QubitProducts / exporter_exporter

A reverse proxy designed for Prometheus exporters
Apache License 2.0
345 stars 55 forks source link

build problems on ubuntu 20 LTS #96

Closed uwebartels closed 1 year ago

uwebartels commented 1 year ago

Hi,

trying to install this via go fails.

$ go get github.com/QubitProducts/exporter_exporter
# github.com/prometheus/procfs/internal/util
go/src/github.com/prometheus/procfs/internal/util/parse.go:84:15: undefined: os.ReadFile
go/src/github.com/prometheus/procfs/internal/util/parse.go:93:15: undefined: os.ReadFile
go/src/github.com/prometheus/procfs/internal/util/readfile.go:36:9: undefined: io.ReadAll
# github.com/prometheus/common/expfmt
go/src/github.com/prometheus/common/expfmt/text_create.go:46:27: undefined: io.Discard
# golang.org/x/sys/unix
go/src/golang.org/x/sys/unix/mremap.go:42:10: undefined: unsafe.Slice
go/src/golang.org/x/sys/unix/syscall.go:83:16: undefined: unsafe.Slice
go/src/golang.org/x/sys/unix/syscall_linux.go:1018:20: undefined: unsafe.Slice
go/src/golang.org/x/sys/unix/syscall_linux.go:2300:9: undefined: unsafe.Slice
go/src/golang.org/x/sys/unix/syscall_unix.go:118:7: undefined: unsafe.Slice
go/src/golang.org/x/sys/unix/sysvshm_unix.go:33:7: undefined: unsafe.Slice

Ubuntu 20 comes with go version: go version go1.13.8 linux/amd64 Any idea?

trying to install the binary complains about missing glibc libraries. I saw another thread on this. So no need to discuss this here. Just want to show, that I tried.

Best... Uwe

tcolgate commented 1 year ago

1.13 is considerably out of date. You'll need at least 1.17 for unsafe.Slice, and I'd recommend going straight with 1.21