-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
Initially reported by @Toasterson
The main issue is that badger@1.5.3 uses golangs internal syscall library and that does not support many operatingsystems notably openbsd, netbsd, and illumos. Badger uses a constant for MADVISE and that only came into the go for these Unixes after the internal syscall library got frozen. Right now the internal syscall library only really works for linux and every software that wants to support something else than linux and uses the syscall library directly must use x/sys/unix instead. I've personally changed quite a few direct dependencies and pushed people to use x/sys/unix instead of syscall so that today this is mostly happening due the dependency chain. I could not upgrade badger to 1.6.1 as there where api changes but nosql bump worked. So until that is resolved caddy cannot be built on quite a few unix versions I suppose. I know it won't build for illumos right now. Are you monitoring cross-builds?
Also here the exact error for documentation
# github.com/dgraph-io/badger/y ../../../pkg/mod/github.com/dgraph-io/badger@v1.5.3/y/mmap_unix.go:57:30: undefined: syscall.SYS_MADVISE
Originally posted by @Toasterson in #3602 (comment)
Build errors:
- Solaris/Illumos
$ GOOS=solaris go build
# github.com/dgraph-io/badger/y
../../../../../go/pkg/mod/github.com/dgraph-io/badger@v1.5.3/y/mmap_unix.go:57:30: undefined: syscall.SYS_MADVISE
- plan9:
$ GOOS=plan9 go build
# github.com/dgraph-io/badger/y
../../../../../go/pkg/mod/github.com/dgraph-io/badger@v1.5.3/y/file_dsync.go:24:21: undefined: unix.O_DSYNC
../../../../../go/pkg/mod/github.com/dgraph-io/badger@v1.5.3/y/mmap_unix.go:32:11: undefined: unix.PROT_READ
../../../../../go/pkg/mod/github.com/dgraph-io/badger@v1.5.3/y/mmap_unix.go:34:12: undefined: unix.PROT_WRITE
../../../../../go/pkg/mod/github.com/dgraph-io/badger@v1.5.3/y/mmap_unix.go:36:9: undefined: unix.Mmap
../../../../../go/pkg/mod/github.com/dgraph-io/badger@v1.5.3/y/mmap_unix.go:36:54: undefined: unix.MAP_SHARED
../../../../../go/pkg/mod/github.com/dgraph-io/badger@v1.5.3/y/mmap_unix.go:41:9: undefined: unix.Munmap
../../../../../go/pkg/mod/github.com/dgraph-io/badger@v1.5.3/y/mmap_unix.go:48:11: undefined: unix.MADV_NORMAL
../../../../../go/pkg/mod/github.com/dgraph-io/badger@v1.5.3/y/mmap_unix.go:50:11: undefined: unix.MADV_RANDOM
../../../../../go/pkg/mod/github.com/dgraph-io/badger@v1.5.3/y/mmap_unix.go:57:30: undefined: syscall.SYS_MADVISE
../../../../../go/pkg/mod/github.com/dgraph-io/badger@v1.5.3/y/mmap_unix.go:59:8: cannot use 0 (type untyped int) as type syscall.ErrorString
../../../../../go/pkg/mod/github.com/dgraph-io/badger@v1.5.3/y/mmap_unix.go:59:8: too many errors
# github.com/caddyserver/caddy/v2/cmd
../proc_posix.go:28:9: undefined: syscall.Kill
# go.etcd.io/bbolt
../../../../../go/pkg/mod/go.etcd.io/bbolt@v1.3.2/db.go:217:12: undefined: flock
../../../../../go/pkg/mod/go.etcd.io/bbolt@v1.3.2/db.go:354:12: undefined: mmap
../../../../../go/pkg/mod/go.etcd.io/bbolt@v1.3.2/db.go:376:12: undefined: munmap
../../../../../go/pkg/mod/go.etcd.io/bbolt@v1.3.2/db.go:456:12: undefined: fdatasync
../../../../../go/pkg/mod/go.etcd.io/bbolt@v1.3.2/db.go:501:14: undefined: funlock
../../../../../go/pkg/mod/go.etcd.io/bbolt@v1.3.2/db.go:861:37: undefined: fdatasync
../../../../../go/pkg/mod/go.etcd.io/bbolt@v1.3.2/tx.go:542:13: undefined: fdatasync
../../../../../go/pkg/mod/go.etcd.io/bbolt@v1.3.2/tx.go:579:13: undefined: fdatasync
# github.com/dgraph-io/badger/v2/y
../../../../../go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200413122845-09dd2e1a4195/y/file_dsync.go:24:21: undefined: unix.O_DSYNC
../../../../../go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200413122845-09dd2e1a4195/y/mmap_unix.go:30:11: undefined: unix.PROT_READ
../../../../../go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200413122845-09dd2e1a4195/y/mmap_unix.go:32:12: undefined: unix.PROT_WRITE
../../../../../go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200413122845-09dd2e1a4195/y/mmap_unix.go:34:9: undefined: unix.Mmap
../../../../../go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200413122845-09dd2e1a4195/y/mmap_unix.go:34:54: undefined: unix.MAP_SHARED
../../../../../go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200413122845-09dd2e1a4195/y/mmap_unix.go:39:9: undefined: unix.Munmap
../../../../../go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200413122845-09dd2e1a4195/y/mmap_unix.go:46:11: undefined: unix.MADV_NORMAL
../../../../../go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200413122845-09dd2e1a4195/y/mmap_unix.go:48:11: undefined: unix.MADV_RANDOM
../../../../../go/pkg/mod/github.com/dgraph-io/badger/v2@v2.0.1-rc1.0.20200413122845-09dd2e1a4195/y/mmap_unix.go:50:9: undefined: unix.Madvise
# github.com/chzyer/readline
../../../../../go/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:234:4: undefined: ClearScreen
../../../../../go/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:129:20: undefined: GetScreenWidth
../../../../../go/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:132:22: undefined: DefaultIsTerminal
../../../../../go/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:142:26: undefined: DefaultOnWidthChanged
../../../../../go/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/remote.go:324:2: undefined: DefaultOnWidthChanged
../../../../../go/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/remote.go:346:17: undefined: GetScreenWidth
../../../../../go/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/remote.go:362:16: undefined: DefaultIsTerminal
../../../../../go/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/terminal.go:51:2: undefined: SuspendMe
../../../../../go/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/utils.go:81:29: undefined: State
../../../../../go/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/utils.go:241:9: undefined: State
../../../../../go/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/terminal.go:51:2: too many errors
Known as of v2.1.1, but issue could be extending back in history. Exact version/commit is pretty much irrelevant.