Summary
gotun fails to build with Go 1.26.0 due to redeclared constants in gvisor.dev/gvisor/pkg/sync.
Environment
- gotun:
v0.8.0
- Go:
go1.26.0
- OS: macOS arm64 and Linux arm64 (Homebrew CI)
Reproduction
git clone --depth 1 --branch v0.8.0 https://github.com/Sesame2/gotun.git
cd gotun
go version
# go version go1.26.0 ...
go build -trimpath -ldflags='-s -w -X main.Version=0.8.0' ./cmd/gotun
Error
# gvisor.dev/gvisor/pkg/sync
.../gvisor.dev/gvisor@v0.0.0-20251220000015-517913d17844/pkg/sync/runtime_constants_go126.go:22:2: WaitReasonSelect redeclared in this block
.../gvisor.dev/gvisor@v0.0.0-20251220000015-517913d17844/pkg/sync/runtime_constants_go125.go:22:2: other declaration of WaitReasonSelect
.../runtime_constants_go126.go:23:2: WaitReasonChanReceive redeclared in this block
.../runtime_constants_go125.go:23:2: other declaration of WaitReasonChanReceive
.../runtime_constants_go126.go:24:2: WaitReasonSemacquire redeclared in this block
.../runtime_constants_go125.go:24:2: other declaration of WaitReasonSemacquire
Homebrew references
It looks like this may require updating/pinning the gVisor dependency to a revision compatible with Go 1.26 build tags.
Summary
gotunfails to build with Go1.26.0due to redeclared constants ingvisor.dev/gvisor/pkg/sync.Environment
v0.8.0go1.26.0Reproduction
Error
Homebrew references
It looks like this may require updating/pinning the gVisor dependency to a revision compatible with Go 1.26 build tags.