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

Does not build on openbsd-arm #912

Closed
calmh opened this issue Jul 30, 2020 · 5 comments
Closed

Does not build on openbsd-arm #912

calmh opened this issue Jul 30, 2020 · 5 comments

Comments

@calmh
Copy link

calmh commented Jul 30, 2020

As of the current versions of relevant packages (I think), this does not build on freebsd-arm. (It used to be it didn't build on freebsd-arm64, I updated everything to fix that, which indeed works now.)

jb@kvin:../syncthing/syncthing % egrep gopsutil\|org/x/ go.mod
	github.com/shirou/gopsutil v2.20.6+incompatible
	golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
	golang.org/x/net v0.0.0-20200707034311-ab3426394381
	golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd
	golang.org/x/text v0.3.3
	golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
jb@kvin:../syncthing/syncthing % go version
go version go1.14.5 darwin/amd64
jb@kvin:../syncthing/syncthing % GOOS=freebsd GOARCH=arm go build ./cmd/...
# github.com/shirou/gopsutil/disk
../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_freebsd.go:87:52: cannot use stat.Mntfromname[:] (type []int8) as type []byte in argument to common.ByteToString
../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_freebsd.go:88:50: cannot use stat.Mntonname[:] (type []int8) as type []byte in argument to common.ByteToString
../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_freebsd.go:89:51: cannot use stat.Fstypename[:] (type []int8) as type []byte in argument to common.ByteToString
../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_freebsd.go:173:44: cannot use stat.Fstypename[:] (type []int8) as type []byte in argument to common.ByteToString

(I don't envy anyone trying to keep up with the type changes in sys around this...)

@Lomanic
Copy link
Collaborator

Lomanic commented Aug 1, 2020

You have to upgrade golang.org/x/sys to a revision after the breaking change, go get -u golang.org/x/sys should do it, not sure how it reflects on go modules. golang/sys@85ca7c5b95cd is indeed before the breaking change at golang/sys@5766fd3. Please see #853 for context.

@Lomanic Lomanic closed this as completed Aug 1, 2020
@Lomanic
Copy link
Collaborator

Lomanic commented Aug 1, 2020

BTW, I'm humbled to see syncthing is using gopsutil/disk, that's an awesome project, double humbled to see its founder here :)

@calmh
Copy link
Author

calmh commented Aug 2, 2020

Oh, I thought I had managed to update x/sys to the latest at the time, but apparently not! Thanks. No humbling necessary. :)

@calmh
Copy link
Author

calmh commented Aug 2, 2020

However, unfortunately, the update seems to break openbsd instead :(

jb@kvin:../syncthing/syncthing % egrep gopsutil\|org/x/ go.mod
	github.com/shirou/gopsutil v2.20.6+incompatible
	golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
	golang.org/x/net v0.0.0-20200707034311-ab3426394381
	golang.org/x/sys v0.0.0-20200802091954-4b90ce9b60b3
	golang.org/x/text v0.3.3
	golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
jb@kvin:../syncthing/syncthing % go version
go version go1.14.6 darwin/amd64
jb@kvin:../syncthing/syncthing % GOOS=openbsd GOARCH=arm go build ./cmd/syncthing
# github.com/shirou/gopsutil/disk
../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_openbsd.go:95:39: undefined: sizeOfDiskstats
../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_openbsd.go:99:14: undefined: sizeOfDiskstats
../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_openbsd.go:125:34: undefined: Diskstats
../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_openbsd.go:126:9: undefined: Diskstats
jb@kvin:../syncthing/syncthing % GOOS=openbsd GOARCH=arm64 go build ./cmd/syncthing
# github.com/shirou/gopsutil/disk
../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_openbsd.go:95:39: undefined: sizeOfDiskstats
../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_openbsd.go:99:14: undefined: sizeOfDiskstats
../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_openbsd.go:125:34: undefined: Diskstats
../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/disk/disk_openbsd.go:126:9: undefined: Diskstats
jb@kvin:../syncthing/syncthing %

@Lomanic
Copy link
Collaborator

Lomanic commented Apr 19, 2021

Fixed in #1052

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

2 participants