Go version
go version go1.22.1 darwin/arm64
Output of go env
in your module/workspace:
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/garret.kelly/Library/Caches/go-build'
GOENV='/Users/garret.kelly/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/garret.kelly/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/garret.kelly/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.22.1/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.22.1/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.1'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/garret.kelly/p/sys/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 -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/96/hm0kmdxj4sg3591l1vqq7x1c0000gn/T/go-build436974620=/tmp/go-build -gno-record-gcc-switches -fno-common'
What did you do?
I upgraded a golang.org/x/sys
dependency to v0.23.0 (the latest as of this writing), and found that one of our internal packages no longer builds due this commit https://github.com/golang/sys/commit/31ef9e726f987c593d73c3c35ca1c7477cf0e480#diff-c5a31fa49f385decaee6af20c180aa8ba237891920254e621e69e5e78655b1f1L945 removing the ETHTOOL_FLAG_COMPACT_BITSETS
, ETHTOOL_FLAG_OMIT_REPLY
, and ETHTOOL_FLAG_STATS
constants.
I suspect this was caused by https://github.com/torvalds/linux/commit/ff8877b04ef282b2bdb16c9dccc2e42216a34f62, which turned those #define
s into enum
s and go merged into the kernel v6.10 release.
What did you see happen?
Compilation failed due to missing symbol.
What did you expect to see?
Compilation succeed.
Comment From: gabyhelp
Related Issues and Documentation
- x/sys: missing ETHTOOL_FLAG_ constants in v0.23.0 #68761
- x/sys: v0.14.0 removes definition of BPF_F_KPROBE_MULTI_RETURN in unix/zerrors_linux.go #63969 (closed)
- x/sys: undefined: unix.SYS_IOCTL when compiling for OSX #43494 (closed)
- cmd/go: Setting up a go workspace breaks building #57738 (closed)
- x/sys: build failing on go1.11 because package golang.org/x/sys requires go1.12 #30792 (closed)
- x/net/ipv6: undefined consts cause builds to fail on linux, darwin #9047 (closed)
- x/sys/unix: compiler gives error code 1 on go version \< 1.12 breaking higher level build systems #30670 (closed)
- x/sys: does not contain package golang.org/x/sys/internal/unsafeheader #63412 (closed)
- affected/package: golang.org/x/tools #55912 (closed)
- x/sys: cacheLineSize redeclared in this block #30668 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: gkelly
During the review https://go-review.googlesource.com/c/sys/+/600516, the removal of these flags was called out. While it's true the #define
s are removed, they're replaced with an enum and variants to replaces these removed #define
s.
Comment From: thediveo
dup of issue #68761 ?
Comment From: ianlancetaylor
Yes, closing as dup. Thanks.