build(deps): Align protobuf and related dependencies with the gRPC v1.81.1 bump - #908
Conversation
The protobuf bundled with gRPC v1.81.1 (v33.5) installs utf8_range as a separate CMake package and protobuf-config.cmake references the utf8_range::utf8_validity imported target. find_package(Protobuf CONFIG) with only Protobuf_DIR set fails at generate time with 'the target was not found'. Provide utf8_range_DIR alongside Protobuf_DIR.
gRPC v1.81.1 headers internally reference their own deprecated IdentityKeyCertPair / set_certificate_provider symbols, and protobuf v33.5 map_field.h references a deprecated RepeatedPtrField constructor. With the third-party include dirs on the -I path these header-internal deprecation warnings become hard errors under -Werror and break the grpc-client-library build. Keep the warnings visible but non-fatal.
… 1.14.4 Resolves open high-severity Dependabot alerts: - jackson-databind 2.21.2 -> 2.21.4: CVE-2026-54512, CVE-2026-54513 - @grpc/grpc-js 1.14.3 -> 1.14.4: CVE-2026-48068, CVE-2026-48069
Revert the -Wno-error=deprecated-declarations relaxation and instead mark the protobuf and gRPC include directories as SYSTEM. The deprecation warnings that broke the -Werror build fire inside the gRPC v1.81.1 / protobuf v33 headers themselves (their declarations reference their own deprecated symbols); no client code uses the deprecated APIs. SYSTEM includes suppress vendor-header warnings while keeping full -Werror enforcement for our own code.
a47182b to
de5633a
Compare
protobuf v33's public message headers (exposed to consumers through the exported 'inference*' generated types) inline abseil CHECK/LOG(FATAL) calls. On aarch64 the inlined fast-path parser google::protobuf::internal::VarintParseSlowArm drags these into the consumer translation unit, so a program linking only -lgrpcclient against the shared library failed to resolve absl::*::log_internal::* (LogMessageFatal, CheckOpMessageBuilder, ...) — breaking the L0_sdk--SBSA--client shared-link test. Add the log_internal symbols to the version script's export list (glob keeps it abseil-version agnostic). x86 is unaffected: its consumer TU never references these symbols, so the extra exports sit unused.
…settings protobuf v33 makes DebugString() output intentionally unstable (injects a 'goo.gle/debugstr' marker), breaking the trace-settings string comparisons in the GRPCTraceTest cases. Serialize with TextFormat::PrintToString for stable, comparable output.
Greptile SummaryThis PR repairs the nightly build against the gRPC v1.81.1 / protobuf v33 third-party bump by threading the new
Confidence Score: 4/5The changes are targeted build-fix plumbing; no runtime logic is altered and the dependency bumps are minor patch-level increments. The directory-scoped SYSTEM on vendor headers and the unchecked PrintToString return value are both non-blocking, but the SYSTEM breadth means future deprecation calls inside client code would compile silently. Everything else — utf8_range propagation, ldscript ABI fix, dep bumps — is straightforward and well-commented. src/c++/CMakeLists.txt (directory-scoped SYSTEM include trade-off) and src/c++/library/libgrpcclient.ldscript (broad abseil symbol export glob). Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CMakeLists.txt top-level] -->|ExternalProject -Dutf8_range_DIR| B[cc-clients sub-build]
A -->|ExternalProject -Dutf8_range_DIR| C[python-clients sub-build]
B -->|find_package Protobuf CONFIG| D[protobuf v33 - utf8_range resolved]
B -->|find_package gRPC CONFIG| E[gRPC v1.81.1]
B -->|include_directories SYSTEM| F[Protobuf headers - deprecation warnings suppressed]
B -->|include_directories SYSTEM| G[gRPC headers - deprecation warnings suppressed]
F & G --> H[library / examples / tests inherit SYSTEM dirs]
I[libgrpcclient.ldscript] -->|absl::*log_internal* glob| J[aarch64 consumers linking only -lgrpcclient]
K[cc_client_test.cc] -->|TextFormat::PrintToString| L[Stable proto text output]
Reviews (1): Last reviewed commit: "Update headers" | Re-trigger Greptile |
| // deliberately makes DebugString() output unstable (it injects a | ||
| // "goo.gle/debugstr" marker) to discourage parsing, which breaks the | ||
| // string comparisons below. PrintToString gives stable text format. | ||
| google::protobuf::TextFormat::PrintToString(response, str); |
There was a problem hiding this comment.
TextFormat::PrintToString returns false when serialisation fails (e.g. a required field is unset in proto2, or an internal error occurs). The return value is silently discarded here. While proto3 messages rarely fail, ignoring the result means a serialisation error would leave str unchanged and the subsequent string comparison would either pass spuriously or produce a misleading assertion failure rather than a clear "serialisation failed" message.
| google::protobuf::TextFormat::PrintToString(response, str); | |
| ASSERT_TRUE(google::protobuf::TextFormat::PrintToString(response, str)) | |
| << "TextFormat::PrintToString failed"; |
| @@ -122,7 +124,10 @@ endif() # TRITON_ENABLE_CC_GRPC | |||
| if(TRITON_ENABLE_CC_GRPC) | |||
| find_package(gRPC CONFIG REQUIRED) | |||
| message(STATUS "Using gRPC ${gRPC_VERSION}") | |||
| include_directories($<TARGET_PROPERTY:gRPC::grpc,INTERFACE_INCLUDE_DIRECTORIES>) | |||
| # SYSTEM so header-internal deprecation warnings in gRPC do not fail | |||
| # the -Werror build. | |||
| include_directories( | |||
| SYSTEM $<TARGET_PROPERTY:gRPC::grpc,INTERFACE_INCLUDE_DIRECTORIES>) | |||
There was a problem hiding this comment.
Directory-scope
SYSTEM suppresses client-code deprecation warnings too
include_directories(SYSTEM ...) applies to every target in the current CMakeLists.txt and all add_subdirectory children (library, examples, tests). The SYSTEM flag suppresses [[deprecated]] warnings that fire when client code calls a deprecated protobuf or gRPC API — not only in-header warnings. A future call to a deprecated API in the client library or examples will silently compile clean under -Werror. The more targeted fix would be target_include_directories(<target> SYSTEM PRIVATE ...) on each affected target.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
What does the PR do?
Fixes the nightly client build against the gRPC v1.81.1 / protobuf v33 third_party bump:
utf8_range_DIRto the cc-clients and python-clients sub-builds — protobuf v33's CMake package config now requires theutf8_rangepackage config to resolve.SYSTEM: the deprecation warnings introduced by gRPC v1.81.1 / protobuf v33 fire inside the vendor headers themselves (no client code uses the deprecated APIs), andSYSTEMsuppresses them while keeping full-Wall -Wextra -Werrorenforcement for client code.jackson-databind2.21.2 → 2.21.4 (Java client) and@grpc/grpc-js^1.8.20 → ^1.14.4 (Node.js gRPC example).Checklist
<commit_type>: <Title>Related PRs:
Where should the reviewer start?
src/c++/library/CMakeLists.txt—-Wno-error=deprecated-declarationson client targetsutf8_range_DIRpropagationTest plan:
Nightly build pipeline on internal GitLab CI.
Caveats:
None.
Background
The gRPC v1.81.1 / protobuf v33 update in triton-inference-server/third_party#76 broke the nightly build across the Triton repos; this PR chain repairs it.
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
- Resolves: TRI-1608
CI (internal): [#58489960](http://tritonserver.local/ci/pipelines/58489960)