bazel: Bazel HEAD breaks Tensorflow and tensorflow/serving.

This error only happens with Bazel from head (2a2aa7ab31367da47f8449059fdfcddfba3a20f1). Works with 10.1.

ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/e276c88c2550e615b3487b1506ef1c36/external/jpeg/BUILD:126:12: Illegal ambiguous match on configurable attribute "deps" in @jpeg//:jpeg:
--
  | [2018-02-18T17:53:11Z] @jpeg//:armeabi-v7a
  | [2018-02-18T17:53:11Z] @jpeg//:k8
  | [2018-02-18T17:53:11Z] Multiple matches are not allowed unless one is unambiguously more specialized.

See https://buildkite.com/bazel/bazel-downstream/builds/84#b82d6d34-8932-40cf-8b71-5ca793480f2f

@vladmos @laurentlb @dslomov any thoughts?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (14 by maintainers)

Most upvoted comments

O had the same problem while compiling TF as a shared library: bazel build //tensorflow:libtensorflow.so --cpu=k8

WARNING: /home/bardo91/.cache/bazel/_bazel_bardo91/650966360851c5a6b9fcb8e658f1efec/external/protobuf_archive/WORKSPACE:1: Workspace name in /home/bardo91/.cache/bazel/_bazel_bardo91/650966360851c5a6b9fcb8e658f1efec/external/protobuf_archive/WORKSPACE (@com_google_protobuf) does not match the name given in the repository's definition (@protobuf_archive); this will cause a build error in future versions
ERROR: /home/bardo91/.cache/bazel/_bazel_bardo91/650966360851c5a6b9fcb8e658f1efec/external/jpeg/BUILD:415:11: Illegal ambiguous match on configurable attribute "cmd" in @jpeg//:configure:
@jpeg//:k8
@jpeg//:armeabi-v7a
Multiple matches are not allowed unless one is unambiguously more specialized.
ERROR: Analysis of target '//tensorflow:libtensorflow.so' failed; build aborted: 

/home/bardo91/.cache/bazel/_bazel_bardo91/650966360851c5a6b9fcb8e658f1efec/external/jpeg/BUILD:415:11: Illegal ambiguous match on configurable attribute "cmd" in @jpeg//:configure:
@jpeg//:k8
@jpeg//:armeabi-v7a
Multiple matches are not allowed unless one is unambiguously more specialized.
INFO: Elapsed time: 0.926s
FAILED: Build did NOT complete successfully (25 packages loaded)

I removed all the references of “armeabi-v7a” in the file thirdparty/jpeg/jpeg.BUILD and now it seems to work, but I am not quite sure how bazel works. Is it a bug?