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

darwin/arm64 (Apple Silicon M1) support #199

Closed
jamesrwhite opened this issue Feb 23, 2021 · 6 comments · Fixed by #201
Closed

darwin/arm64 (Apple Silicon M1) support #199

jamesrwhite opened this issue Feb 23, 2021 · 6 comments · Fixed by #201

Comments

@jamesrwhite
Copy link

jamesrwhite commented Feb 23, 2021

Hi,

I wanted to ask if there any plans to build binaries for darwin/arm64 to support running node_exporter natively on MacOS machines running M1 processors?

This would require updating to Go 1.16 also I believe as that's when support for that arch was added.

We currently have the following version of node_exporter running:

node_exporter, version 1.1.1 (branch: , revision: )
  build user:       Homebrew
  build date:
  go version:       go1.15.7
  platform:         darwin/amd64

We are running it under Rosetta on MacOS 11.0.1 but there are known issues with earlier versions of Rosetta and Go (golang/go#42700) that I believe we are also seeing. Supposedly they are fixed in later versions of Rosetta but I'd prefer if we could run it natively regardless.

I'm not that familiar with the code base but I'm happy to help with implementing/testing if I can. I had a quick look and can see there's various files where 1.15 is mentioned and the darwin builds seem to be in .promu-cgo.yml.

Thanks

@SuperQ
Copy link
Member

SuperQ commented Feb 23, 2021

Yes, we do this work by adding it to promu.

@SuperQ SuperQ transferred this issue from prometheus/node_exporter Feb 23, 2021
@jamesrwhite
Copy link
Author

@SuperQ Thanks for looking at this. What's left to add support to node_exporter itself?

I had a go at this myself here but I wanted to check if there was anything else required? I'm happy to make the required changes and open a PR.

We're currently running a darwin/arm64 binary from homebrew that runs fine with the exception of the filesystem collector not being available.

@SuperQ
Copy link
Member

SuperQ commented Apr 12, 2021

I think I finally got the golang-builder working correctly for CGO crossbuilds of the node_exporter.

prometheus/node_exporter#2020

@jamesrwhite
Copy link
Author

@SuperQ Just seen the updates to your PR, thanks again for looking at this 👍

I still think some changes like these will be needed to get the filesystem collector working, could you add those in or would you prefer I open a separate PR?

@SuperQ
Copy link
Member

SuperQ commented Apr 13, 2021

Yes, you're right, we need to modify the build flag. Rather than enumerate it, we can change darwin,amd64 to just darwin.

Feel free to open a PR.

@SuperQ
Copy link
Member

SuperQ commented Apr 13, 2021

Actually, I can just add that to the existing PR.

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

Successfully merging a pull request may close this issue.

2 participants