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

Can't build grpc master using bazel 7.0.0 #19938

Closed
Dandi007 opened this issue Oct 25, 2023 · 3 comments
Closed

Can't build grpc master using bazel 7.0.0 #19938

Dandi007 opened this issue Oct 25, 2023 · 3 comments
Labels

Comments

@Dandi007
Copy link

Description of the bug:

can't build grpc example using bazel version 7.0.0

➜ grpc git:(master) /usr/local/bin/bazel-7.0.0 build //examples/protos:all
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
WARNING: Download from https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
DEBUG: Rule 'com_github_jupp0r_prometheus_cpp' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "cdf03ee63fcb1d9e113f7bd525e043c254729dddf19d80396489f5b92c83c18d"
DEBUG: Repository com_github_jupp0r_prometheus_cpp instantiated at:
/home/tusen/code/grpc/WORKSPACE:5:10: in
/home/tusen/code/grpc/bazel/grpc_deps.bzl:501:21: in grpc_deps
Repository rule http_archive defined at:
/home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/bazel_tools/tools/build_defs/repo/http.bzl:379:31: in
ERROR: Traceback (most recent call last):
File "/home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/internal/rule_support.bzl", line 221, column 36, in
deps_cfg = apple_common.multi_arch_split,
Error: 'apple_common' value has no field or method 'multi_arch_split'
INFO: Repository rules_proto instantiated at:
/home/tusen/code/grpc/WORKSPACE:11:16: in
/home/tusen/code/grpc/bazel/grpc_extra_deps.bzl:50:18: in grpc_extra_deps
/home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/com_google_protobuf/protobuf_deps.bzl:93:24: in protobuf_deps
/home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/com_google_protobuf/protobuf_deps.bzl:22:17: in _github_archive
Repository rule http_archive defined at:
/home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/bazel_tools/tools/build_defs/repo/http.bzl:379:31: in
WARNING: Target pattern parsing failed.
ERROR: Skipping '//examples/protos:all': while parsing '//examples/protos:all': error loading package 'examples/protos': at /home/tusen/code/grpc/bazel/grpc_build_system.bzl:35:6: at /home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/ios.bzl:26:5: at /home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/internal/testing/ios_rules.bzl:22:5: at /home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/internal/testing/apple_test_bundle_support.bzl:67:5: initialization of module 'apple/internal/rule_support.bzl' failed
ERROR: while parsing '//examples/protos:all': error loading package 'examples/protos': at /home/tusen/code/grpc/bazel/grpc_build_system.bzl:35:6: at /home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/ios.bzl:26:5: at /home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/internal/testing/ios_rules.bzl:22:5: at /home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/internal/testing/apple_test_bundle_support.bzl:67:5: initialization of module 'apple/internal/rule_support.bzl' failed
INFO: Elapsed time: 17.900s
INFO: 0 processes.
ERROR: Build did NOT complete successfully

Which category does this issue belong to?

C++/Objective-C Rules

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

  • cloen grpc master code
  • check commit 66d928c44043bdf24dd7ba157f35c0b65748ba54
  • build example code using bazel v7.0.0
git clone https://github.com/grpc/grpc.git
cd grpc
git reset 66d928c44043bdf24dd7ba157f35c0b65748ba54 --hard
bazel build //examples/protos:all

Which operating system are you running Bazel on?

ubuntu 20.04

What is the output of bazel info release?

release 7.0.0-pre.20231011.2

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

https://github.com/grpc/grpc.git
66d928c44043bdf24dd7ba157f35c0b65748ba54
66d928c44043bdf24dd7ba157f35c0b65748ba54

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

➜ grpc git:(master) /usr/local/bin/bazel-7.0.0 build //examples/protos:all
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
WARNING: Download from https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
DEBUG: Rule 'com_github_jupp0r_prometheus_cpp' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "cdf03ee63fcb1d9e113f7bd525e043c254729dddf19d80396489f5b92c83c18d"
DEBUG: Repository com_github_jupp0r_prometheus_cpp instantiated at:
/home/tusen/code/grpc/WORKSPACE:5:10: in
/home/tusen/code/grpc/bazel/grpc_deps.bzl:501:21: in grpc_deps
Repository rule http_archive defined at:
/home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/bazel_tools/tools/build_defs/repo/http.bzl:379:31: in
ERROR: Traceback (most recent call last):
File "/home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/internal/rule_support.bzl", line 221, column 36, in
deps_cfg = apple_common.multi_arch_split,
Error: 'apple_common' value has no field or method 'multi_arch_split'
INFO: Repository rules_proto instantiated at:
/home/tusen/code/grpc/WORKSPACE:11:16: in
/home/tusen/code/grpc/bazel/grpc_extra_deps.bzl:50:18: in grpc_extra_deps
/home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/com_google_protobuf/protobuf_deps.bzl:93:24: in protobuf_deps
/home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/com_google_protobuf/protobuf_deps.bzl:22:17: in _github_archive
Repository rule http_archive defined at:
/home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/bazel_tools/tools/build_defs/repo/http.bzl:379:31: in
WARNING: Target pattern parsing failed.
ERROR: Skipping '//examples/protos:all': while parsing '//examples/protos:all': error loading package 'examples/protos': at /home/tusen/code/grpc/bazel/grpc_build_system.bzl:35:6: at /home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/ios.bzl:26:5: at /home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/internal/testing/ios_rules.bzl:22:5: at /home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/internal/testing/apple_test_bundle_support.bzl:67:5: initialization of module 'apple/internal/rule_support.bzl' failed
ERROR: while parsing '//examples/protos:all': error loading package 'examples/protos': at /home/tusen/code/grpc/bazel/grpc_build_system.bzl:35:6: at /home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/ios.bzl:26:5: at /home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/internal/testing/ios_rules.bzl:22:5: at /home/tusen/.cache/bazel/_bazel_tusen/2ccd0537f49d4d76ef4487578b783242/external/build_bazel_rules_apple/apple/internal/testing/apple_test_bundle_support.bzl:67:5: initialization of module 'apple/internal/rule_support.bzl' failed
INFO: Elapsed time: 17.900s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
Loading: 1 packages loaded
currently loading: examples/protos
Fetching https://github.com/bazelbuild/rules_proto/archive/f7a30f6f80006b591fa7c437fe5a951eb10bcbcf.zip

@keith
Copy link
Member

keith commented Oct 25, 2023

grpc needs to update the rules_apple dep. bazel removed that API at some point and we had to release new versions of rules_apple to fix it

@Pavank1992 Pavank1992 added the team-Rules-CPP Issues for C++ rules label Oct 25, 2023
@AustinSchuh
Copy link
Contributor

Closing the loop: grpc/grpc#34791

@comius
Copy link
Contributor

comius commented Nov 27, 2023

The issue is grpc related (not Bazel or C++).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants