gofrs / flock

Thread-safe file locking library in Go
https://pkg.go.dev/github.com/gofrs/flock
BSD 3-Clause "New" or "Revised" License
578 stars 66 forks source link

Cannot build on */wasm, plan9/* #60

Closed msays2000 closed 4 months ago

msays2000 commented 2 years ago
plan9/386 ``` 2022/09/06 23:09:27 Command output was: ## github.com/gofrs/flock plan9/386 ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:28:30: undefined: syscall.LOCK_EX ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:39:30: undefined: syscall.LOCK_SH ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:57:20: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:67:20: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:97:20: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:97:50: undefined: syscall.LOCK_UN ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:119:29: undefined: syscall.LOCK_EX ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:131:29: undefined: syscall.LOCK_SH ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:151:17: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:151:52: undefined: syscall.LOCK_NB ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:151:52: too many errors 2022/09/06 23:09:27 ---------------------------- 2022/09/06 23:09:27 Error compiling plan9/386: exit status 2 ```
plan9/amd64 ``` 2022/09/06 23:09:57 Command output was: ## github.com/gofrs/flock plan9/amd64 ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:28:30: undefined: syscall.LOCK_EX ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:39:30: undefined: syscall.LOCK_SH ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:57:20: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:67:20: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:97:20: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:97:50: undefined: syscall.LOCK_UN ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:119:29: undefined: syscall.LOCK_EX ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:131:29: undefined: syscall.LOCK_SH ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:151:17: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:151:52: undefined: syscall.LOCK_NB ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:151:52: too many errors 2022/09/06 23:09:57 ---------------------------- 2022/09/06 23:09:57 Error compiling plan9/amd64: exit status 2 2022/09/06 23:13:03 ---------------------------- ```
solaris/amd64 ``` 2022/09/06 23:13:03 Command output was: ## github.com/gofrs/flock solaris/amd64 ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:28:30: undefined: syscall.LOCK_EX ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:39:30: undefined: syscall.LOCK_SH ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:57:20: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:67:20: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:97:20: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:97:50: undefined: syscall.LOCK_UN ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:119:29: undefined: syscall.LOCK_EX ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:131:29: undefined: syscall.LOCK_SH ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:151:17: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:151:52: undefined: syscall.LOCK_NB ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:151:52: too many errors 2022/09/06 23:13:03 ---------------------------- 2022/09/06 23:13:03 Error compiling solaris/amd64: exit status 2 2022/09/06 23:13:03 ---------------------------- ```
js/wasm ``` 2022/09/06 23:13:03 Command output was: ## github.com/gofrs/flock js/wasm ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:28:30: undefined: syscall.LOCK_EX ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:39:30: undefined: syscall.LOCK_SH ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:57:20: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:67:20: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:97:20: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:97:50: undefined: syscall.LOCK_UN ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:119:29: undefined: syscall.LOCK_EX ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:131:29: undefined: syscall.LOCK_SH ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:151:17: undefined: syscall.Flock ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:151:52: undefined: syscall.LOCK_NB ../../../../go/pkg/mod/github.com/gofrs/flock@v0.8.1/flock_unix.go:151:52: too many errors 2022/09/06 23:13:03 ---------------------------- 2022/09/06 23:13:03 Error compiling js/wasm: exit status 2 ```
ldez commented 4 months ago

The PR #63 will add the support for Solaris/Illumos.

For plan9, I don't know.

For js, I found a fork with an implementation: https://github.com/pgavlin/flock/blob/master/flock_js.go Maybe @pgavlin wants to create a PR about that?

ldez commented 4 months ago

v0.10.0 adds the support of Solaris/Illumos