bazel: Missing files from embedded_tools

This issue was discovered in tensorflow/tensorflow#4285

The non-GPU TF CI builds with that PR are failing consistently with messages similar to the following:

ERROR: package contains errors: bazel-ci_build-cache/.cache/bazel/_bazel_jenkins/install/2ed8c6c819c55073ad03a9309500f9b2/_embedded_binaries/embedded_tools/src/main/protobuf.
ERROR: error loading package 'bazel-ci_build-cache/.cache/bazel/_bazel_jenkins/install/2ed8c6c819c55073ad03a9309500f9b2/_embedded_binaries/embedded_tools/src/main/protobuf': Extension file not found. Unable to load package for '//tools/build_rules:genproto.bzl': BUILD file not found on package path.

The error occurs when running bazel fetch //... after running bazel clean --expunge.

It appears that this error is caused by files, namely .bzl files under //tools/build_rules that are missing in embedded_tools. This can be reproduced by running the following:

❯❯❯ bazel fetch @bazel_tools//...
Extracting Bazel installation...
..
ERROR: package contains errors: third_party/jformatstring.
ERROR: error loading package '@bazel_tools//third_party/jformatstring': Extension file not found. Unable to load file '@bazel_tools//tools/build_rules:java_rules_skylark.bzl': file doesn't exist or isn't a file.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 24 (20 by maintainers)

Commits related to this issue

Most upvoted comments

Same Error, How to solve this? need internal bazel extension ,

ERROR: error loading package ‘sms/server’: Extension file not found. Unable to load package for ‘@bazel_tools//tools/build_defs/docker:docker.bzl’: BUILD file not found on package path ERROR: error loading package ‘sms/server’: Extension file not found. Unable to load package for ‘@bazel_tools//tools/build_defs/docker:docker.bzl’: BUILD file not found on package path