Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erro when build with build Bazel 4.0.0: "ERROR: cc_toolchain does not have mandatory provider 'ProtoInfo'. " #665

Closed
owent opened this issue Apr 8, 2021 · 3 comments
Labels
bug Something isn't working Stale

Comments

@owent
Copy link
Member

owent commented Apr 8, 2021

Describe your environment

OS: Windows
Bazel version: 4.0.0
Branch: main/85d306f124b95c6935ecbd7c0f9e5662f76b9c21

Steps to reproduce

bazel build -- //... //api/test/... //sdk/test/...

What is the expected behavior?

Build completed successfully

What is the actual behavior?

ERROR: C:/users/owent/_bazel_owent/dldhg2d7/external/com_google_protobuf/BUILD:1006:21: in proto_lang_toolchain rule @com_google_protobuf//:cc_toolchain: '@com_google_protobuf//:cc_toolchain' does not have mandatory provider 'ProtoInfo'.
ERROR: Analysis of target '//exporters/otlp:recordable_test' failed; build aborted: Analysis of target '@com_google_protobuf//:cc_toolchain' failed
INFO: Elapsed time: 26.557s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (12 packages loaded, 1930 targets configured)
    Fetching @zlib; fetching
    Fetching C:/users/owent/_bazel_owent/dldhg2d7/external/zlib; Extracting C:/users/owent/_bazel_owent/dldhg2d7/external/zlib/temp6152700889165709447/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz
    Fetching @com_github_cares_cares; fetching
    Fetching C:/users/owent/_bazel_owent/dldhg2d7/external/com_github_cares_cares; Extracting C:/users/owent/_bazel_owent/dldhg2d7/external/com_github_cares_cares/temp2392465294235958141/e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz
    Fetching @com_google_absl; fetching
    Fetching @boringssl; fetching

Additional context

bazelbuild/bazel#12887 and bazelbuild/bazel#11694 may be helpful for this problem.
It works again after I upgrade gRPC to 1.36.4(gRPC 1.32.0 is the first version to use protobuf 3.13.0 or upper) and remove load("@upb//bazel:build_defs.bzl", "bazel_version_repository") and bazel_version_repository(name = "upb_bazel_version") from the WORKSPACE .
I'm not sure if I should create a PR to update gRPC and remove upb?

@owent owent added the bug Something isn't working label Apr 8, 2021
@lalitb
Copy link
Member

lalitb commented Apr 8, 2021

Thanks for reporting the issue. It's definitely good to upgrade to newer grpc version. The earlier used version 1.28.0 is one year old. Also, would be good idea to test against same grpc version for both cmake and bazel:

https://github.com/open-telemetry/opentelemetry-cpp/blob/main/ci/setup_grpc.sh#L13

cc @jsuereth

@owent owent mentioned this issue Apr 8, 2021
3 tasks
owent added a commit to owent/opentelemetry-cpp that referenced this issue Apr 17, 2021
@lalitb lalitb added this to the 1.0.0 GA milestone Jun 29, 2021
@reyang reyang removed this from the 1.0.0 milestone Sep 23, 2021
@github-actions
Copy link

This issue was marked as stale due to lack of activity. It will be closed in 7 days if no furthur activity occurs.

@github-actions github-actions bot added the Stale label Nov 23, 2021
@lalitb
Copy link
Member

lalitb commented Nov 23, 2021

closing as we have upgraded both bazel and gRPC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants