From 50144ec67a557e375f55841d08deda225ca52b98 Mon Sep 17 00:00:00 2001 From: yhmo Date: Fri, 4 Dec 2026 10:34:51 +0800 Subject: [PATCH 1/5] enhance(ci): add manually-triggered try-build workflow and dependency fixes Add .github/workflows/try-build.yaml for manual cold builds of knowhere on runner/compiler combinations outside the regular UT matrix (workflow_dispatch with runner, compiler, and extra_options inputs). Each run installs conan 2.33.0, resolves the requested toolchain (gcc/clang on Linux/macOS), verifies the resolved compiler major version, generates a conan profile (preserving libcxx/cppstd), validates the profile, and runs make (Cardinal disabled on macOS) with no conan package cache, so every build is a clean cold build. Dependency fixes for the upper-bound compilers used by the Milvus dependency validation (see milvus-io/conanfiles BUILD_MATRIX.md): - conanfile.py: bump folly recipe revision to 7af84eb7 (compiler-compat fixes #252/#253 and libsodium@milvus/dev armcrypto fix #281); bump liburing override to 2.15; bump boost to b28dcffa (gcc-15/16 emplace UB fix #270); bump opentelemetry-cpp to 4499df73 (ABI fix #232). - thirdparty/faiss: add missing includes to the two vendored cppcontrib/knowhere files, required by newer libc++ (clang-17/23) builds. Signed-off-by: yhmo --- .github/workflows/try-build.yaml | 313 ++++++++++++++++++ conanfile.py | 23 +- .../cppcontrib/knowhere/impl/index_read.cpp | 1 + .../knowhere/invlists/OnDiskInvertedLists.cpp | 1 + 4 files changed, 334 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/try-build.yaml diff --git a/.github/workflows/try-build.yaml b/.github/workflows/try-build.yaml new file mode 100644 index 000000000..b0fcc6d64 --- /dev/null +++ b/.github/workflows/try-build.yaml @@ -0,0 +1,313 @@ +name: Try Build + +run-name: Try build on ${{ inputs.runner }}${{ inputs.compiler != 'runner-native' && format(' ({0})', inputs.compiler) || '' }} + +# Manually triggered workflow to test knowhere on runner/compiler +# environments that are not covered by the regular UT matrix. +on: + workflow_dispatch: + inputs: + runner: + description: 'GitHub-hosted runner to use' + required: true + type: choice + options: + - ubuntu-22.04 + - ubuntu-24.04 + - macos-15 + - macos-26 + default: ubuntu-24.04 + compiler: + description: 'compiler toolchain (runner-native = runner default compiler)' + required: true + type: choice + options: + - runner-native + - gcc-11 + - gcc-12 + - gcc-13 + - gcc-14 + - gcc-15 + - gcc-16 + - clang-15 + - clang-16 + - clang-17 + - clang-19 + - clang-21 + - clang-22 + - clang-23 + default: runner-native + extra_options: + description: 'extra conan options appended to the generated profile [options] section (e.g. -o \&:with_asan=True)' + required: false + default: '' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +jobs: + try-build: + name: Try build (${{ github.event.inputs.runner }}) + runs-on: ${{ github.event.inputs.runner }} + timeout-minutes: 300 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: none + + - name: Install Dependency + run: | + if [ "$RUNNER_OS" = "Linux" ]; then + sudo apt update && sudo apt install -y cmake libaio-dev python3 python3-pip \ + && pip3 install conan==2.33.0 + else + python3 -m venv "$RUNNER_TEMP/conan-venv" + "$RUNNER_TEMP/conan-venv/bin/python" -m pip install conan==2.33.0 "cmake<4" + echo "$RUNNER_TEMP/conan-venv/bin" >> "$GITHUB_PATH" + # knowhere requires OpenMP (find_package(OpenMP REQUIRED)); Apple + # Clang's -fopenmp is a -Xpreprocessor flag that needs libomp's + # headers and runtime, which scripts/install_deps.sh also installs. + brew install libomp + fi + + - name: Install toolchain + if: github.event.inputs.compiler != 'runner-native' + env: + INPUT_COMPILER: ${{ github.event.inputs.compiler }} + run: | + set -euo pipefail + COMPILER_TYPE=${INPUT_COMPILER%%-*} # gcc or clang + COMPILER_VERSION=${INPUT_COMPILER##*-} # e.g. 12, 16, 23 + BIN_DIR="$RUNNER_TEMP/toolchain-bin" + mkdir -p "$BIN_DIR" + case "$RUNNER_OS/$COMPILER_TYPE" in + macOS/clang) + brew install "llvm@$COMPILER_VERSION" + BREW_LLVM="$(brew --prefix "llvm@$COMPILER_VERSION")" + CC="$BREW_LLVM/bin/clang" + CXX="$BREW_LLVM/bin/clang++" + ln -sf "$CC" "$BIN_DIR/clang" + ln -sf "$CXX" "$BIN_DIR/clang++" + ln -sf "$CC" "$BIN_DIR/cc" + ln -sf "$CXX" "$BIN_DIR/c++" + echo "$BIN_DIR" >> "$GITHUB_PATH" + echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> "$GITHUB_ENV" + ;; + macOS/gcc) + brew install "gcc@$COMPILER_VERSION" + BREW_GCC="$(brew --prefix "gcc@$COMPILER_VERSION")" + CC="$BREW_GCC/bin/gcc-$COMPILER_VERSION" + CXX="$BREW_GCC/bin/g++-$COMPILER_VERSION" + ln -sf "$CC" "$BIN_DIR/gcc" + ln -sf "$CXX" "$BIN_DIR/g++" + ln -sf "$CC" "$BIN_DIR/cc" + ln -sf "$CXX" "$BIN_DIR/c++" + echo "$BIN_DIR" >> "$GITHUB_PATH" + echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> "$GITHUB_ENV" + ;; + Linux/clang) + wget -qO /tmp/llvm.sh https://apt.llvm.org/llvm.sh + chmod +x /tmp/llvm.sh + sudo /tmp/llvm.sh "$COMPILER_VERSION" + CC="/usr/bin/clang-$COMPILER_VERSION" + CXX="/usr/bin/clang++-$COMPILER_VERSION" + ln -sf "$CC" "$BIN_DIR/clang" + ln -sf "$CXX" "$BIN_DIR/clang++" + ln -sf "$CC" "$BIN_DIR/cc" + ln -sf "$CXX" "$BIN_DIR/c++" + echo "$BIN_DIR" >> "$GITHUB_PATH" + ;; + Linux/gcc) + sudo apt-get update + GCC_BIN="" + if sudo apt-get install -y --no-install-recommends "gcc-$COMPILER_VERSION" "g++-$COMPILER_VERSION"; then + GCC_BIN="/usr/bin" + elif sudo apt-get install -y --no-install-recommends software-properties-common \ + && sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test \ + && sudo apt-get update \ + && sudo apt-get install -y --no-install-recommends "gcc-$COMPILER_VERSION" "g++-$COMPILER_VERSION"; then + GCC_BIN="/usr/bin" + else + NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + brew install "gcc@$COMPILER_VERSION" + GCC_BIN="$(brew --prefix "gcc@$COMPILER_VERSION")/bin" + echo "$(brew --prefix binutils)/bin" >> "$GITHUB_PATH" + fi + CC="$GCC_BIN/gcc-$COMPILER_VERSION" + CXX="$GCC_BIN/g++-$COMPILER_VERSION" + ln -sf "$CC" "$BIN_DIR/gcc" + ln -sf "$CXX" "$BIN_DIR/g++" + ln -sf "$CC" "$BIN_DIR/cc" + ln -sf "$CXX" "$BIN_DIR/c++" + echo "$BIN_DIR" >> "$GITHUB_PATH" + ;; + *) + echo "Unsupported OS/compiler combination: $RUNNER_OS/$INPUT_COMPILER" >&2 + exit 1 + ;; + esac + echo "CC=$CC" >> "$GITHUB_ENV" + echo "CXX=$CXX" >> "$GITHUB_ENV" + + - name: Verify toolchain matches the requested compiler + if: github.event.inputs.compiler != 'runner-native' + env: + INPUT_COMPILER: ${{ github.event.inputs.compiler }} + run: | + set -euo pipefail + COMPILER_VERSION=${INPUT_COMPILER##*-} + for TOOL in "$CC" "$CXX"; do + if [ ! -x "$TOOL" ]; then + echo "::error::$INPUT_COMPILER: resolved compiler '$TOOL' is not executable" >&2 + exit 1 + fi + done + check_major_version() { + local tool="$1" name="$2" line ver major + line="$("$tool" --version 2>&1 | head -n 1)" + echo "::notice::$name=$tool ($line)" + ver="$(grep -oE '[0-9]+(\.[0-9]+)+' <<<"$line" | tail -n 1)" + major="${ver%%.*}" + if [ "$major" != "$COMPILER_VERSION" ]; then + echo "::error::$name='$tool' reported '$line' but compiler '$INPUT_COMPILER' requires major version $COMPILER_VERSION" >&2 + exit 1 + fi + } + check_major_version "$CC" "CC" + check_major_version "$CXX" "CXX" + + - name: Compute Conan compiler settings + if: github.event.inputs.compiler != 'runner-native' + id: toolchain + env: + INPUT_COMPILER: ${{ github.event.inputs.compiler }} + run: | + set -euo pipefail + COMPILER_TYPE=${INPUT_COMPILER%%-*} + COMPILER_VERSION=${INPUT_COMPILER##*-} + case "$COMPILER_TYPE" in + gcc) + COMPILER=gcc + ;; + clang) + COMPILER=clang + ;; + *) + echo "Unsupported compiler: $INPUT_COMPILER" >&2 + exit 1 + ;; + esac + echo "Using compiler=$COMPILER/$COMPILER_VERSION" + echo "compiler=$COMPILER" >> "$GITHUB_OUTPUT" + echo "compiler_version=$COMPILER_VERSION" >> "$GITHUB_OUTPUT" + + - name: Setup Conan + run: | + conan profile detect --force \ + && conan remote add default-conan-local2 https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local2 --force + + - name: Generate Conan profile + env: + INPUT_COMPILER: ${{ github.event.inputs.compiler }} + INPUT_EXTRA_OPTIONS: ${{ github.event.inputs.extra_options }} + COMPILER: ${{ steps.toolchain.outputs.compiler }} + COMPILER_VERSION: ${{ steps.toolchain.outputs.compiler_version }} + run: | + set -euo pipefail + BASE_PROFILE="$(conan profile path default)" + PROFILE_PATH="$RUNNER_TEMP/try-build-profile" + if [ "$INPUT_COMPILER" = "runner-native" ]; then + cp "$BASE_PROFILE" "$PROFILE_PATH" + else + OS="$(sed -n 's/^os=//p' "$BASE_PROFILE")" + ARCH="$(sed -n 's/^arch=//p' "$BASE_PROFILE")" + # Keep libcxx/cppstd from the detected profile: Conan gcc/clang + # recipes commonly read compiler.libcxx (some via direct access + # that raises when the setting is undefined), so dropping them + # would only work until a future recipe bump touches them. + LIBCXX="$(sed -n 's/^compiler.libcxx=//p' "$BASE_PROFILE")" + CPPSTD="$(sed -n 's/^compiler.cppstd=//p' "$BASE_PROFILE")" + { + echo '[settings]' + echo "os=$OS" + echo "arch=$ARCH" + echo "compiler=$COMPILER" + echo "compiler.version=$COMPILER_VERSION" + if [ -n "$LIBCXX" ]; then + echo "compiler.libcxx=$LIBCXX" + fi + if [ -n "$CPPSTD" ]; then + echo "compiler.cppstd=$CPPSTD" + fi + echo + echo '[conf]' + echo "tools.build:compiler_executables={\"c\":\"$CC\",\"cpp\":\"$CXX\"}" + } > "$PROFILE_PATH" + fi + if [ -n "$INPUT_EXTRA_OPTIONS" ]; then + # Accept the documented " -o \&:name=value" form, stripping only a + # leading "-o " per token; reject multi-line values so a stray + # newline cannot inject extra [settings]/[conf] sections. + if [ "$(printf '%s' "$INPUT_EXTRA_OPTIONS" | tr -cd '\n' | wc -c)" -gt 0 ]; then + echo "::error::extra_options must be a single line of space-separated -o \&:name=value entries" >&2 + exit 1 + fi + # shellcheck disable=SC2206 + TOKENS=($INPUT_EXTRA_OPTIONS) + OPTIONS=() + while [ "${#TOKENS[@]}" -gt 0 ]; do + T="${TOKENS[0]}" + TOKENS=("${TOKENS[@]:1}") + if [ "$T" = "-o" ] || [ "$T" = "-o " ]; then + if [ "${#TOKENS[@]}" -eq 0 ]; then + echo "::error::extra_options ends with a dangling '-o'" >&2 + exit 1 + fi + T="${TOKENS[0]}" + TOKENS=("${TOKENS[@]:1}") + fi + # Normalize a single leading "\&:" / "\&" (the documented input + # form, where the backslash just quotes '&' against the shell) + # to the profile's "&:" form. + case "$T" in + '\&:'*) T="&:${T#'\&:'}" ;; + '\&'*) T="&:${T#'\&'}" ;; + esac + case "$T" in + '&:'*) + OPTIONS+=("$T") + ;; + *) + echo "::error::invalid extra_options entry '$T' (expected -o \\&:name=value)" >&2 + exit 1 + ;; + esac + done + { + printf '\n[options]\n' + printf '%s\n' "${OPTIONS[@]}" + } >> "$PROFILE_PATH" + fi + # Fail fast if the assembled profile is not parseable. + conan profile show -pr "$PROFILE_PATH" >/dev/null + echo "Generated Conan profile at $PROFILE_PATH:" + cat "$PROFILE_PATH" + echo "CONAN_PROFILE=$PROFILE_PATH" >> "$GITHUB_ENV" + + - name: Try build + env: + INPUT_COMPILER: ${{ github.event.inputs.compiler }} + run: | + set -euo pipefail + MAKE_FLAGS=() + if [ "$RUNNER_OS" = "macOS" ]; then + # Cardinal is not part of the macOS build matrix. + MAKE_FLAGS+=(WITH_CARDINAL=False) + fi + if [ "$INPUT_COMPILER" != "runner-native" ]; then + MAKE_FLAGS+=(CONAN_PROFILE="$CONAN_PROFILE") + fi + make "${MAKE_FLAGS[@]}" diff --git a/conanfile.py b/conanfile.py index 2cc02fa31..6cb29ef44 100644 --- a/conanfile.py +++ b/conanfile.py @@ -146,7 +146,9 @@ def requirements(self): if self.options.with_cardinal: self.requires("metis/5.2.1#85cfe7ee0dfc0cba7c0334e92efcbbc6") self.requires("abseil/20250127.0#481edcc75deb0efb16500f511f0f0a1c") - self.requires("boost/1.83.0#4e8a94ac1b88312af95eded83cd81ca8") + # b28dcffa carries the boost::json emplace UB fix for gcc-15/16 + # (milvus-io/conanfiles#270). + self.requires("boost/1.83.0#b28dcffaf033d2578693838cde973f64") self.requires("gflags/2.2.2#7671803f1dc19354cc90bd32874dcfda") self.requires("glog/0.7.1#a306e61d7b8311db8cb148ad62c48030") self.requires("nlohmann_json/3.11.3#ffb9e9236619f1c883e36662f944345d", force=True) @@ -158,11 +160,21 @@ def requirements(self): self.requires("protobuf/5.27.0@milvus/dev#42f031a96d21c230a6e05bcac4bdd633", force=True, override=True) self.requires("lz4/1.10.0#982d9b673900f665a1da109e09c17cab", force=True, override=True) if self.settings.os == "Linux": - self.requires("liburing/2.8", force=True, override=True) + self.requires("liburing/2.15", force=True, override=True) self.requires("fmt/12.1.0", force=True, override=True) self.requires("libevent/2.1.12#95065aaefcd58d3956d6dfbfc5631d97") self.requires("grpc/1.67.1@milvus/dev#efeaa484b59bffaa579004d5e82ec4fd") - self.requires("folly/2026.04.20.00@milvus/dev#06852bea5b6449f0c4eb0df002b5779c") + # folly recipe revision with the compiler-compat fixes backported by + # milvus-io/conanfiles#252/#253 (folly/result missing / + # , rejected by the libc++ shipped with clang-23, see + # zilliztech/milvus-common#155) and #281 (require libsodium from + # @milvus/dev, picking up the armcrypto pragma fix for clang-17 arm64). + # 7af84eb7 is the current master revision, which also pins boost/fmt + # from @milvus/dev (see BUILD_MATRIX.md). force=True aligns the whole + # graph (including the transitive pin from the milvus-common Conan + # package still consumed on main) to this revision; Conan rejects two + # revisions of the same ref otherwise. + self.requires("folly/2026.04.20.00@milvus/dev#7af84eb7ee82c6db7a4d659999b8f586", force=True) self.requires("fast_float/8.0.0@milvus/dev#c7802833c74c5a86ffed70e4af1a795e") self.requires("libcurl/8.10.1#a3113369c86086b0e84231844e7ed0a9", force=True, override=True) self.requires("simde/0.8.2#5e1edfd5cba92f25d79bf6ef4616b972") @@ -172,7 +184,10 @@ def requirements(self): # milvus-common is built from source (cmake/libs/libmilvus-common.cmake) # and its CMake requires opentelemetry-cpp unconditionally, so it must # stay in the graph even for light builds. - self.requires("opentelemetry-cpp/1.23.0@milvus/dev#11bc565ec6e82910ae8f7471da756720") + # 4499df73 carries the opentelemetry-cpp ABI fix (propagate + # OPENTELEMETRY_ABI_VERSION_NO/STL_VERSION to consumers, + # milvus-io/conanfiles#232). + self.requires("opentelemetry-cpp/1.23.0@milvus/dev#4499df7314afb2f93738176858a249b7") if self.settings.os != "Macos": self.requires("libunwind/1.8.1#748a981ace010b80163a08867b732e71") if self.options.with_ut: diff --git a/thirdparty/faiss/faiss/cppcontrib/knowhere/impl/index_read.cpp b/thirdparty/faiss/faiss/cppcontrib/knowhere/impl/index_read.cpp index f820b7382..f194583fa 100644 --- a/thirdparty/faiss/faiss/cppcontrib/knowhere/impl/index_read.cpp +++ b/thirdparty/faiss/faiss/cppcontrib/knowhere/impl/index_read.cpp @@ -7,6 +7,7 @@ #include +#include #include #include #include diff --git a/thirdparty/faiss/faiss/cppcontrib/knowhere/invlists/OnDiskInvertedLists.cpp b/thirdparty/faiss/faiss/cppcontrib/knowhere/invlists/OnDiskInvertedLists.cpp index 99089b24a..28b343e53 100644 --- a/thirdparty/faiss/faiss/cppcontrib/knowhere/invlists/OnDiskInvertedLists.cpp +++ b/thirdparty/faiss/faiss/cppcontrib/knowhere/invlists/OnDiskInvertedLists.cpp @@ -11,6 +11,7 @@ #include +#include #include #include From 3033256b4a87f2fc24df738dc46d200f7aaa2ddd Mon Sep 17 00:00:00 2001 From: yhmo Date: Fri, 4 Dec 2026 12:05:38 +0800 Subject: [PATCH 2/5] enhance(ci): report build environment after try-build Add a Report build environment step after the build that prints the runner label, OS, resolved compiler version, C++ standard, build type, and the generated conan profile, so a manual try-build run's exact toolchain is visible in the job log. Signed-off-by: yhmo --- .github/workflows/try-build.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/try-build.yaml b/.github/workflows/try-build.yaml index b0fcc6d64..c1cbd18a9 100644 --- a/.github/workflows/try-build.yaml +++ b/.github/workflows/try-build.yaml @@ -311,3 +311,20 @@ jobs: MAKE_FLAGS+=(CONAN_PROFILE="$CONAN_PROFILE") fi make "${MAKE_FLAGS[@]}" + + - name: Report build environment + run: | + set -euo pipefail + echo "Runner : ${{ github.event.inputs.runner }}" + echo "OS : $(uname -srm)" + if [ -n "${CC:-}" ]; then + echo "Compiler : $($CC --version | head -n 1)" + else + echo "Compiler : $(cc --version | head -n 1)" + fi + if [ -n "${CONAN_PROFILE:-}" ]; then + echo "CXX standard : $(sed -n 's/^compiler.cppstd=//p' "$CONAN_PROFILE")" + echo "Build type : $(sed -n 's/^build_type=//p' "$CONAN_PROFILE")" + echo "Profile :" + cat "$CONAN_PROFILE" + fi From 352861a96ec315b344bedd79e872a1ca4729b403 Mon Sep 17 00:00:00 2001 From: yhmo Date: Fri, 4 Dec 2026 12:29:04 +0800 Subject: [PATCH 3/5] docs: document building knowhere with a different compiler Add a 'Building with a different compiler' section to the README, mirroring milvus-common#155 and cardinal#1060: the verified gcc/clang ranges, the recommended custom-Conan-profile flow (CONAN_PROFILE + tools.build:compiler_executables), an edit-default-profile alternative, and notes on macOS keg-only toolchains/libomp, gcc-15/16 packaging, and the clang-17 libsodium@milvus/dev dependency. Signed-off-by: yhmo --- README.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/README.md b/README.md index e7f806ebd..f46c4377f 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,70 @@ $ make WITH_JNI=True WITH_C_API_TESTS=True $ make CONAN_PROFILE=clang14 ``` +##### Building with a different compiler + +`make` builds with whatever compiler `conan profile detect` finds by default. +The project is also verified to build with: + +- gcc 12, 13, 14, 15, 16 +- clang 17, 19, 21, 22, 23 + +To build with a specific compiler, install it and make both Conan and the +build tools use it. + +**Option 1: a custom Conan profile (recommended).** A profile selects the +compiler and, via `tools.build:compiler_executables`, pins the exact compiler +binaries. `CONAN_PROFILE` is passed to Conan as `-pr:h`/`-pr:b` (host and +build), so one profile controls both contexts: + +```bash +# profiles/gcc15 +[settings] +os=Linux +arch=x86_64 +compiler=gcc +compiler.version=15 +compiler.libcxx=libstdc++11 + +[conf] +tools.build:compiler_executables={"c": "/usr/bin/gcc-15", "cpp": "/usr/bin/g++-15"} +``` + +```bash +$ make clean && make CONAN_PROFILE=gcc15 +``` + +**Option 2: edit the default profile.** Instead of a named profile, point +`conan profile detect` at the desired compiler and let the Makefile use the +default profile: + +```bash +$ CC=gcc-15 CXX=g++-15 conan profile detect --force +$ printf '\n[conf]\ntools.build:compiler_executables={"c":"gcc-15","cpp":"g++-15"}\n' \ + >> "$(conan profile path default)" +$ make +``` + +Notes: + +- Conan settings only *describe* the compiler; the binaries CMake and the + dependency recipes actually invoke come from `CC/CXX`/`PATH` or + `tools.build:compiler_executables`. Without the latter, Conan can fall back + to the system default compiler while the profile claims another one. +- On macOS, Homebrew `llvm@N`/`gcc@N` are keg-only, so put their `bin` + directory on `PATH` (or set `CC/CXX`) and export `SDKROOT` if the compiler + cannot auto-detect the SDK. OpenMP requires `libomp` (Apple Clang's + `-fopenmp` is a `-Xpreprocessor` flag). +- gcc-15/16 are not packaged by Ubuntu apt or the toolchain PPA. + Homebrew-on-Linux's `gcc@15`/`gcc@16` work on ubuntu-24.04 (its bundled + glibc 2.39 matches the system), but not on ubuntu-22.04 (glibc 2.35). +- clang-17 support relies on the folly recipe requiring the patched + `libsodium@milvus/dev` (upstream libsodium #1321), which lets libsodium + build on Apple Silicon; knowhere's `conanfile.py` pins that folly revision. +- The `.github/workflows/try-build.yaml` workflow automates all of the above: + pick a runner and compiler, and it installs the toolchain, generates the + profile, and runs a clean cold build for you. + #### Running Unit Tests ```bash From 8117b2ca5ef0566c2e8291c96f61ea4590c2f46d Mon Sep 17 00:00:00 2001 From: yhmo Date: Fri, 4 Dec 2026 12:48:26 +0800 Subject: [PATCH 4/5] build(deps): align boost channel and bump lz4 to the current revision Align with milvus-io/conanfiles BUILD_MATRIX.md: - boost: pin the @milvus/dev channel (same b28dcffa revision) to match the published channel for custom recipes. - lz4: bump to f4836e8d, the current revision on default-conan-local2. Signed-off-by: yhmo --- conanfile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/conanfile.py b/conanfile.py index 6cb29ef44..0097e8be2 100644 --- a/conanfile.py +++ b/conanfile.py @@ -147,8 +147,8 @@ def requirements(self): self.requires("metis/5.2.1#85cfe7ee0dfc0cba7c0334e92efcbbc6") self.requires("abseil/20250127.0#481edcc75deb0efb16500f511f0f0a1c") # b28dcffa carries the boost::json emplace UB fix for gcc-15/16 - # (milvus-io/conanfiles#270). - self.requires("boost/1.83.0#b28dcffaf033d2578693838cde973f64") + # (milvus-io/conanfiles#270), published on the @milvus/dev channel. + self.requires("boost/1.83.0@milvus/dev#b28dcffaf033d2578693838cde973f64") self.requires("gflags/2.2.2#7671803f1dc19354cc90bd32874dcfda") self.requires("glog/0.7.1#a306e61d7b8311db8cb148ad62c48030") self.requires("nlohmann_json/3.11.3#ffb9e9236619f1c883e36662f944345d", force=True) @@ -158,7 +158,9 @@ def requirements(self): self.requires("double-conversion/3.3.0#640e35791a4bac95b0545e2f54b7aceb") self.requires("xz_utils/5.4.5#fc4e36861e0a47ecd4a40a00e6d29ac8") self.requires("protobuf/5.27.0@milvus/dev#42f031a96d21c230a6e05bcac4bdd633", force=True, override=True) - self.requires("lz4/1.10.0#982d9b673900f665a1da109e09c17cab", force=True, override=True) + # f4836e8d is the current lz4 recipe revision published to + # default-conan-local2 (see milvus-io/conanfiles BUILD_MATRIX.md). + self.requires("lz4/1.10.0#f4836e8d9bc5064ae6577f9c44b34e14", force=True, override=True) if self.settings.os == "Linux": self.requires("liburing/2.15", force=True, override=True) self.requires("fmt/12.1.0", force=True, override=True) From 1ad261b4b72f91864af5098d7c0b5e01ffa161cd Mon Sep 17 00:00:00 2001 From: yhmo Date: Fri, 4 Dec 2026 17:32:08 +0800 Subject: [PATCH 5/5] build(deps): revert opentelemetry-cpp to 11bc565e The newer 4499df73 (conanfiles#232 ABI fix) no longer accepts the brace-enclosed TraceId/SpanId initializers that milvus-common's Tracer.h/Tracer.cpp use, breaking every build that compiles milvus-common (linux-x86_64, ut, wheel, analyzer). Keep the old pin until milvus-common adapts to the new opentelemetry-cpp constructors. boost channel alignment and the lz4 bump are retained. Signed-off-by: yhmo --- conanfile.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/conanfile.py b/conanfile.py index 0097e8be2..ac9e0067c 100644 --- a/conanfile.py +++ b/conanfile.py @@ -186,10 +186,12 @@ def requirements(self): # milvus-common is built from source (cmake/libs/libmilvus-common.cmake) # and its CMake requires opentelemetry-cpp unconditionally, so it must # stay in the graph even for light builds. - # 4499df73 carries the opentelemetry-cpp ABI fix (propagate - # OPENTELEMETRY_ABI_VERSION_NO/STL_VERSION to consumers, - # milvus-io/conanfiles#232). - self.requires("opentelemetry-cpp/1.23.0@milvus/dev#4499df7314afb2f93738176858a249b7") + # Keep 11bc565e: the newer 4499df73 (conanfiles#232 ABI fix) no longer + # accepts the brace-enclosed TraceId/SpanId initializers that + # milvus-common's Tracer.h/Tracer.cpp use, breaking the milvus-common + # build. Roll the pin back until milvus-common adapts to the new + # opentelemetry-cpp constructor. + self.requires("opentelemetry-cpp/1.23.0@milvus/dev#11bc565ec6e82910ae8f7471da756720") if self.settings.os != "Macos": self.requires("libunwind/1.8.1#748a981ace010b80163a08867b732e71") if self.options.with_ut: