protocolbuffers / protocolbuffers/protobuf
Upgrading from 3.21.10 to 3.22.3 failures: missing symbol called
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 72k
- Forks
- 16.3k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 140
Description
What version of protobuf and what language are you using?
Version: 3.22.3
Language: Go
What operating system (Linux, Windows, ...) and version?
Mac OS
What runtime / compiler are you using (e.g., python version or gcc version)
Bazel
What did you do?
- Upgrade com_google_protobuf from 3.21.10 to 3.22.3 in our WORKSPACE file
- Build the protos with bazel
What did you expect to see
Success after upgrading!
What did you see instead?
Build fails generating proto bindings for timestamp_proto:
ERROR: external/com_google_protobuf/src/google/protobuf/BUILD.bazel:64:14: Generating Descriptor Set proto_library @com_google_protobuf//src/google/protobuf:timestamp_proto failed: (Aborted): protoc failed: error executing command (from target @com_google_protobuf//src/google/protobuf:timestamp_proto) <SNIP>
<SNIP> --direct_dependencies google/protobuf/timestamp.proto '--direct_dependencies_violation_msg=%s is imported, but @com_google_protobuf//src/google/protobuf:timestamp_proto doesn'\''t directly depend on a proto_library that '\''srcs'\'' it.' '--descriptor_set_out=bazel-out/darwin_arm64-fastbuild/bin/external/com_google_protobuf/src/google/protobuf/timestamp_proto-descriptor-set.proto.bin' '--proto_path=bazel-out/darwin_arm64-fastbuild/bin/external/com_google_protobuf/src/google/protobuf/_virtual_imports/timestamp_proto' '-Igoogle/protobuf/timestamp.proto=bazel-out/darwin_arm64-fastbuild/bin/external/com_google_protobuf/src/google/protobuf/_virtual_imports/timestamp_proto/google/protobuf/timestamp.proto' bazel-out/darwin_arm64-fastbuild/bin/external/com_google_protobuf/src/google/protobuf/_virtual_imports/timestamp_proto/google/protobuf/timestamp.proto)
# Execution platform: @local_config_platform//:host
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
dyld[57868]: missing symbol called
Note: in addition to the timestamp proto, which I actually depend on, other protos suffer the same fate. The failed proto changes randomly every build. @com_google_protobuf//src/google/protobuf:wrappers_proto, for example, hits the same issue, but it's not a dependency of any of my rules.
Environment
Rules:
proto_library(
name = "my_proto",
srcs = [
"my_proto.proto",
"my_proto_other.proto",
],
)
go_proto_library(
name = "my_go_proto",
# io_bazel_rules version v0.39.1 and rules_proto-5.3.0-21.7
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "github.com/example_repo/go/proto/package",
proto = ":my_proto",
)
proto:
syntax = "proto3";
package proto;
import "google/protobuf/timestamp.proto";
option go_package = "github.com/example_repo/go/proto/package";
message SomeMessage {
google.protobuf.Timestamp ts = 2;
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the upgrade from protobuf 3.21.10 to 3.22.3 using the WORKSPACE and BUILD.bazel setup, then run the Bazel proto generation that fails for timestamp_proto or another affected proto. Compare the protoc invocation and failure under the two versions; done means the Go proto build completes reliably without the dyld missing-symbol error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100