Summary
Building alibaba/zvec v0.2.0 from source fails on common Linux distros when the bundled Apache Arrow 21.0.0 ExternalProject configures bundled Apache Thrift. Arrow requires CMake ≥ 3.26, but default packages on Debian 12 / Ubuntu 22.04 ship older CMake.
This blocks downstream consumers (e.g. zvec-go make deps, Go CGO bindings) that clone and cmake-build zvec v0.2.0.
Environment
| Platform |
CMake |
g++ |
Result |
Docker golang:1.26.3-bookworm (Debian 12) |
3.25.1 (apt install cmake) |
12.2.0 |
FAIL at Arrow configure |
Docker ubuntu:22.04 |
3.22.1 |
11.x |
FAIL (CMake below 3.26) |
Docker ubuntu:24.04 |
3.28.3 |
13.x |
OK for Arrow Thrift step (≥ 3.26) |
Docker golang:1.26.3-bookworm + portable CMake 3.29.6 |
3.29.6 |
12.2.0 |
OK — full cmake --build to 100% (~19 min, 2 parallel jobs) |
Arrow Thrift step by distro apt cmake:
| Image |
cmake --version |
Arrow Thrift step |
golang:1.26.3-bookworm |
3.25.1 |
FAIL |
ubuntu:22.04 |
3.22.1 |
FAIL |
ubuntu:24.04 |
3.28.3 |
OK (≥ 3.26) |
Tag: v0.2.0 (1d5aeeed1df6e104443edf23891798f1ff0a8bf7)
Steps to reproduce
docker run --rm golang:1.26.3-bookworm bash -c '
apt-get update -qq && apt-get install -y -qq cmake g++ make git &&
git clone --depth 1 --branch v0.2.0 --recurse-submodules https://github.com/alibaba/zvec.git /tmp/zvec &&
cmake -S /tmp/zvec -B /tmp/zb \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TOOLS=OFF \
-DBUILD_PYTHON_BINDINGS=OFF &&
cmake --build /tmp/zb --parallel 2
'
Actual result
- zvec top-level CMake configure — OK
- Build progresses; rocksdb completes (~55%) — OK
ARROW.BUILD ExternalProject configure — FAIL:
CMake Error at cmake_modules/ThirdpartyToolchain.cmake:1739 (message):
Require CMake 3.26 or later for building bundled Apache Thrift
Full log excerpt (ARROW.BUILD-configure-err.log):
CMake Error at cmake_modules/ThirdpartyToolchain.cmake:1739 (message):
Require CMake 3.26 or later for building bundled Apache Thrift
Call Stack (most recent call first):
cmake_modules/ThirdpartyToolchain.cmake:219 (build_thrift)
cmake_modules/ThirdpartyToolchain.cmake:308 (build_dependency)
cmake_modules/ThirdpartyToolchain.cmake:1808 (resolve_dependency)
CMakeLists.txt:511 (include)
Root cause
thirdparty/arrow/CMakeLists.txt builds Arrow with bundled dependencies:
CONFIGURE_COMMAND ... -DARROW_DEPENDENCY_SOURCE=BUNDLED ...
-DARROW_PARQUET=ON ...
Parquet pulls in bundled Thrift. In Arrow 21.0.0, cpp/cmake_modules/ThirdpartyToolchain.cmake enforces:
if(CMAKE_VERSION VERSION_LESS 3.26)
message(FATAL_ERROR "Require CMake 3.26 or later for building bundled Apache Thrift")
endif()
Default cmake on Debian 12 is 3.25.1; Ubuntu 22.04 is 3.22.1 — both below the threshold.
Expected result
Documented, reproducible source build on at least one common LTS (Debian 12 / Ubuntu 22.04 / 24.04) with distro packages, or an explicit minimum CMake version check at zvec configure time with a clear error message.
Suggested fixes
- Document
cmake >= 3.26 in build-from-source guide (and in repo README / CONTRIBUTING).
- Fail fast:
cmake_minimum_required(VERSION 3.26) (or a message(FATAL_ERROR ...)) in top-level CMakeLists.txt before the long thirdparty build.
- Arrow ExternalProject options (if Parquet/Thrift can use system libs):
-DARROW_DEPENDENCY_SOURCE=SYSTEM + libthrift-dev on older distros, or
- evaluate
-DARROW_WITH_THRIFT=OFF if Parquet features zvec needs do not require Thrift.
- CI: add a cmake-build job on
ubuntu-latest / bookworm with default apt cmake to catch this class of regression.
Workaround (consumers) — verified
On golang:1.26.3-bookworm (Debian 12), installing portable CMake 3.29.6 before configure/build unblocks the failure:
wget -q https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-linux-x86_64.tar.gz
tar -xzf cmake-3.29.6-linux-x86_64.tar.gz -C /opt
export PATH=/opt/cmake-3.29.6-linux-x86_64/bin:$PATH
git clone --depth 1 --branch v0.2.0 --recurse-submodules https://github.com/alibaba/zvec.git /tmp/zvec
cmake -S /tmp/zvec -B /tmp/zb \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TOOLS=OFF \
-DBUILD_PYTHON_BINDINGS=OFF
cmake --build /tmp/zb --parallel 2
Result: build completes to 100% (~19 min, 2 parallel jobs). Last target: Built target zvec_sqlengine.
Alternative without portable CMake: use Ubuntu 24.04 base image (apt cmake is 3.28.3).
Root cause analysis above holds: bundled Arrow 21 + ARROW_DEPENDENCY_SOURCE=BUNDLED + Parquet → Thrift requires CMake ≥ 3.26, but default packages on Debian 12 / Ubuntu 22.04 are below that.
Related downstream reports
Additional context: Windows MinGW
On Windows 11 with WinLibs GCC 16.1 + CMake 4.3.3, Arrow configure can succeed (with short build paths), but the Arrow build later fails in bundled re2 (~42%). Separate from the Linux CMake issue; details in zvec-go#1.
Summary
Building alibaba/zvec v0.2.0 from source fails on common Linux distros when the bundled Apache Arrow 21.0.0 ExternalProject configures bundled Apache Thrift. Arrow requires CMake ≥ 3.26, but default packages on Debian 12 / Ubuntu 22.04 ship older CMake.
This blocks downstream consumers (e.g. zvec-go
make deps, Go CGO bindings) that clone and cmake-build zvec v0.2.0.Environment
golang:1.26.3-bookworm(Debian 12)apt install cmake)ubuntu:22.04ubuntu:24.04golang:1.26.3-bookworm+ portable CMake 3.29.6cmake --buildto 100% (~19 min, 2 parallel jobs)Arrow Thrift step by distro
apt cmake:cmake --versiongolang:1.26.3-bookwormubuntu:22.04ubuntu:24.04Tag: v0.2.0 (
1d5aeeed1df6e104443edf23891798f1ff0a8bf7)Steps to reproduce
Actual result
ARROW.BUILDExternalProject configure — FAIL:Full log excerpt (
ARROW.BUILD-configure-err.log):Root cause
thirdparty/arrow/CMakeLists.txtbuilds Arrow with bundled dependencies:Parquet pulls in bundled Thrift. In Arrow 21.0.0,
cpp/cmake_modules/ThirdpartyToolchain.cmakeenforces:Default
cmakeon Debian 12 is 3.25.1; Ubuntu 22.04 is 3.22.1 — both below the threshold.Expected result
Documented, reproducible source build on at least one common LTS (Debian 12 / Ubuntu 22.04 / 24.04) with distro packages, or an explicit minimum CMake version check at zvec configure time with a clear error message.
Suggested fixes
cmake >= 3.26in build-from-source guide (and in repo README / CONTRIBUTING).cmake_minimum_required(VERSION 3.26)(or amessage(FATAL_ERROR ...)) in top-levelCMakeLists.txtbefore the long thirdparty build.-DARROW_DEPENDENCY_SOURCE=SYSTEM+libthrift-devon older distros, or-DARROW_WITH_THRIFT=OFFif Parquet features zvec needs do not require Thrift.ubuntu-latest/ bookworm with defaultapt cmaketo catch this class of regression.Workaround (consumers) — verified
On
golang:1.26.3-bookworm(Debian 12), installing portable CMake 3.29.6 before configure/build unblocks the failure:Result: build completes to 100% (~19 min, 2 parallel jobs). Last target:
Built target zvec_sqlengine.Alternative without portable CMake: use Ubuntu 24.04 base image (
apt cmakeis 3.28.3).Root cause analysis above holds: bundled Arrow 21 +
ARROW_DEPENDENCY_SOURCE=BUNDLED+ Parquet → Thrift requires CMake ≥ 3.26, but default packages on Debian 12 / Ubuntu 22.04 are below that.Related downstream reports
make depsfails (same Arrow step; consumer of zvec v0.2.0)Additional context: Windows MinGW
On Windows 11 with WinLibs GCC 16.1 + CMake 4.3.3, Arrow configure can succeed (with short build paths), but the Arrow build later fails in bundled
re2(~42%). Separate from the Linux CMake issue; details in zvec-go#1.