zhsj/wghttp

Unable to build on v0.3.3

Closed this issue · 3 comments

Just pulled v0.3.3, can no longer build:

[pointy@pointy wghttp]$ git pull
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 11 (delta 5), reused 11 (delta 5), pack-reused 0
Unpacking objects: 100% (11/11), 2.57 KiB | 292.00 KiB/s, done.
From https://github.com/zhsj/wghttp
   7918f21..9378846  master     -> origin/master
 * [new tag]         v0.3.3     -> v0.3.3
Updating 7918f21..9378846
Fast-forward
 .github/workflows/ci.yaml | 12 ++++++------
 conn.go                   | 24 ++++++++++++++++--------
 go.mod                    | 14 +++++++-------
 go.sum                    | 28 ++++++++++++++--------------
 4 files changed, 43 insertions(+), 35 deletions(-)
[pointy@pointy wghttp]$ go install
go: downloading golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173
go: downloading golang.org/x/sys v0.12.0
go: downloading golang.org/x/net v0.15.0
go: downloading golang.org/x/crypto v0.13.0
go: downloading gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259
../../../.go/pkg/mod/golang.zx2c4.com/wireguard@v0.0.0-20231211153847-12269c276173/tun/netstack/tun.go:28:2: gvisor.dev/gvisor@v0.0.0-20230927004350-cbd86285d259: invalid version: unknown revision cbd86285d259
../../../.go/pkg/mod/golang.zx2c4.com/wireguard@v0.0.0-20231211153847-12269c276173/tun/netstack/tun.go:29:2: gvisor.dev/gvisor@v0.0.0-20230927004350-cbd86285d259: invalid version: unknown revision cbd86285d259
../../../.go/pkg/mod/golang.zx2c4.com/wireguard@v0.0.0-20231211153847-12269c276173/tun/netstack/tun.go:30:2: gvisor.dev/gvisor@v0.0.0-20230927004350-cbd86285d259: invalid version: unknown revision cbd86285d259
../../../.go/pkg/mod/golang.zx2c4.com/wireguard@v0.0.0-20231211153847-12269c276173/tun/netstack/tun.go:31:2: gvisor.dev/gvisor@v0.0.0-20230927004350-cbd86285d259: invalid version: unknown revision cbd86285d259
../../../.go/pkg/mod/golang.zx2c4.com/wireguard@v0.0.0-20231211153847-12269c276173/tun/netstack/tun.go:32:2: gvisor.dev/gvisor@v0.0.0-20230927004350-cbd86285d259: invalid version: unknown revision cbd86285d259
../../../.go/pkg/mod/golang.zx2c4.com/wireguard@v0.0.0-20231211153847-12269c276173/tun/netstack/tun.go:33:2: gvisor.dev/gvisor@v0.0.0-20230927004350-cbd86285d259: invalid version: unknown revision cbd86285d259
../../../.go/pkg/mod/golang.zx2c4.com/wireguard@v0.0.0-20231211153847-12269c276173/tun/netstack/tun.go:34:2: gvisor.dev/gvisor@v0.0.0-20230927004350-cbd86285d259: invalid version: unknown revision cbd86285d259
../../../.go/pkg/mod/golang.zx2c4.com/wireguard@v0.0.0-20231211153847-12269c276173/tun/netstack/tun.go:35:2: gvisor.dev/gvisor@v0.0.0-20230927004350-cbd86285d259: invalid version: unknown revision cbd86285d259
../../../.go/pkg/mod/golang.zx2c4.com/wireguard@v0.0.0-20231211153847-12269c276173/tun/netstack/tun.go:36:2: gvisor.dev/gvisor@v0.0.0-20230927004350-cbd86285d259: invalid version: unknown revision cbd86285d259
../../../.go/pkg/mod/golang.zx2c4.com/wireguard@v0.0.0-20231211153847-12269c276173/tun/netstack/tun.go:37:2: gvisor.dev/gvisor@v0.0.0-20230927004350-cbd86285d259: invalid version: unknown revision cbd86285d259
../../../.go/pkg/mod/golang.zx2c4.com/wireguard@v0.0.0-20231211153847-12269c276173/tun/netstack/tun.go:38:2: gvisor.dev/gvisor@v0.0.0-20230927004350-cbd86285d259: invalid version: unknown revision cbd86285d259
../../../.go/pkg/mod/golang.zx2c4.com/wireguard@v0.0.0-20231211153847-12269c276173/tun/netstack/tun.go:39:2: gvisor.dev/gvisor@v0.0.0-20230927004350-cbd86285d259: invalid version: unknown revision cbd86285d259
[pointy@pointy wghttp]$ go version
go version go1.22.2 linux/amd64

Thanks,
Elliott

zhsj commented

It't probably wrong with your network or your go module proxy. Could you run go env to show which proxy you are using?

[pointy@pointy wghttp]$ go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/pointy/.cache/go-build'
GOENV='/home/pointy/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/pointy/.go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/pointy/.go'
GOPRIVATE=''
GOPROXY='direct'
GOROOT='/usr/lib/golang'
GOSUMDB='off'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/usr/lib/golang/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.3'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/pointy/.local/opt/wghttp/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build575061797=/tmp/go-build -gno-record-gcc-switches'
zhsj commented

The gvisor revision which wireguard-go uses is longer belong to any branch in gvisor repo, google/gvisor@cbd86285d259
So go command can't fetch it now. However it exits in proxy.golang.org cache, so at least you can fetch it from there, by building with GOPROXY=https://proxy.golang.org.

wireguard-go should update its gvisor dependency.