gvisor-tap-vsock icon indicating copy to clipboard operation
gvisor-tap-vsock copied to clipboard

Need newer gvisor.dev/gvisor to build with go 1.19-rc2

Open lsm5 opened this issue 3 years ago • 1 comments

On Fedora rawhide with:

$ rpm -q golang
golang-1.19~rc2-1.fc37.x86_64

the main branch as well as commit 4ee84d66bd86668f011733d8873989b5862bcd07 (used in podman rpm) fail to build like so:

$ make
go build -ldflags '-s -w' -o bin/gvproxy ./cmd/gvproxy
package github.com/containers/gvisor-tap-vsock/cmd/gvproxy
	imports github.com/containers/gvisor-tap-vsock/pkg/virtualnetwork
	imports github.com/containers/gvisor-tap-vsock/pkg/services/dhcp
	imports github.com/containers/gvisor-tap-vsock/pkg/tap
	imports gvisor.dev/gvisor/pkg/tcpip
	imports gvisor.dev/gvisor/pkg/atomicbitops
	imports gvisor.dev/gvisor/pkg/state
	imports gvisor.dev/gvisor/pkg/state/wire
	imports gvisor.dev/gvisor/pkg/gohacks: build constraints exclude all Go files in /home/lsm5/go/src/github.com/containers/gvisor-tap-vsock/vendor/gvisor.dev/gvisor/pkg/gohacks
make: *** [Makefile:11: gvproxy] Error 1

Going through the most recent gvisor.dev/gvisor releases, https://github.com/google/gvisor/releases/tag/release-20220606.0 looks like the most recent release that doesn't break gvisor-tap-vsock main branch.

Building with any newer release of gvisor gives me this:

$ make vendor
go mod tidy
go: downloading gvisor.dev/gvisor v0.0.0-20220722233450-64299b5b226f
go: finding module for package gvisor.dev/gvisor/pkg/tcpip/buffer
github.com/containers/gvisor-tap-vsock/pkg/tap imports
	gvisor.dev/gvisor/pkg/tcpip/buffer: module gvisor.dev/gvisor@latest found (v0.0.0-20220722233450-64299b5b226f, replaced by gvisor.dev/[email protected]), but does not contain package gvisor.dev/gvisor/pkg/tcpip/buffer
make: *** [Makefile:33: vendor] Error 1

I can send a PR if you agree to updating with release-20220606.0.

/cc @vrothberg

lsm5 avatar Jul 25 '22 13:07 lsm5

See https://github.com/containers/gvisor-tap-vsock/pull/135

cfergeau avatar Jul 25 '22 13:07 cfergeau

Closing as #135 has been merged.

cfergeau avatar Dec 05 '22 16:12 cfergeau