tensorflow / tensorboard-plugin-example

Apache License 2.0
135 stars 59 forks source link

Build error from protobuf #21

Closed andrewzu closed 6 years ago

andrewzu commented 6 years ago

I followed the instruction to build greeter_demo plugin with tensorflow 1.3, but got the following error:

> bazel run //greeter_tensorboard -- --logdir=/tmp/greeter_demo

ERROR: /home/azu/.cache/bazel/_bazel_azu/2c2e05c7e0af9083f364e8b3ed70878a/external/protobuf/BUILD:460:1: Traceback (most recent call last):
        File "/home/azu/.cache/bazel/_bazel_azu/2c2e05c7e0af9083f364e8b3ed70878a/external/protobuf/BUILD", line 460
                cc_proto_library(name = "cc_test_protos", srcs = (L...), <4 more arguments>)
        File "/home/azu/.cache/bazel/_bazel_azu/2c2e05c7e0af9083f364e8b3ed70878a/external/protobuf/protobuf.bzl", line 248, in cc_proto_library
                cc_libs += [default_runtime]
trying to mutate a frozen object
ERROR: /home/azu/.cache/bazel/_bazel_azu/2c2e05c7e0af9083f364e8b3ed70878a/external/protobuf/BUILD:761:1: Traceback (most recent call last):
        File "/home/azu/.cache/bazel/_bazel_azu/2c2e05c7e0af9083f364e8b3ed70878a/external/protobuf/BUILD", line 761
                py_proto_library(name = "python_specific_test_pro...", <6 more arguments>)
        File "/home/azu/.cache/bazel/_bazel_azu/2c2e05c7e0af9083f364e8b3ed70878a/external/protobuf/protobuf.bzl", line 374, in py_proto_library
                py_libs += [default_runtime]
trying to mutate a frozen object
ERROR: /home/azu/.cache/bazel/_bazel_azu/2c2e05c7e0af9083f364e8b3ed70878a/external/protobuf/BUILD:387:1: Target '@protobuf//:android' contains an error and its package is in error and referenced by '@protobuf//:protoc'
ERROR: /home/azu/.cache/bazel/_bazel_azu/2c2e05c7e0af9083f364e8b3ed70878a/external/org_tensorflow_tensorboard/tensorboard/plugins/scalar/BUILD:97:1: Target '@protobuf//:protobuf_python_genproto' contains an error and its package is in error and referenced by '@org_tensorflow_tensorboard//tensorboard/plugins/scalar:protos_all_py_pb2_genproto'
ERROR: /home/azu/.cache/bazel/_bazel_azu/2c2e05c7e0af9083f364e8b3ed70878a/external/org_tensorflow_tensorboard/tensorboard/plugins/scalar/BUILD:97:1: Target '@protobuf//:protoc' contains an error and its package is in error and referenced by '@org_tensorflow_tensorboard//tensorboard/plugins/scalar:protos_all_py_pb2_genproto'
ERROR: /home/azu/.cache/bazel/_bazel_azu/2c2e05c7e0af9083f364e8b3ed70878a/external/org_tensorflow_tensorboard/tensorboard/plugins/scalar/BUILD:97:1: Target '@protobuf//:protobuf_python' contains an error and its package is in error and referenced by '@org_tensorflow_tensorboard//tensorboard/plugins/scalar:protos_all_py_pb2'
ERROR: Analysis of target '//greeter_tensorboard:greeter_tensorboard' failed; build aborted: Loading failed
INFO: Elapsed time: 1.078s
FAILED: Build did NOT complete successfully (29 packages loaded)
ERROR: Build failed. Not running target
theyiwenliu commented 6 years ago

@andrewzu May I know your bazel version? I had same issue when running this command. Bazel: 0.10.1-homebrew TensorFlow: 1.4.1

andrewzu commented 6 years ago

@theyiwenliu I was using bazel 0.10.0 version

theyiwenliu commented 6 years ago

Same issue with Bazel 0.11.0 which was released 4 days ago.

FYI Bazel version comparison still fails with 0.11.0. Current Bazel version is 0.11.0, expected at least 0.5.4 Again I had to do some hack for _check_bazel_version...

theyiwenliu commented 6 years ago

@andrewzu You might want to install Bazel 0.5.4, that works for me.

chihuahua commented 6 years ago

Fixed by #23.