Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/sys: undefined: unix.SYS_IOCTL when compiling for OSX #43494

Closed
andig opened this issue Jan 4, 2021 · 3 comments
Closed

x/sys: undefined: unix.SYS_IOCTL when compiling for OSX #43494

andig opened this issue Jan 4, 2021 · 3 comments

Comments

@andig
Copy link
Contributor

andig commented Jan 4, 2021

What version of Go are you using (go version)?

$ go version
go version go1.15.6 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/andig/Library/Caches/go-build"
GOENV="/Users/andig/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/andig/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/andig/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.15.6/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.15.6/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/andig/htdocs/gokrazy/tools/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/73/89ycv7qn51j4kbm04jsz9b840000gn/T/go-build954882536=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Migrated from gokrazy/tools#17.

go run github.com/gokrazy/tools/cmd/gokr-packer -hostname foo -overwrite foo -target_storage_bytes=1153441792 github.com/gokrazy/hello

Compile working with

golang.org/x/sys v0.0.0-20200523222454-059865788121

What did you expect to see?

Compile ok

What did you see instead?

Compiling gokrazy fails when newer x/sys is used:

golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211

# github.com/gokrazy/tools/cmd/gokr-packer
cmd/gokr-packer/parttable_darwin.go:21:33: undefined: unix.SYS_IOCTL
cmd/gokr-packer/parttable_darwin.go:24:33: undefined: unix.SYS_IOCTL

Looks as if unix.SYS_IOCTL has vanished for darwin between v0.0.0-20200523222454-059865788121...v0.0.0-20201015000850-e3ed0017c211. I'll try to bisect.

@gopherbot gopherbot added this to the Unreleased milestone Jan 4, 2021
@andig
Copy link
Contributor Author

andig commented Jan 4, 2021

Bisect good:

golang.org/x/sys@3aab700007d75c6b1abee24ba9b040898310d0f7

bad:

golang.org/x/sys@196b9ba8737a10c9253b04174f25881e562da5b8

/cc @tklauser for golang/sys@196b9ba#diff-9c6b5b17f87022114b635e559d1aba5b067a02b527502b577b3af26c948ef36f

@ALTree
Copy link
Member

ALTree commented Jan 4, 2021

This looks like #41868.

golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211

This version predates the fix for #41868. Can you upgrade to latest and test again?

@andig
Copy link
Contributor Author

andig commented Jan 4, 2021

Can you upgrade to latest and test again?

Working with @latest. Thank you :)

@andig andig closed this as completed Jan 4, 2021
@golang golang locked and limited conversation to collaborators Jan 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants