From 12a0cc5fbc656695a590e0239d07898ead111c6b Mon Sep 17 00:00:00 2001 From: "M. Chornyi" <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 09:06:53 -0700 Subject: [PATCH 1/6] fix: Remove obsolete abseil_no_rebuild.patch broken by gRPC v1.81.1 bump The patch worked around https://github.com/abseil/abseil-cpp/issues/1769 and carried a TODO to remove it once the fix landed upstream. The abseil-cpp bundled with gRPC v1.81.1 (76bb243) includes that fix natively, and the patch no longer applies (FileNotMatchingError at CMakeLists.txt:214), breaking every tritonserver nightly build job. Also update the install_src dest-basename left at grpc_1.54.3 by the version bump. --- CMakeLists.txt | 4 +--- tools/abseil_no_rebuild.patch | 29 ----------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 tools/abseil_no_rebuild.patch diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e7dfa49..be9d3939 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,9 +122,7 @@ ExternalProject_Add(grpc-repo TEST_COMMAND "" CMAKE_CACHE_ARGS -DCMAKE_CXX_STANDARD:STRING=${TRITON_MIN_CXX_STANDARD} - # TODO(nnoble): remove this patch when the fix for https://github.com/abseil/abseil-cpp/issues/1769 is integrated within our dependencies - PATCH_COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/tools/patch.py apply -i -d ${CMAKE_CURRENT_BINARY_DIR}/grpc-repo/src/grpc/third_party/abseil-cpp ${CMAKE_CURRENT_SOURCE_DIR}/tools/abseil_no_rebuild.patch - COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/tools/install_src.py --src ${INSTALL_SRC_DEST_ARG} --dest-basename=grpc_1.54.3 + PATCH_COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/tools/install_src.py --src ${INSTALL_SRC_DEST_ARG} --dest-basename=grpc_1.81.1 ) # # Build nlohmann/json diff --git a/tools/abseil_no_rebuild.patch b/tools/abseil_no_rebuild.patch deleted file mode 100644 index 0e5b0b37..00000000 --- a/tools/abseil_no_rebuild.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- CMakeLists.txt 2024-10-11 14:53:24.305084638 -0700 -+++ CMakeLists.txt 2024-10-11 14:53:35.288981516 -0700 -@@ -214,6 +214,7 @@ - PATTERN "*.h" - PATTERN "copts" EXCLUDE - PATTERN "testdata" EXCLUDE -+ PATTERN "options.h" EXCLUDE - ) - - file(READ "absl/base/options.h" ABSL_INTERNAL_OPTIONS_H_CONTENTS) -@@ -230,7 +231,17 @@ - ABSL_INTERNAL_OPTIONS_H_PINNED - "${ABSL_INTERNAL_OPTIONS_H_CONTENTS}") - endif() -- file(WRITE "${CMAKE_BINARY_DIR}/options-pinned.h" "${ABSL_INTERNAL_OPTIONS_H_PINNED}") -+ set(ABSL_INTERNAL_OPTIONS_H_PINNED_GENERATE TRUE) -+ if (EXISTS "${CMAKE_BINARY_DIR}/options-pinned.h") -+ file(READ "${CMAKE_BINARY_DIR}/options-pinned.h" ABSL_INTERNAL_OPTIONS_PINNED_H_CONTENTS) -+ if ("${ABSL_INTERNAL_OPTIONS_H_PINNED}" STREQUAL "${ABSL_INTERNAL_OPTIONS_PINNED_H_CONTENTS}") -+ set(ABSL_INTERNAL_OPTIONS_H_PINNED_GENERATE FALSE) -+ endif() -+ endif() -+ -+ if (ABSL_INTERNAL_OPTIONS_H_PINNED_GENERATE) -+ file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/options-pinned.h" CONTENT "${ABSL_INTERNAL_OPTIONS_H_PINNED}") -+ endif() - - install(FILES "${CMAKE_BINARY_DIR}/options-pinned.h" - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/absl/base From eaae04389c0cd2dac911c357087799d0e2054f4b Mon Sep 17 00:00:00 2001 From: "M. Chornyi" <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 09:29:45 -0700 Subject: [PATCH 2/6] fix: Build protobuf from repo root, not cmake/ subdirectory The protobuf bundled with gRPC v1.81.1 has its CMakeLists.txt at the repository root; the cmake/ subdirectory now holds only helper modules. Configuring from cmake/ fails with 'does not appear to contain CMakeLists.txt'. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index be9d3939..fac774ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,7 +169,7 @@ ExternalProject_Add(absl # ExternalProject_Add(protobuf PREFIX protobuf - SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/grpc-repo/src/grpc/third_party/protobuf/cmake" + SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/grpc-repo/src/grpc/third_party/protobuf" EXCLUDE_FROM_ALL ON DOWNLOAD_COMMAND "" CMAKE_CACHE_ARGS From a03692e2b1b662d120a2d4d9fb55e1e9f7dae1c3 Mon Sep 17 00:00:00 2001 From: "M. Chornyi" <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 09:43:17 -0700 Subject: [PATCH 3/6] fix: Pass utf8_range_DIR to protobuf package consumers The protobuf bundled with gRPC v1.81.1 (v33.5) installs utf8_range as a separate CMake package under /protobuf/lib/cmake/utf8_range, and protobuf-config.cmake now references the utf8_range::utf8_validity and utf8_range::utf8_range imported targets. Consumers that locate protobuf via Protobuf_DIR alone fail to configure with 'Could NOT find utf8_range (missing: utf8_range_DIR)'. Provide utf8_range_DIR to the grpc and google-cloud-cpp builds and add the directory to GCS_CMAKE_PREFIX_PATH. --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fac774ef..b0967821 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,8 +228,10 @@ ExternalProject_Add(googletest # platform if (WIN32) set(_FINDPACKAGE_PROTOBUF_CONFIG_DIR "${TRITON_THIRD_PARTY_INSTALL_PREFIX}/protobuf/cmake") + set(_FINDPACKAGE_UTF8_RANGE_CONFIG_DIR "${TRITON_THIRD_PARTY_INSTALL_PREFIX}/protobuf/cmake/utf8_range") else() set(_FINDPACKAGE_PROTOBUF_CONFIG_DIR "${TRITON_THIRD_PARTY_INSTALL_PREFIX}/protobuf/${LIB_DIR}/cmake/protobuf") + set(_FINDPACKAGE_UTF8_RANGE_CONFIG_DIR "${TRITON_THIRD_PARTY_INSTALL_PREFIX}/protobuf/${LIB_DIR}/cmake/utf8_range") endif() # # Build c-ares project from grpc-repo @@ -280,6 +282,7 @@ ExternalProject_Add(grpc -Dc-ares_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/c-ares/${LIB_DIR}/cmake/c-ares -Dre2_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/re2/${LIB_DIR}/cmake/re2 -DProtobuf_DIR:PATH=${_FINDPACKAGE_PROTOBUF_CONFIG_DIR} + -Dutf8_range_DIR:PATH=${_FINDPACKAGE_UTF8_RANGE_CONFIG_DIR} ${_CMAKE_ARGS_OPENSSL_ROOT_DIR} ${_CMAKE_ARGS_CMAKE_TOOLCHAIN_FILE} ${_CMAKE_ARGS_VCPKG_TARGET_TRIPLET} @@ -414,7 +417,8 @@ set(GCS_CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${TRITON_THIRD_PARTY_INSTALL_PREFIX}/crc32c/${LIB_DIR}/cmake/Crc32c ${TRITON_THIRD_PARTY_INSTALL_PREFIX}/grpc/lib/cmake/grpc ${TRITON_THIRD_PARTY_INSTALL_PREFIX}/nlohmann_json/share/cmake/nlohmann_json - ${_FINDPACKAGE_PROTOBUF_CONFIG_DIR}) + ${_FINDPACKAGE_PROTOBUF_CONFIG_DIR} + ${_FINDPACKAGE_UTF8_RANGE_CONFIG_DIR}) # # Build google-cloud-cpp # @@ -436,6 +440,7 @@ ExternalProject_Add(google-cloud-cpp -DCMAKE_INSTALL_PREFIX:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/google-cloud-cpp -Dnlohmann_json_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/nlohmann_json/share/cmake/nlohmann_json -DProtobuf_DIR:PATH=${_FINDPACKAGE_PROTOBUF_CONFIG_DIR} + -Dutf8_range_DIR:PATH=${_FINDPACKAGE_UTF8_RANGE_CONFIG_DIR} -DCrc32c_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/crc32c/${LIB_DIR}/cmake/Crc32c PATCH_COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/tools/install_src.py --src ${INSTALL_SRC_DEST_ARG} DEPENDS grpc c-ares protobuf crc32c absl nlohmann-json From 7eda7be97c89831e987c868a2049f259466494c5 Mon Sep 17 00:00:00 2001 From: "M. Chornyi" <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 11:05:43 -0700 Subject: [PATCH 4/6] fix: Enable WITH_ABSEIL for opentelemetry-cpp The protobuf bundled with gRPC v1.81.1 is v33.5 (>= 3.22), and opentelemetry-cpp hard-fails its configure when OTLP is enabled with a protobuf >= 3.22 unless WITH_ABSEIL is ON ('Protobuf 3.22 or upper require abseil-cpp'). Turn WITH_ABSEIL on, point absl_DIR at the absl built from grpc-repo, and add absl to the project's dependencies. --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0967821..641e8c29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -561,7 +561,8 @@ if (NOT WIN32) -DBUILD_TESTING:BOOL=OFF -DWITH_EXAMPLES:BOOL=OFF -DWITH_BENCHMARK:BOOL=OFF - -DWITH_ABSEIL:BOOL=OFF + -DWITH_ABSEIL:BOOL=ON + -Dabsl_DIR:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/absl/${LIB_DIR}/cmake/absl -DWITH_OTLP_GRPC:BOOL=OFF -DWITH_OTLP_HTTP:BOOL=ON -DOPENTELEMETRY_INSTALL:BOOL=ON @@ -571,6 +572,6 @@ if (NOT WIN32) -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=${TRITON_THIRD_PARTY_INSTALL_PREFIX}/opentelemetry-cpp PATCH_COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/tools/install_src.py --src ${INSTALL_SRC_DEST_ARG} - DEPENDS grpc nlohmann-json curl protobuf + DEPENDS grpc nlohmann-json curl protobuf absl ) endif() From ff4f7e6c9786d2e42b4dc67eca024d1bc84c011e Mon Sep 17 00:00:00 2001 From: "M. Chornyi" <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 11:21:05 -0700 Subject: [PATCH 5/6] fix: Build only the storage feature of google-cloud-cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The spanner library in google-cloud-cpp v2.28.0 does not compile against protobuf v33 (bundled with gRPC v1.81.1): protobuf's enum-name APIs now return absl::string_view, and spanner's proto_enum.h binds the result to 'const std::string&'. Triton only consumes google_cloud_cpp_storage (GCS filesystem support in core), so scope the build to the storage feature instead of the full GA library set — skipping the incompatible spanner code and shrinking the build. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 641e8c29..bc5499c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -433,6 +433,7 @@ ExternalProject_Add(google-cloud-cpp ${_CMAKE_ARGS_VCPKG_TARGET_TRIPLET} -DCMAKE_CXX_STANDARD:STRING=${TRITON_MIN_CXX_STANDARD} -DGOOGLE_CLOUD_CPP_DEPENDENCY_PROVIDER:STRING=package + -DGOOGLE_CLOUD_CPP_ENABLE:STRING=storage -DBUILD_TESTING:BOOL=OFF -DGOOGLE_CLOUD_CPP_WITH_MOCKS:BOOL=OFF -DCMAKE_PREFIX_PATH:PATH=${GCS_CMAKE_PREFIX_PATH} From 2792fb26de270a6a73b19f83968aa661b72b5fe6 Mon Sep 17 00:00:00 2001 From: "M. Chornyi" <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 11:34:25 -0700 Subject: [PATCH 6/6] fix: Disable opentelemetry-cpp functional tests WITH_FUNC_TESTS defaults to ON in opentelemetry-cpp v1.13.0 (independently of BUILD_TESTING) and the func_otlp_http test binary fails to link against protobuf v33: libprotobuf.a now requires the absl log/str_format libraries, which the functional-test link line does not carry. The otel libraries themselves build fine; skip the unneeded test binaries. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc5499c5..4a45b521 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -560,6 +560,7 @@ if (NOT WIN32) ${_CMAKE_ARGS_VCPKG_TARGET_TRIPLET} -DBUILD_SHARED_LIBS:STRING=OFF -DBUILD_TESTING:BOOL=OFF + -DWITH_FUNC_TESTS:BOOL=OFF -DWITH_EXAMPLES:BOOL=OFF -DWITH_BENCHMARK:BOOL=OFF -DWITH_ABSEIL:BOOL=ON