tklauser / go-sysconf

sysconf for Go, without using cgo
https://pkg.go.dev/github.com/tklauser/go-sysconf
BSD 3-Clause "New" or "Revised" License
141 stars 27 forks source link

openbsd/i386 build fails #21

Closed ivandeex closed 3 years ago

ivandeex commented 3 years ago

The problem is with golang 1.16.6 symbol unix.RLIMIT_NPROC undefined on openbsd/i386 (all fine on openbsd/amd64): https://github.com/tklauser/go-sysconf/blob/v0.3.6/sysconf_openbsd.go#L22

From the build log (https://github.com/rclone/rclone/runs/3150179581?check_suite_focus=true#step:15:35), section "compile all architectures test":

2021/07/24 10:53:13 Failed to run [go build --ldflags -s -X github.com/rclone/rclone/fs.Version=v1.56.0-beta.5602.1fcdec087.merge -trimpath -o rclone-v1.56.0-beta.5602.1fcdec087.merge-openbsd-386/rclone -tags  ..]: exit status 2
2021/07/24 10:53:13 Command output was:
# github.com/tklauser/go-sysconf
Error: ../../../../go/pkg/mod/github.com/tklauser/go-sysconf@v0.3.6/sysconf_openbsd.go:22:28: undefined: unix.RLIMIT_NPROC

https://github.com/rclone/rclone/pull/5402 is pending on this issue.

tklauser commented 3 years ago

Thanks for the report @ivandeex! I've sent https://golang.org/cl/341069 to add RLIMIT_NPROC for openbsd/386 (and openbsd/arm for that matter) and will update this package as soon as the upstream fix is merged.