I'm using go 1.9 on OS X 10.12.6. I was attempting to "go get" github.com/maxbrunsfeld/counterfeiter, and was presented with the following cryptic errors:
% go get github.com/maxbrunsfeld/counterfeiter
# golang.org/x/sys/unix
code/go/src/golang.org/x/sys/unix/dirent.go:68:17: undefined: direntReclen
code/go/src/golang.org/x/sys/unix/dirent.go:74:14: undefined: direntIno
code/go/src/golang.org/x/sys/unix/dirent.go:81:24: constant -1000000000 overflows uint64
code/go/src/golang.org/x/sys/unix/dirent.go:81:41: undefined: Dirent
code/go/src/golang.org/x/sys/unix/dirent.go:82:17: undefined: direntNamlen
code/go/src/golang.org/x/sys/unix/flock.go:13:30: undefined: SYS_FCNTL
code/go/src/golang.org/x/sys/unix/flock.go:16:42: undefined: Flock_t
code/go/src/golang.org/x/sys/unix/flock.go:17:17: undefined: Syscall
I also attempted to go get with -u and -v, and while verbose mode provides some more information, none is really relevant to the errors seen here. Has anyone seen anything like this before?
Solved the same issue with just GOOS=linux GOARCH=amd64 go get ...