go: x/crypto/ssh/terminal: build failing on darwin/amd64: undefined: unix.IoctlGetTermios
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.9.2 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/usr/local/goland"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.9.2/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.9.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/y2/dnhd02vs2k3bmty6w3f0j7940000gn/T/go-build493794240=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
What did you do?
go get -u golang.org/x/crypto/ssh/terminal
What did you expect to see?
no error. The package should be fetched and built.
What did you see instead?
../../../../golang.org/x/crypto/ssh/terminal/util.go:30:12: undefined: unix.IoctlGetTermios
../../../../golang.org/x/crypto/ssh/terminal/util.go:38:18: undefined: unix.IoctlGetTermios
../../../../golang.org/x/crypto/ssh/terminal/util.go:54:12: undefined: unix.IoctlSetTermios
../../../../golang.org/x/crypto/ssh/terminal/util.go:64:18: undefined: unix.IoctlGetTermios
../../../../golang.org/x/crypto/ssh/terminal/util.go:75:9: undefined: unix.IoctlSetTermios
../../../../golang.org/x/crypto/ssh/terminal/util.go:80:13: undefined: unix.IoctlGetWinsize
../../../../golang.org/x/crypto/ssh/terminal/util.go:98:18: undefined: unix.IoctlGetTermios
../../../../golang.org/x/crypto/ssh/terminal/util.go:107:12: undefined: unix.IoctlSetTermios
../../../../golang.org/x/crypto/ssh/terminal/util.go:112:3: undefined: unix.IoctlSetTermios
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 9
- Comments: 19 (11 by maintainers)
@sapiens-sapide as @mvdan mentioned, did you check that your
x/sys/unixclone wasn’t on a branch or some other detached git state? Did you get an error, e.g. like the following while doinggo get -u golang.org/x/sys/unix:Could you check the result of running
git symbolic-ref HEADin$GOPATH/src/golang.org/x/sys? If this doesn’t returnrefs/heads/mastermake sure togit checkout masterand then trygo get -u golang.org/x/crypto/ssh/terminalagain?Happens to my CI as well with a fresh context, in an alpine Docker image.
It downloads all vendors from scratch everytime using
glide, and yet it always gives me the same errors as the other people here:See https://travis-ci.org/EtixLabs/cameradar/builds/310140604 for full build logs.
The version of
golang.org/x/cryptothat it uses is the commit2509b142fb2b797aa7587dad548f113b2c0f20ce.I was hit by this after updating my vendor https://travis-ci.org/allegro/marathon-consul/builds/301938144#L596
Cannot reproduce on neither Darwin not Linux with
GOOS=darwin.@sapiens-sapide Could you try to
go get -u golang.org/x/sys/unixand thengo get -u golang.org/x/crypto/ssh/terminalagain?