Skip to content

Commit f49b484

Browse files
fix: bundle Arrow deps (Snappy, zstd, Thrift, xsimd, RapidJSON) to fix build on Debian 12
Arrow requires Snappy, zstd, Thrift, xsimd, and RapidJSON which are not built by the contrib system and may not be available as system packages (e.g. on Debian 12). Use Arrow's per-dependency BUNDLED source mechanism to have Arrow download and build these during the contrib build. Dependencies already provided by contrib (zlib, bzip2, boost) continue to be found via CMAKE_PREFIX_PATH. Remove libthrift-dev/thrift from CI prerequisites since Thrift is now bundled. Fixes OpenMS/OpenMS#8797 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3420d62 commit f49b484

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ jobs:
5959
shell: bash
6060
run: |
6161
if [ "$RUNNER_OS" == "Linux" ]; then
62-
sudo apt-get -y install make autoconf automake tar patch libtool gcc libthrift-dev
62+
sudo apt-get -y install make autoconf automake tar patch libtool gcc
6363
elif [ "$RUNNER_OS" == "Windows" ]; then
6464
# choco install important_windows_software
6565
echo "Nothing to install"
6666
elif [ "$RUNNER_OS" == "macOS" ]; then
67-
brew install autoconf automake libtool thrift
67+
brew install autoconf automake libtool
6868
else
6969
echo "$RUNNER_OS not supported"
7070
exit 1

libraries.cmake/arrow.cmake

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ else()
1313
endif()
1414
OPENMS_SMARTEXTRACT(ZIP_ARGS ARCHIVE_ARROW "ARROW" "README")
1515

16+
## Arrow dependencies not built by the contrib (Snappy, zstd, Thrift, xsimd, RapidJSON)
17+
## are fetched and built as bundled dependencies by Arrow's own build system.
18+
## This avoids requiring these as system packages (fixes build on e.g. Debian 12).
19+
## Dependencies already provided by contrib (zlib, bzip2, boost) are found via CMAKE_PREFIX_PATH.
20+
## Note: building Arrow requires internet access for the bundled dependency downloads.
21+
1622
## build the obj/lib
1723
if (MSVC)
1824
set(ARROW_CXXFLAGS "/I${PROJECT_BINARY_DIR}/include")
@@ -36,6 +42,11 @@ if (MSVC)
3642
-D ARROW_WITH_BZIP2=ON
3743
-D ARROW_WITH_ZSTD=ON
3844
-D ARROW_WITH_SNAPPY=ON
45+
-D Snappy_SOURCE=BUNDLED
46+
-D zstd_SOURCE=BUNDLED
47+
-D Thrift_SOURCE=BUNDLED
48+
-D xsimd_SOURCE=BUNDLED
49+
-D RapidJSON_SOURCE=BUNDLED
3950
.
4051
WORKING_DIRECTORY ${ARROW_DIR}
4152
OUTPUT_VARIABLE ARROW_CMAKE_OUT
@@ -136,6 +147,11 @@ else() ## Linux/MacOS
136147
"-DARROW_WITH_BZIP2=ON"
137148
"-DARROW_WITH_ZSTD=ON"
138149
"-DARROW_WITH_SNAPPY=ON"
150+
"-DSnappy_SOURCE=BUNDLED"
151+
"-Dzstd_SOURCE=BUNDLED"
152+
"-DThrift_SOURCE=BUNDLED"
153+
"-Dxsimd_SOURCE=BUNDLED"
154+
"-DRapidJSON_SOURCE=BUNDLED"
139155
.
140156
WORKING_DIRECTORY ${ARROW_DIR}
141157
OUTPUT_VARIABLE ARROW_CMAKE_OUT

0 commit comments

Comments
 (0)