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

Builds for netbsd arm fail with undefined: cpuTimes #1645

Open
hdm opened this issue May 9, 2024 · 4 comments
Open

Builds for netbsd arm fail with undefined: cpuTimes #1645

hdm opened this issue May 9, 2024 · 4 comments

Comments

@hdm
Copy link

hdm commented May 9, 2024

Describe the bug

NetBSD builds on ARM started to failed after version 3.23.8

To Reproduce

env GOOS=netbsd GOARCH=arm go build ...
# github.com/shirou/gopsutil/v3/cpu
../../../pkg/mod/github.com/shirou/gopsutil/[email protected]/cpu/cpu_netbsd.go:45:14: undefined: cpuTimes
../../../pkg/mod/github.com/shirou/gopsutil/[email protected]/cpu/cpu_netbsd.go:70:14: undefined: cpuTimes

Expected behavior

Successful builds of netbsd/arm targets

@hdm hdm changed the title Builds for netbsd arm fail Builds for netbsd arm fail with undefined: cpuTimes May 9, 2024
@Lomanic
Copy link
Collaborator

Lomanic commented May 9, 2024

netbsd/arm has never been supported, this was just falling back to the functions returning a common.ErrNotImplementedError in cpu/cpu_fallback.go before #1530.

Please report back if copying cpu/cpu_openbsd_arm.go to cpu/cpu_netbsd_arm.go fixes the issue, it should build but check if it returns coherent results.

@hdm
Copy link
Author

hdm commented May 11, 2024

@Lomanic Thanks for the quick reply! That does resolve the build error. In my case the fallback error was preferable to a build failure (or nonsense results). I haven't been able to test this on a recent NetBSD to confirm.

@shirou
Copy link
Owner

shirou commented May 13, 2024

Does this mean that you have confirmed that cpu_netbsd_arm.go copied from cpu_openbsd_arm.go works fine? If so, we can make a PR to add that file. This will avoid build failures.

@hdm
Copy link
Author

hdm commented May 13, 2024

Switching to the previous fallback method would resolve this, but I haven't had a chance to review the results on NetBSD. The bigger issue is the build failure (rather than support for the OS).

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

No branches or pull requests

3 participants