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

fix: Upgrade protobuf from 21.7 to 23.1/24.4 #1833

Closed
wants to merge 6 commits into from

Conversation

comius
Copy link
Contributor

@comius comius commented Apr 5, 2024

The older protobuf version (21.7) is still using legacy struct providers. If used rules_python will fail after the default of --incompatible_disallow_struct_provider_syntax is changed.

Only 23.1 is on BCR (that's why using this version in MODULE.bazel).
Unpatched 23.1 fails with no such attribute 'exec_tools' in 'genrule' rule.
Protobuf v24.4 and 25.3. fails on Windows.
That's why using 26.1

Issue: bazelbuild/bazel#19467

@comius comius requested a review from rickeylev as a code owner April 5, 2024 09:23
@comius comius changed the title fix: Upgrade protobuf from 21.7 to 23.1 fix: Upgrade protobuf from 21.7 to 23.1/24.4 Apr 5, 2024
@comius comius marked this pull request as draft April 5, 2024 11:40
@comius
Copy link
Contributor Author

comius commented Apr 5, 2024

cc @haberman, @mkruskal-google, on Windows platform protoc fails to build. I tried versions 24.4, 25.3, 26.1.

Bazel version 7.1.1 without bzlmod

(version 23.1 with bzlmod works, but only because of a patch in https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/protobuf/23.1/patches/0007-bazel-Get-rid-of-exec_tools.-13401.patch

failures are:

(10:32:00) ERROR: C:/b/y5tfdgmr/external/com_google_protobuf/src/google/protobuf/compiler/BUILD.bazel:97:11: Compiling src/google/protobuf/compiler/command_line_interface.cc [for tool] failed: (Exit 2): cl.exe failed: error executing CppCompile command (from target @@com_google_protobuf//src/google/protobuf/compiler:command_line_interface)

external/com_google_protobuf/src/google/protobuf/compiler/command_line_interface.cc(12): fatal error C1083: Cannot open include file: 'google/protobuf/compiler/command_line_interface.h': No such file or directory

(10:32:00) ERROR: C:/b/y5tfdgmr/external/com_google_protobuf/src/google/protobuf/compiler/csharp/BUILD.bazel:22:11: Compiling src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc [for tool] failed: (Exit 2): cl.exe failed: error executing CppCompile command (from target @@com_google_protobuf//src/google/protobuf/compiler/csharp:csharp)

external/com_google_protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc(8): fatal error C1083: Cannot open include file: 'google/protobuf/compiler/csharp/csharp_source_generator_base.h': No such file or directory

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

Successfully merging this pull request may close these issues.

1 participant