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

MacOS 10.15.7 disk.Partitions() is failing #958

Closed
4 tasks
audiolion opened this issue Oct 8, 2020 · 3 comments · Fixed by #970
Closed
4 tasks

MacOS 10.15.7 disk.Partitions() is failing #958

audiolion opened this issue Oct 8, 2020 · 3 comments · Fixed by #970

Comments

@audiolion
Copy link

Describe the bug
When compiling on MacOS 10.15.7, specifically the Github Actions virtual environment for MacOS released yesterday, gopsutil is no longer compiling:

# github.com/shirou/gopsutil/disk
Error: ../../../go/pkg/mod/github.com/shirou/gopsutil@v2.20.8+incompatible/disk/disk_darwin.go:67:51: cannot use stat.Mntfromname[:] (type []byte) as type []int8 in argument to common.IntToString
Error: ../../../go/pkg/mod/github.com/shirou/gopsutil@v2.20.8+incompatible/disk/disk_darwin.go:68:49: cannot use stat.Mntonname[:] (type []byte) as type []int8 in argument to common.IntToString
Error: ../../../go/pkg/mod/github.com/shirou/gopsutil@v2.20.8+incompatible/disk/disk_darwin.go:69:50: cannot use stat.Fstypename[:] (type []byte) as type []int8 in argument to common.IntToString
Error: ../../../go/pkg/mod/github.com/shirou/gopsutil@v2.20.8+incompatible/disk/disk_darwin.go:85:43: cannot use stat.Fstypename[:] (type []byte) as type []int8 in argument to common.IntToString

The code this references is https://github.com/shirou/gopsutil/blame/master/disk/disk_darwin.go#L67 and was last touched 6 years ago.

Environment (please complete the following information):

  • Windows: [paste the result of ver]
  • Linux: [paste contents of /etc/os-release and the result of uname -a]
  • [x ] Mac OS: System Version: macOS 10.15.7 (19H2)
  • FreeBSD: [paste the result of freebsd-version -k -r -u and uname -a]
  • OpenBSD: [paste the result of uname -a]
@chrisamti
Copy link

go the same problem. it seems since
golang/sys@cec0259
it's broken.

@tonyking97
Copy link

tonyking97 commented Oct 15, 2020

Any solution for this issue?

@chrisamti
Copy link

chrisamti commented Oct 15, 2020

A workaround that worked me:

inside your project
go get -u golang.org/x/sys@release-branch.go1.13

Maybe you first need to remove old org/x/sys package from you env:

go clean -i -n golang.org/x/sys

to preview what will be deleted.

followed by a

go clean -i golang.org/x/sys

finally:

go get -u golang.org/x/sys@release-branch.go1.13

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.

4 participants