Skip to content

Support building tensorboard with bazel 5.0.0+. #5513

@bmd3k

Description

@bmd3k

Attempting to build tensorboard with bazel 5.0.0 or more recent fails.

$ bazel --version
bazel 5.0.0

$ bazel test --test_output=errors //tensorboard/...
Starting local Bazel server and connecting to it...
ERROR: Traceback (most recent call last):
	File "/usr/local/google/home/bdubois/.cache/bazel/_bazel_bdubois/079646a57be11faea0b2bfefccb2a81a/external/build_bazel_rules_apple/apple/internal/ios_rules.bzl", line 541, column 58, in <toplevel>
		ios_application = rule_factory.create_apple_bundling_rule(
	File "/usr/local/google/home/bdubois/.cache/bazel/_bazel_bdubois/079646a57be11faea0b2bfefccb2a81a/external/build_bazel_rules_apple/apple/internal/rule_factory.bzl", line 955, column 55, in _create_apple_bundling_rule
		rule_attrs.append(_common_binary_linking_attrs(rule_descriptor))
	File "/usr/local/google/home/bdubois/.cache/bazel/_bazel_bdubois/079646a57be11faea0b2bfefccb2a81a/external/build_bazel_rules_apple/apple/internal/rule_factory.bzl", line 233, column 21, in _common_binary_linking_attrs
		apple_common.objc_proto_aspect,
Error: 'apple_common' value has no field or method 'objc_proto_aspect'

Likely we are running into bazelbuild/bazel#13811 and need to ensure we are depending on a more recent version of rules_apple.

FWIW I added an explicit dependency on rules_apple in our own WORKSPACE file and it resolved the problem:

http_archive(
  name = "build_bazel_rules_apple",
  sha256 = "0052d452af7742c8f3a4e0929763388a66403de363775db7e90adecb2ba4944b",
  urls = [
      "http://mirror.tensorflow.org/github.com/bazelbuild/rules_apple/releases/download/0.31.3/rules_apple.0.31.3.tar.gz",
      "https://github.com/bazelbuild/rules_apple/releases/download/0.31.3/rules_apple.0.31.3.tar.gz",
  ],
)

But that just seems like a workaround.

@nfelt believes we are bringing in rules_apple transitively via tensorflow and we should update the org_tensorflow target in the WORKSPACE file to use a more recent version (or get rid of the dependency on org_tensorflow entirely).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions