I am trying to cross-compile wireguardctrl for my NAS device. It has very old kernel so I cannot use kernel based wireguard. The wireguard-go implementation doesn't include configuration command. So I decided that wireguardctrl could be a good option since as it seems to support userspace implementations. However I have a problem to compile it with go1.11.4. Here is the list of commands I use:
(master)$ go version
go version go1.11.4 linux/amd64
(master)$ GOARM=7 GOOS=linux GOARCH=arm go get -ldflags "-R 65536" -u github.com/mdlayher/wireguardctrl
# github.com/mdlayher/wireguardctrl/internal/wgnl
tools/go/go1.11.4/lib/src/github.com/mdlayher/wireguardctrl/internal/wgnl/parse_linux.go:265:20: cannot use ts.Sec (type int32) as type int64 in argument to time.Unix
tools/go/go1.11.4/lib/src/github.com/mdlayher/wireguardctrl/internal/wgnl/parse_linux.go:265:28: cannot use ts.Nsec (type int32) as type int64 in argument to time.Unix
Ah yep, I've seen this before with my github.com/mdlayher/raw package. Happy to accept a PR similar to how that repo does it, or otherwise I can try to take a look at this in the next couple of days.
I am trying to cross-compile
wireguardctrl
for my NAS device. It has very old kernel so I cannot use kernel basedwireguard
. Thewireguard-go
implementation doesn't include configuration command. So I decided thatwireguardctrl
could be a good option since as it seems to support userspace implementations. However I have a problem to compile it withgo1.11.4
. Here is the list of commands I use: