Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a tar.gz release package for Darwin / MacOS with CGO #4801

Closed
itzg opened this issue Oct 3, 2018 · 12 comments · Fixed by #6259
Closed

Provide a tar.gz release package for Darwin / MacOS with CGO #4801

itzg opened this issue Oct 3, 2018 · 12 comments · Fixed by #6259

Comments

@itzg
Copy link

itzg commented Oct 3, 2018

Feature Request

Proposal:

It would be very helpful to obtain the "tar.gz" binary packages for Darwin under https://github.com/influxdata/telegraf/releases/latest .

Current behavior:

At a particular release area, such as "latest",, there are many platforms listed, but Darwin is not one of them.

Desired behavior:

See a tar.gz binary package for Darwin-amd64 as a platform choice in the releases.

Use case:

We are building a tool that automates installation of Telegraf on user devices and having a unified way of downloading and extracting the pre-built binary bundle on Linux, Windows, and MacOS would avoid one-off conditional code for MacOS devices. Right now the one-off code has to access the binaries via Homebrew's repo where the structure of that package is inconsistent with the official packages.

@danielnelson
Copy link
Contributor

I wonder which files should go into the darwin tar.gz? Do you think it should just be telegraf and telegraf.conf similar to the Windows zip files?

@itzg
Copy link
Author

itzg commented Oct 3, 2018

Yes, I think the two files like the Windows zip would be perfect.

goller added a commit that referenced this issue Aug 14, 2019
Closes #4801

This will build a darwin tar.gz package for macOS.  This allows people an easy way to download
releases from github directly.
@goller
Copy link
Contributor

goller commented Aug 14, 2019

Hey @itzg , I've just merged in a change that will create darwin builds for the upcoming 1.12 release.

@goller goller added this to the 1.12.0 milestone Aug 14, 2019
@itzg
Copy link
Author

itzg commented Sep 9, 2019

@goller sorry to comment on a closed issue, but I gave the Darwin/MacOSX binaries a try and am running into the issue reported in #1484 where I see the following when configuring a CPU input plugin with no specific fields set:

E! [inputs.cpu] Error in plugin: error getting CPU info: not implemented yet

@danielnelson danielnelson reopened this Sep 9, 2019
@danielnelson
Copy link
Contributor

The issue is that the Darwin build requires CGO for the cpu plugin, and possible other key plugins. As the packages are cross compiled from Linux, they do not have CGO enabled.

I'm not sure how feasible a non-cgo implementation would be for Darwin, but it might be possible to add one to gopsutil, outside of that we could look into using a Darwin build machine on CircleCI.

Reopening the issue since, even though technically we have the package, it's probably not usable by most who would be interested in it.

@danielnelson danielnelson changed the title Provide a tar.gz release package for Darwin / MacOS Provide a tar.gz release package for Darwin / MacOS with CGO Sep 9, 2019
@jimmyseto
Copy link
Contributor

The issue is that the Darwin build requires CGO for the cpu plugin, and possible other key plugins. As the packages are cross compiled from Linux, they do not have CGO enabled.

I'm not sure how feasible a non-cgo implementation would be for Darwin, but it might be possible to add one to gopsutil, outside of that we could look into using a Darwin build machine on CircleCI.

Reopening the issue since, even though technically we have the package, it's probably not usable by most who would be interested in it.

@danielnelson - what's the current status of this? are there plans to use a Darwin build machine to make the posted packages more usable? thanks in advance.

@donalod
Copy link

donalod commented Dec 1, 2020

Hello, also curious as running telegraf 1.16.2 on OSX 10.11.6 wth go1.11 and still getting "[inputs.cpu] Error in plugin: error getting CPU info: not implemented yet"

@ssoroka
Copy link
Contributor

ssoroka commented Dec 6, 2020

As a work around for this until we add a new release package, you can build Telegraf yourself with CGO enabled like so:
env CGO_ENABLED=1 go build ./cmd/telegraf

@ssoroka
Copy link
Contributor

ssoroka commented Feb 8, 2021

going to close this in favor of #8837, as it's more in-line with the approach we want to be taking. (going down the road of supporting CGO everywhere would be painful: it would double the build times and use of CGO is not a simple one-binary deploy).

@ssoroka ssoroka closed this as completed Feb 8, 2021
@jimmyseto
Copy link
Contributor

going to close this in favor of #8837, as it's more in-line with the approach we want to be taking. (going down the road of supporting CGO everywhere would be painful: it would double the build times and use of CGO is not a simple one-binary deploy).

@ssoroka - even with a fix for #8837, users would still need to either build their own macOS binaries or go through Homebrew, correct?

@Hipska
Copy link
Contributor

Hipska commented Feb 12, 2021

There is an official build on the releases page.

@jimmyseto
Copy link
Contributor

There is an official build on the releases page.

oh right. i've been resorting to homebrew and/or build-your-own for so long now, i completely forgot about that! thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants