]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake/BuildArrow: Use AUTO mode for xsimd dependency detection
authorKefu Chai <k.chai@proxmox.com>
Wed, 15 Oct 2025 07:46:22 +0000 (15:46 +0800)
committerKefu Chai <k.chai@proxmox.com>
Wed, 15 Oct 2025 07:49:09 +0000 (15:49 +0800)
Arrow requires xsimd >= 9.0.1 according to arrow/cpp/thirdparty/versions.txt.
Previously, we unconditionally set -Dxsimd_SOURCE=BUNDLED, forcing the use
of Arrow's vendored xsimd regardless of system package availability.

This commit changes to -Dxsimd_SOURCE=AUTO, which allows Arrow's
resolve_dependency mechanism to automatically:
1. Try to find system xsimd package
2. Check if version >= 9.0.1
3. Use system version if found and sufficient
4. Fall back to bundled version otherwise

This reduces build time and dependencies on systems with sufficient xsimd,
while maintaining compatibility with older distributions.

Distribution availability:
- Ubuntu Noble (24.04): libxsimd-dev 12.1.1 (✓ will use system)
- Ubuntu Jammy (22.04): libxsimd-dev 7.6.0 (✗ will use bundled)
- Debian Trixie (13): libxsimd-dev 13.2.0 (✓ will use system)
- CentOS Stream 9: xsimd-devel 7.4.9 (✗ will use bundled)

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
cmake/modules/BuildArrow.cmake

index 0ee1d85b49ff18ae9b768a0460d0b73d5fb8ddef..cadc2909fa4fdb99b353d854829b60291c313c1d 100644 (file)
@@ -69,9 +69,9 @@ function(build_arrow)
     list(APPEND arrow_DEPENDS Boost)
   endif()
 
-  # since Arrow 15.0.0 needs xsimd>=8.1.0 and since Ubuntu Jammy
-  # Jellyfish only provides 7.6.0, we'll have arrow build it as source
-  list(APPEND arrow_CMAKE_ARGS -Dxsimd_SOURCE=BUNDLED)
+  # Arrow requires xsimd >= 9.0.1 (see arrow/cpp/thirdparty/versions.txt).
+  # Use AUTO to let Arrow detect system xsimd and fall back to bundled if needed.
+  list(APPEND arrow_CMAKE_ARGS -Dxsimd_SOURCE=AUTO)
 
   # cmake doesn't properly handle arguments containing ";", such as
   # CMAKE_PREFIX_PATH, for which reason we'll have to use some other separator.