Skip to content

build: resolve common's dependencies via Conan instead of the third_party superbuild - #165

Draft
mc-nv wants to merge 2 commits into
triton-inference-server:mainfrom
mc-nv:mchornyi/TRI-1611/build-enable-conan
Draft

mc-nv wants to merge 2 commits into
triton-inference-server:mainfrom
mc-nv:mchornyi/TRI-1611/build-enable-conan

Conversation

@mc-nv

@mc-nv mc-nv commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Part of the cross-repo effort (server/core/common) to replace the third_party ExternalProject superbuild with Conan-resolved dependencies.
  • Reuses a provided GoogleTest instead of always fetching one, and normalizes the dependency names ConanCenter's per-package prefixes expose (vs. the single shared prefix third_party used to provide).

Test plan

  • Builds cleanly as part of the full server Conan configure + cmake --build -t install (cold CONAN_HOME, see TRI-1611 notes).
  • L0_* suite not yet executed against this branch.

Companion PRs: triton-inference-server/core, triton-inference-server/server.

src/test unconditionally fetched googletest from a pinned archive, so a build
driven by server ended up with two GoogleTests at different versions: the
archive's tree reports GOOGLETEST_VERSION 1.11.0, while server resolves
gtest/1.14.0 through Conan and publishes GTest_DIR before descending here.

The tests link the namespaced GTest::gtest and GTest::gtest_main targets, which
a Conan package and a fetched googletest both provide, so no call site needed
changing -- only how GoogleTest is acquired. find_package(GTest CONFIG QUIET)
runs first, and the fetch remains as a fallback so a standalone `common` build
still works on its own.

This also clears a CMake deprecation warning as a side effect: the pinned
archive declares cmake_minimum_required(VERSION 3.5), and CMake 4.1 warns that
compatibility below 3.10 is going away. Upstream raised it above that threshold
in googletest 1.14.0, which is the version now being used.

Verified against server with TRITON_DEVELOPMENT_LOCAL=ON: configure exits 0,
reports "GoogleTest: using the copy already provided", nothing is populated
under _deps/googletest-src, and the deprecation warning is gone.

Refs TRI-1611
third_party installed every dependency under one install prefix, so a target
that never declared where its headers came from still compiled. Conan gives each
package its own prefix, and both of these omissions became hard errors.

RapidJSON's own config exports the all-caps RAPIDJSON_INCLUDE_DIRS, which is what
the three consumers here already read. ConanCenter generates its config from the
package name and exports RapidJSON_INCLUDE_DIRS instead, leaving the all-caps
spelling empty -- so the include list silently gained nothing and every file
reaching triton_json.h failed on <rapidjson/document.h>. Normalizing after
find_package keeps one spelling for consumers regardless of the provider.

grpc-health-library linked only common-compile-settings, while grpc-service-
library beside it has always also linked protobuf::libprotobuf. health.grpc.pb.cc
includes the generated health.pb.h, which includes google/protobuf/, so the
omission was real -- just invisible while protobuf's headers sat on a shared
prefix.

Refs TRI-1611
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant