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

FreeBSD build error: undefined: syscall.ENODATA #359

Closed
rfratto opened this issue Feb 10, 2021 · 2 comments · Fixed by #365
Closed

FreeBSD build error: undefined: syscall.ENODATA #359

rfratto opened this issue Feb 10, 2021 · 2 comments · Fixed by #365
Labels

Comments

@rfratto
Copy link
Contributor

rfratto commented Feb 10, 2021

#300 seems to have introduced a regression on FreeBSD:

vendor/github.com/prometheus/procfs/sysfs/class_thermal.go:51:22: undefined: syscall.ENODATA

You can see from the Go source that ENODATA isn't an error on FreeBSD.

Unfortunately, I don't understand this enough myself to try to contribute a fix, but this is preventing me from building node_exporter for FreeBSD.

@rfratto rfratto changed the title Can't build on freebsd FreeBSD build error: undefined: syscall.ENODATA Feb 10, 2021
@SuperQ
Copy link
Member

SuperQ commented Feb 11, 2021

Hrm, that file should probably have a build tag to avoid being used on FreeBSD.

@rfratto
Copy link
Contributor Author

rfratto commented Feb 11, 2021

Ah, that makes sense since thermal zones are only used in Linux. It looks like sysfs is Linux specific, maybe all of the files in the sysfs package should have // +build linux instead of // +build !windows?

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

Successfully merging a pull request may close this issue.

3 participants