You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR: Analysis of target '//src:perf_to_profile' failed; build aborted: error loading package '@com_google_protobuf//': Unable to find package for @rules_java//java:defs.bzl: The repository '@rules_java' could not be resolved.
#101
Open
maxsei opened this issue
Jul 12, 2021
· 4 comments
Not experienced enough how bazel build system works. I am running into this issue when building.
$ bazel build src:perf_to_profile
ERROR: /home/mschulte/.local/opt/perf_data_converter/src/quipper/BUILD:25:1: every rule of type proto_library implicitly depends upon the target '@com_google_protobuf//:protoc', but this target could not be found because of: error loading package '@com_google_protobuf//': Unable to find package for @rules_java//java:defs.bzl: The repository '@rules_java' could not be resolved.
ERROR: Analysis of target '//src:perf_to_profile' failed; build aborted: error loading package '@com_google_protobuf//': Unable to find package for @rules_java//java:defs.bzl: The repository '@rules_java' could not be resolved.
INFO: Elapsed time: 0.105s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 21 targets configured)
currently loading: @com_google_protobuf//
Here is some potentially useful information about my system that the issue could depend on
I haven't seen that class of error for @rules_java before, and can't find record of anyone else running into it other than a brief mention in this random Eclipse commit from 2 years ago.
The problem shouldn't be related to perf_data_converter itself (if you wanted to look into it further, I'd recommend looking at what changes got into protobuf around that time). It could have been transient unavailability, or an actual bug introduced in a workspace file somewhere.
If you can still reproduce this from top of tree then I'll give it another look, but I'd wager this has resolved itself.
I'll look that this soon. It was more a curiosity for me rather than anything super critical. If I can help understand this problem I'm glad to. I'll need a few days.
I just wanted to reply that it seems like this is a issue caused by google protobuf moving from 3.19.x to 4.0 . This caused some sort of incompatibility with how dependencies are automatically pulled.
It can be worked around by linking against the older versions of the protobuf repo in perf_data_converter/WORKSPACE and replacing
http_archive(
name = "com_google_protobuf",
urls = ["https://codeload.github.com/protocolbuffers/protobuf/zip/master"],
strip_prefix = "protobuf-master",
type = "zip",
)
with
http_archive(
name = "com_google_protobuf",
urls = ["https://codeload.github.com/protocolbuffers/protobuf/zip/3.19.x"],
strip_prefix = "protobuf-3.19.x",
type = "zip",
)
Not experienced enough how bazel build system works. I am running into this issue when building.
Here is some potentially useful information about my system that the issue could depend on
The text was updated successfully, but these errors were encountered: