Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Analyzing: 23 targets (1 packages loaded)
Analyzing: 23 targets (1 packages loaded, 0 targets configured)
Analyzing: 23 targets (34 packages loaded, 36 targets configured)
ERROR: Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/41bc40a3bd5fcb088ad6274fd8e222db/external/build_bazel_rules_apple/apple/internal/testing/ios_rules.bzl", line 62, column 61, in <toplevel>
ios_ui_test_bundle = rule_factory.create_apple_bundling_rule(
File "/root/.cache/bazel/_bazel_root/41bc40a3bd5fcb088ad6274fd8e222db/external/build_bazel_rules_apple/apple/internal/rule_factory.bzl", line 904, column 55, in _create_apple_bundling_rule
rule_attrs.append(_common_binary_linking_attrs(rule_descriptor))
File "/root/.cache/bazel/_bazel_root/41bc40a3bd5fcb088ad6274fd8e222db/external/build_bazel_rules_apple/apple/internal/rule_factory.bzl", line 218, column 21, in _common_binary_linking_attrs
apple_common.objc_proto_aspect,
Error: 'apple_common' value has no field or method 'objc_proto_aspect'
INFO: Repository go_sdk instantiated at:
/distbench/WORKSPACE.bazel:37:16: in <toplevel>
/root/.cache/bazel/_bazel_root/41bc40a3bd5fcb088ad6274fd8e222db/external/com_github_grpc_grpc/bazel/grpc_extra_deps.bzl:50:27: in grpc_extra_deps
/root/.cache/bazel/_bazel_root/41bc40a3bd5fcb088ad6274fd8e222db/external/io_bazel_rules_go/go/private/sdk.bzl:268:28: in go_register_toolchains
/root/.cache/bazel/_bazel_root/41bc40a3bd5fcb088ad6274fd8e222db/external/io_bazel_rules_go/go/private/sdk.bzl:92:21: in go_download_sdk
Repository rule _go_download_sdk defined at:
/root/.cache/bazel/_bazel_root/41bc40a3bd5fcb088ad6274fd8e222db/external/io_bazel_rules_go/go/private/sdk.bzl:79:35: in <toplevel>
ERROR: /distbench/BUILD:191:16: error loading package '@com_github_grpc_grpc//src/compiler': at /root/.cache/bazel/_bazel_root/41bc40a3bd5fcb088ad6274fd8e222db/external/com_github_grpc_grpc/bazel/grpc_build_system.bzl:29:6: at /root/.cache/bazel/_bazel_root/41bc40a3bd5fcb088ad6274fd8e222db/external/build_bazel_rules_apple/apple/ios.bzl:22:5: initialization of module 'apple/internal/testing/ios_rules.bzl' failed and referenced by '//:_distbench_cc_grpc_proto_grpc_codegen'
ERROR: Analysis of target '//:_distbench_cc_grpc_proto_grpc_codegen' failed; build aborted: Analysis failed
INFO: Elapsed time: 26.284s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (34 packages loaded, 36 targets configured)
FAILED: Build did NOT complete successfully (34 packages loaded, 36 targets configured)
diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel
index d35ccd8..3d919e5 100644
--- a/WORKSPACE.bazel
+++ b/WORKSPACE.bazel
@@ -16,13 +16,20 @@ rules_proto_toolchains()
##### gRPC Rules for Bazel
http_archive(
- name = "com_github_grpc_grpc",
+ name = "com_github_grpc_grpc2",
sha256 = "bba65891b8c8eaea9f10b0ccccb4b6173590aee36937f5b52e8665720bcaa4c1",
urls = [
"https://github.com/grpc/grpc/archive/b0f37a22bbae12a4b225a88be6d18d5e41dce881.tar.gz", # Release 1.43
],
strip_prefix = "grpc-b0f37a22bbae12a4b225a88be6d18d5e41dce881",
)
+
+new_local_repository(
+ name = "com_github_grpc_grpc",
+ path = "/custom-grpc",
+ build_file = "BUILD",
+)
+
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()
It seems to me like an Apple specific build, since I'm only interested in a Linux-only build, is there a way to overcome this?
FROM archlinux
RUN pacman -Syu --noconfirm bazel git gcc which python
RUN git clone https://github.com/google/distbench.git
WORKDIR distbench
# Build
COPY custom-grpc /custom-grpc
COPY workspace.diff /
# Apply patches
RUN git apply /workspace.diff
RUN bazel build :all
Thanks in advance for your help.