Closed
Description
What version of protobuf and what language are you using?
Version: v31.0 (release) and main (0b411d0)
Language: C++
What operating system (Linux, Windows, ...) and version?
OS Linux Ubuntu 24.04.2
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04.2 LTS"
What runtime / compiler are you using (e.g., python version or gcc version)
- GCC
gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- Bazelisk
Bazelisk version: v1.26.0
Build label: 8.2.1
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Thu Apr 17 18:22:55 2025 (1744914175)
Build timestamp: 1744914175
Build timestamp as int: 1744914175
What did you do?
Steps to reproduce the behavior:
- Create MODULE.bazel with content:
module(
name = "bug_report_v31",
version = "0.0.1",
)
bazel_dep(name = "protobuf", version = "31.0")
- Run the command:
bazelisk run @protobuf//:protoc
orbazel run @protobuf//:protoc
What did you expect to see
No warnings during build.
What did you see instead?
bazelisk run @protobuf//:protoc
2025/05/24 09:25:07 Downloading https://releases.bazel.build/8.2.1/release/bazel-8.2.1-linux-x86_64...
Downloading: 60 MB out of 60 MB (100%)
Extracting Bazel installation...
Starting local Bazel server (8.2.1) and connecting to it...
INFO: Analyzed target @@protobuf+//:protoc (125 packages loaded, 2483 targets configured).
INFO: From Compiling src/google/protobuf/compiler/java/internal_helpers.cc:
external/protobuf+/src/google/protobuf/compiler/java/internal_helpers.cc: In lambda function:
external/protobuf+/src/google/protobuf/compiler/java/internal_helpers.cc:180:29: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<const google::protobuf::EnumValueDescriptor*, const google::protobuf::EnumValueDescriptor*> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
180 | for (int i = 0; i < aliases.size(); i++) {
| ~~^~~~~~~~~~~~~~~~
INFO: From Compiling src/google/protobuf/compiler/java/internal_helpers.cc [for tool]:
external/protobuf+/src/google/protobuf/compiler/java/internal_helpers.cc: In lambda function:
external/protobuf+/src/google/protobuf/compiler/java/internal_helpers.cc:180:29: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<const google::protobuf::EnumValueDescriptor*, const google::protobuf::EnumValueDescriptor*> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
180 | for (int i = 0; i < aliases.size(); i++) {
| ~~^~~~~~~~~~~~~~~~
The build warns for different signedness. When using using -Werror
flag (which is common in most projects) the build fails.
Anything else we should know about your project / environment
Observe, the external/protobuf+/src/google/protobuf/compiler/java/internal_helpers.cc
file is built twice.