EmbarkStudios / wg-ui

WireGuard Web UI for self-serve client configurations, with optional auth.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't build on FreeBSD 12

biltongza opened this issue · comments

Describe the bug
I'm trying to build wg-ui in a jail in FreeBSD 12. I keep getting the same error out of go while building nftables:

go get github.com/go-bindata/go-bindata/...
go get github.com/elazarl/go-bindata-assetfs/...
go-bindata-assetfs -prefix ui/dist ui/dist
CGO_ENABLED=0 go build -o bin/wireguard-ui -v
github.com/google/nftables/expr
# github.com/google/nftables/expr
/root/go/pkg/mod/github.com/google/nftables@v0.0.0-20200316075819-7127d9d22474/expr/byteorder.go:28:30: undefined: unix.NFT_BYTEORDER_NTOH
/root/go/pkg/mod/github.com/google/nftables@v0.0.0-20200316075819-7127d9d22474/expr/byteorder.go:29:30: undefined: unix.NFT_BYTEORDER_HTON
/root/go/pkg/mod/github.com/google/nftables@v0.0.0-20200316075819-7127d9d22474/expr/ct.go:31:26: undefined: unix.NFT_CT_STATE
/root/go/pkg/mod/github.com/google/nftables@v0.0.0-20200316075819-7127d9d22474/expr/ct.go:32:26: undefined: unix.NFT_CT_DIRECTION
/root/go/pkg/mod/github.com/google/nftables@v0.0.0-20200316075819-7127d9d22474/expr/ct.go:33:26: undefined: unix.NFT_CT_STATUS
/root/go/pkg/mod/github.com/google/nftables@v0.0.0-20200316075819-7127d9d22474/expr/ct.go:34:26: undefined: unix.NFT_CT_MARK
/root/go/pkg/mod/github.com/google/nftables@v0.0.0-20200316075819-7127d9d22474/expr/ct.go:35:26: undefined: unix.NFT_CT_SECMARK
/root/go/pkg/mod/github.com/google/nftables@v0.0.0-20200316075819-7127d9d22474/expr/ct.go:36:26: undefined: unix.NFT_CT_EXPIRATION
/root/go/pkg/mod/github.com/google/nftables@v0.0.0-20200316075819-7127d9d22474/expr/ct.go:37:26: undefined: unix.NFT_CT_HELPER
/root/go/pkg/mod/github.com/google/nftables@v0.0.0-20200316075819-7127d9d22474/expr/ct.go:38:26: undefined: unix.NFT_CT_L3PROTOCOL
/root/go/pkg/mod/github.com/google/nftables@v0.0.0-20200316075819-7127d9d22474/expr/ct.go:38:26: too many errors
*** Error code 2

Stop.
make: stopped in /root/src/wg-ui

I thought it may be an issue upstream, but turns out nftables isn't a thing on Freebsd: google/nftables#117

To Reproduce
Steps to reproduce the behavior:

  1. make build

Additional info:

# go version
go version go1.15.6 freebsd/amd64

# freebsd-version
12.2-RELEASE-p2

Since nftables is a linux specific software, wg-ui won't support anything that isn't able to use nftables.