Skip to content

Bazel HEAD breaks Tensorflow and tensorflow/serving. #4652

Closed

Description

@buchgr

This error only happens with Bazel from head (2a2aa7a). 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?

Activity

  1. added
    P1
    on Feb 18, 2018
  2. changed the title [-]Bazel head breaks tensorflow and tensorflow serving.[/-] [+]Bazel HEAD breaks Tensorflow and tensorflow/serving.[/+] on Feb 18, 2018
  3. gregestren commented on Feb 20, 2018

    @gregestren
    Contributor

    I don't know specifically what's going on, but since @jpeg//:k8 and @jpeg//:armeabi-v7a trigger on --cpu and --android_cpu respectively, it's perfectly easy to trigger both at the same time, producing the above error:

    $ bazel build //foo --cpu=k8 --android_cpu=armeabi-v7a
    

    As for why this only affects Bazel at head, this could easily be related to changes in Android rule configuration transition logic. Will dig in more...

  4. katre commented on Feb 20, 2018

    @katre
    Collaborator

    Marking as a release blocker while @gregestren checks for the root cause. Might need to cherry-pick this into #3959.

  5. gregestren commented on Feb 20, 2018

    @gregestren
    Contributor

    This is due to fc30733, which changes the default value of --android_cpu to armeabi-v7a.

    @katre found a minimal repro:

    $ bazel_at_head build --nobuild @jpeg//:jpeg
    

    @buchgr: how important is it that @jpeg://armeabi-v7a triggers on android_cpu? The relationship between android_cpu and cpu is subtle and confusing, but most of the time when you want to trigger an architecture-dependent library you're better off using cpu.

    Is there someone on Tensorflow who can consider this?

  6. 7 remaining items

  7. reopened this on Mar 7, 2018
  8. meteorcloudy commented on Mar 20, 2018

    @meteorcloudy
    Member

    @xingao267 Are you building TensorFlow@HEAD, tensorflow/tensorflow#17508 should have fixed the problem.

  9. xingao267 commented on Mar 20, 2018

    @xingao267
    Contributor

    @meteorcloudy Thanks for the pointer. Indeed, we are building TF at a commit before the fix.

  10. reopened this on Mar 26, 2018
  11. meteorcloudy commented on Mar 27, 2018

    @meteorcloudy
    Member

    Sure, filed an issue to TensorFlow_serving, following up at tensorflow/serving#825

  12. Bardo91 commented on Apr 23, 2018

    @Bardo91

    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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1breakage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions