Skip to content

Comments

sync: fix go1.26 build constraints#12469

Merged
copybara-service[bot] merged 2 commits intomasterfrom
test/cl854162392
Jan 9, 2026
Merged

sync: fix go1.26 build constraints#12469
copybara-service[bot] merged 2 commits intomasterfrom
test/cl854162392

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Jan 9, 2026

sync: fix go1.26 build constraints

Fix compile error on go1.26rc1.

go env output
  AR='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar'
  CGO_CFLAGS='-O2 -g'
  CGO_CPPFLAGS=''
  CGO_CXXFLAGS='-O2 -g'
  CGO_ENABLED='1'
  CGO_FFLAGS='-O2 -g'
  CGO_LDFLAGS='-O2 -g'
  CXX='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'
  GCCGO='gccgo'
  GO111MODULE=''
  GOARCH='arm64'
  GOARM64='v8.0'
  GOAUTH='netrc'
  GOBIN=''
  GOCACHE='/Users/zchee/.cache/go/go-build'
  GOCACHEPROG=''
  GODEBUG=''
  GOENV='/Users/zchee/.config/go/env/env'
  GOEXE=''
  GOEXPERIMENT='loopvar,newinliner,jsonv2,greenteagc'
  GOFIPS140='latest'
  GOFLAGS=''
  GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/dp/89wwdp754235m6jmdzj7p5lm0000gn/T/go-build365494810=/tmp/go-build -gno-record-gcc-switches -fno-common'
  GOHOSTARCH='arm64'
  GOHOSTOS='darwin'
  GOINSECURE=''
  GOMOD='/Users/zchee/go/src/gvisor.dev/gvisor/go.mod'
  GOMODCACHE='/Users/zchee/go/pkg/mod'
  GONOPROXY=''
  GONOSUMDB=''
  GOOS='darwin'
  GOPATH='/Users/zchee/go'
  GOPRIVATE=''
  GOPROXY='https://proxy.golang.org,direct'
  GOROOT='/Users/zchee/sdk/go1.26rc1'
  GOSUMDB='sum.golang.org'
  GOTELEMETRY='on'
  GOTELEMETRYDIR='/Users/zchee/Library/Application Support/go/telemetry'
  GOTMPDIR=''
  GOTOOLCHAIN='go1.26rc1+auto'
  GOTOOLDIR='/Users/zchee/sdk/go1.26rc1/pkg/tool/darwin_arm64'
  GOVCS=''
  GOVERSION='go1.26rc1'
  GOWORK=''
  PKG_CONFIG='pkgconf'
$ git rev-parse --abbrev-ref HEAD
go
$ git rev-parse HEAD
9f2192bea5ab6eeec7cf59c2a0f609fffbadbcca

# my local machine is darwin/arm64

$ GOOS=linux GOARCH=amd64 go1.26rc1 build -o /dev/null -v ./sync
gvisor.dev/gvisor/pkg/sync
# gvisor.dev/gvisor/pkg/sync
sync/runtime_constants_go126.go:22:2: WaitReasonSelect redeclared in this block
	sync/runtime_constants_go125.go:22:2: other declaration of WaitReasonSelect
sync/runtime_constants_go126.go:23:2: WaitReasonChanReceive redeclared in this block
	sync/runtime_constants_go125.go:23:2: other declaration of WaitReasonChanReceive
sync/runtime_constants_go126.go:24:2: WaitReasonSemacquire redeclared in this block
	sync/runtime_constants_go125.go:24:2: other declaration of WaitReasonSemacquire

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12397 from zchee:fix-go126-build-constraints ecdf845

Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
@copybara-service copybara-service bot added the exported Issue was exported automatically label Jan 9, 2026
@copybara-service copybara-service bot merged commit 2b5f76c into master Jan 9, 2026
0 of 2 checks passed
@copybara-service copybara-service bot deleted the test/cl854162392 branch January 9, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants