Skip to content

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

Closed

Description

@andig

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.

Activity

  1. added this to the Unreleased milestone on Jan 4, 2021
  2. andig commented on Jan 4, 2021

    @andig
    ContributorAuthor

    Bisect good:

    golang.org/x/sys@3aab700007d75c6b1abee24ba9b040898310d0f7
    

    bad:

    golang.org/x/sys@196b9ba8737a10c9253b04174f25881e562da5b8
    

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

  3. ALTree commented on Jan 4, 2021

    @ALTree
    Member

    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?

  4. andig commented on Jan 4, 2021

    @andig
    ContributorAuthor

    Can you upgrade to latest and test again?

    Working with @latest. Thank you :)

  5. locked and limited conversation to collaborators on Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions