Telegraf on MacOS: make succeeds, but run fails with "killed: 9"

telegraf
#1

I’m trying to build telegraf locally on a Mac to create a new plugin. I’m starting with a blank slate and want to just build a clean image first. I followed the instructions here: https://github.com/influxdata/telegraf (under the heading “From Source”) and it made a telegraf executable file. Good so far.

When I try to execute the file i.e.: ./telegraf --help or ./telegraf --version …

It fails with the message: “Killed: 9”

Has anyone encountered this before? Is there a way to build this on a mac?

Notes:

  1. go is setup and working fine.
  2. make seems to work fine.
  3. I’m using “go get -d github.com/influxdata/telegraf” as the base
#2

We had a similar issue reported some time ago on the issue tracker, it was an issue with CGO and was resolved by updating the Go version:

#3

This is an issue with the version of Go that I was using. This happens with Go 1.8 on MacOS 10.10 or higher. More details can be found here: https://github.com/golang/go/issues/19734

An update of Go v1.10 resolved the issue.