I have an issue with trying to compile open source sensu-go backend from github repo GitHub - sensu/sensu-go: Simple. Scalable. Multi-cloud monitoring.
- What have you already tried? Please include links to gists and/or code blocks (if relatively small)
I have run the following commands based on the documentation to install sensu backend on Centos7 but the build fails to compile. I followed the steps as per sensu-go/README.md at v6.4.0 · sensu/sensu-go · GitHub with the exception of go version being higher due to issue mentioned in Documentation: incorrect Go version requirements · Issue #4400 · sensu/sensu-go · GitHub
- Tell us about your setup, this should include OS, version of Sensu, version of Sensu components plugin versions (if applicable), anything special about your setup such as an airgapped network or strict ACLs
$ wget https://dl.google.com/go/go1.16.2.linux-amd64.tar.gz $ tar -C /usr/local -xzf go1.16.2.linux-amd64.tar.gz $ echo "export PATH=\$PATH:/usr/local/go/bin:/usr/local/bin" >> /root/.bashrc $ source /root/.bashrc
$ cd sensu-go/ $ git branch * (detached from v6.4.0) main $ go build -o /usr/local/bin/sensu-backend ./cmd/sensu-backend # runtime/internal/atomic /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:18:6: Load redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:16:24 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:24:6: Loadp redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:22:32 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:30:6: Load64 redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:28:26 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:36:6: LoadAcq redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:34:27 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:41:6: Xadd redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:51:37 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:44:6: Xadd64 redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:54:39 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:47:6: Xadduintptr redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:57:47 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:50:6: Xchg redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:60:36 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:53:6: Xchg64 redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:63:38 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:56:6: Xchguintptr redeclared in this block previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:66:45 /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:56:6: too many errors
$ go version go version go1.16.2 linux/amd64 $ more /etc/os-release NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"
- Is there a Github issue related to your issue?
There is a similar documentation issue but the user mentions that the specific version of go worked which does not seem to work here. Documentation: incorrect Go version requirements · Issue #4400 · sensu/sensu-go · GitHub
- Is there anything else that can help us effectively help you?
I have tried multiple version of sensu-backend including 6.5.0 but none of them compile.
- use the Discourse upload button to attach Sensu relevant yaml or json configuration files.