--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/b34ad96a-710e-406f-9ea4-d7081395b491n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/e3e21657-8d30-4684-9230-25546b58472fn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/6ca44ad2-b49a-425e-8fb5-368c79b78f1fn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/9d148829-dce3-4158-9926-afe6ed3a7034n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/9d148829-dce3-4158-9926-afe6ed3a7034n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/d5d41b7f-4242-47a3-8444-d9ca79defe1fn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/bfc73f0f-b3e0-4dc4-ab89-0478dc64df34n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/d4319b0d-5db9-49a4-a144-afd91ee0802cn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/ce1d085c-6634-4be7-bedb-44de7abae970n%40googlegroups.com.
Declare a repository for prebuilt protoc compiler in WORKSPACE (I use linux_x86_64):
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "com_google_protobuf_protoc_linux_x86_64", build_file_content = 'exports_files(["bin/protoc"])', sha256 = "179a759581bf4b32cc5edae4ffce6b8ee16ba4f4ab99ad3a309c31113f98d472", urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v23.2/protoc-23.2-linux-x86_64.zip"], )Then you can run normal build command with --proto_compiler=@com_google_protobuf_protoc_linux_x86_64//:bin/protoc:
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/1794357d-4d47-488c-9260-6ea92d92998dn%40googlegroups.com.
bazel build --proto_compiler=@com_google_protobuf_protoc_osx_aarch_64//:bin/protoc //proto/...
INFO: Analyzed 18 targets (190 packages loaded, 13225 targets configured).
INFO: From Compiling src/google/protobuf/message_lite.cc [for tool]:
external/com_google_protobuf/src/google/protobuf/message_lite.cc:69:62: warning: 'ByteSize' is deprecated: Please use ByteSizeLong() instead [-Wdeprecated-declarations]
if (PROTOBUF_PREDICT_FALSE(cached_size == nullptr)) return ByteSize();
^
bazel-out/darwin_arm64-opt-exec-ST-13d3ddad9198/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/protobuf_lite/google/protobuf/message_lite.h:454:5: note: 'ByteSize' has been explicitly marked deprecated here
[[deprecated("Please use ByteSizeLong() instead")]] int ByteSize() const {
^
1 warning generated.
INFO: From Linking external/com_google_protobuf/src/google/protobuf/io/libio_win32.a [for tool]:
warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: bazel-out/darwin_arm64-opt-exec-ST-13d3ddad9198/bin/external/com_google_protobuf/src/google/protobuf/io/libio_win32.a the table of contents is empty (no object file members in the library define global symbols)
INFO: From Linking external/com_google_protobuf/protoc [for tool]:
ld: warning: ignoring duplicate libraries: '-lm', '-lpthread'
INFO: From ProtoCompile external/com_google_protobuf/python/google/protobuf/timestamp_pb2.py:
external/com_google_protobuf/.: warning: directory does not exist.
INFO: From ProtoCompile external/com_google_protobuf/python/google/protobuf/any_pb2.py:
external/com_google_protobuf/.: warning: directory does not exist.
INFO: From ProtoCompile external/com_google_protobuf/python/google/protobuf/source_context_pb2.py:
external/com_google_protobuf/.: warning: directory does not exist.
INFO: From ProtoCompile external/com_google_protobuf/python/google/protobuf/field_mask_pb2.py:
external/com_google_protobuf/.: warning: directory does not exist.
INFO: From ProtoCompile external/com_google_protobuf/python/google/protobuf/type_pb2.py:
external/com_google_protobuf/.: warning: directory does not exist.
INFO: From ProtoCompile external/com_google_protobuf/python/google/protobuf/struct_pb2.py:
external/com_google_protobuf/.: warning: directory does not exist.
INFO: From ProtoCompile external/com_google_protobuf/python/google/protobuf/empty_pb2.py:
external/com_google_protobuf/.: warning: directory does not exist.
INFO: From ProtoCompile external/com_google_protobuf/python/google/protobuf/api_pb2.py:
external/com_google_protobuf/.: warning: directory does not exist.
INFO: From ProtoCompile external/com_google_protobuf/python/google/protobuf/duration_pb2.py:
external/com_google_protobuf/.: warning: directory does not exist.
INFO: From ProtoCompile external/com_google_protobuf/python/google/protobuf/wrappers_pb2.py:
external/com_google_protobuf/.: warning: directory does not exist.
INFO: From ProtoCompile external/com_google_protobuf/python/google/protobuf/compiler/plugin_pb2.py:
external/com_google_protobuf/.: warning: directory does not exist.
INFO: From ProtoCompile external/com_google_protobuf/python/google/protobuf/descriptor_pb2.py:
external/com_google_protobuf/.: warning: directory does not exist.
INFO: Found 18 targets...
INFO: Elapsed time: 49.644s, Critical Path: 19.43s
INFO: 815 processes: 307 internal, 508 darwin-sandbox.
INFO: Build completed successfully, 815 total actions
```
Without, the prebuilt library.