kubernetes: Bazel build fails on mac with standalone strategy due to Linux dependency

On sierra

bazel build //pkg/... --spawn_strategy=standalone
INFO: Found 2295 targets...
ERROR: /Volumes/development/projects/origin/src/k8s.io/kubernetes/vendor/BUILD:7074:1: null failed: inotify.a.GoCompileFile.params failed: error executing command bazel-out/local-fastbuild/bin/vendor/bazel-out/local-fastbuild/bin/vendor/golang.org/x/exp/inotify.a.GoCompileFile.params: com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
k8s.io/kubernetes/vendor/golang.org/x/exp/inotify/inotify_linux.go:252: undefined: syscall.IN_DONT_FOLLOW
k8s.io/kubernetes/vendor/golang.org/x/exp/inotify/inotify_linux.go:253: undefined: syscall.IN_ONESHOT
k8s.io/kubernetes/vendor/golang.org/x/exp/inotify/inotify_linux.go:254: undefined: syscall.IN_ONLYDIR
k8s.io/kubernetes/vendor/golang.org/x/exp/inotify/inotify_linux.go:261: undefined: syscall.IN_ACCESS
k8s.io/kubernetes/vendor/golang.org/x/exp/inotify/inotify_linux.go:262: undefined: syscall.IN_ALL_EVENTS
k8s.io/kubernetes/vendor/golang.org/x/exp/inotify/inotify_linux.go:263: undefined: syscall.IN_ATTRIB
k8s.io/kubernetes/vendor/golang.org/x/exp/inotify/inotify_linux.go:264: undefined: syscall.IN_CLOSE
k8s.io/kubernetes/vendor/golang.org/x/exp/inotify/inotify_linux.go:265: undefined: syscall.IN_CLOSE_NOWRITE
k8s.io/kubernetes/vendor/golang.org/x/exp/inotify/inotify_linux.go:266: undefined: syscall.IN_CLOSE_WRITE
k8s.io/kubernetes/vendor/golang.org/x/exp/inotify/inotify_linux.go:267: undefined: syscall.IN_CREATE
k8s.io/kubernetes/vendor/golang.org/x/exp/inotify/inotify_linux.go:267: too many errors

@mikedanese

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (17 by maintainers)

Most upvoted comments

bazel build and test on mac should work, though cross-compilation only somewhat works right now.

Ah, can we put that in docs/devel/bazel? Would have saved me some time.

On Thu, Jan 19, 2017 at 2:16 PM, Joe Finney notifications@github.com wrote:

In the meantime, we should provide a docker image that can run bazel.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kubernetes/kubernetes/issues/40161#issuecomment-273870506, or mute the thread https://github.com/notifications/unsubscribe-auth/ABG_pw5CAJ7P0TdBP43u59KLszlcW9N8ks5rT7angaJpZM4LocG8 .

In the meantime, we should provide a docker image that can run bazel.

If this is something about how cross platform dependencies are defined or executed, I’m going to post everything that fails for reference here, knowing that it’s probably a simple fix.