@@ -75,6 +75,8 @@ function install_gcc11_if_needed {
75
75
FB_OS_VERSION=" v2024.07.01.00"
76
76
FMT_VERSION=" 10.1.1"
77
77
BOOST_VERSION=" boost-1.84.0"
78
+ # Note: when updating arrow check if thrift needs an update as well.
79
+ THRIFT_VERSION=" v0.16.0"
78
80
ARROW_VERSION=" 15.0.0"
79
81
STEMMER_VERSION=" 2.2.0"
80
82
DUCKDB_VERSION=" v0.8.1"
@@ -95,12 +97,12 @@ function install_build_prerequisites {
95
97
git \
96
98
pkg-config \
97
99
wget
98
-
100
+
99
101
if [ ! -f ${PYTHON_VENV} /pyvenv.cfg ]; then
100
102
echo " Creating Python Virtual Environment at ${PYTHON_VENV} "
101
103
python3 -m venv ${PYTHON_VENV}
102
104
fi
103
- source ${PYTHON_VENV} /bin/activate;
105
+ source ${PYTHON_VENV} /bin/activate;
104
106
# Install to /usr/local to make it available to all users.
105
107
${SUDO} pip3 install cmake==3.28.3
106
108
@@ -244,8 +246,23 @@ function install_stemmer {
244
246
)
245
247
}
246
248
249
+ function install_thrift {
250
+ wget_and_untar https://github.com/apache/thrift/archive/${THRIFT_VERSION} .tar.gz thrift
251
+ (
252
+ cd ${DEPENDENCY_DIR} /thrift
253
+ ./bootstrap.sh
254
+ EXTRA_CXXFLAGS=" -O3 -fPIC"
255
+ # Clang will generate warnings and they need to be suppressed, otherwise the build will fail.
256
+ if [[ ${USE_CLANG} != " false" ]]; then
257
+ EXTRA_CXXFLAGS=" -O3 -fPIC -Wno-inconsistent-missing-override -Wno-unused-but-set-variable"
258
+ fi
259
+ ./configure --prefix=${INSTALL_PREFIX} --enable-tests=no --enable-tutorial=no --with-boost=${INSTALL_PREFIX} CXXFLAGS=" ${EXTRA_CXXFLAGS} "
260
+ make " -j${NPROC} " install
261
+ )
262
+ }
263
+
247
264
function install_arrow {
248
- wget_and_untar https://archive. apache.org/dist/ arrow/arrow- ${ARROW_VERSION} /apache-arrow-${ARROW_VERSION} .tar.gz arrow
265
+ wget_and_untar https://github.com/ apache/ arrow/archive /apache-arrow-${ARROW_VERSION} .tar.gz arrow
249
266
cmake_install_dir arrow/cpp \
250
267
-DARROW_PARQUET=OFF \
251
268
-DARROW_WITH_THRIFT=ON \
@@ -261,14 +278,7 @@ function install_arrow {
261
278
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
262
279
-DCMAKE_BUILD_TYPE=Release \
263
280
-DARROW_BUILD_STATIC=ON \
264
- -DThrift_SOURCE=BUNDLED \
265
281
-DBOOST_ROOT=${INSTALL_PREFIX}
266
-
267
- (
268
- # Install thrift.
269
- cd ${DEPENDENCY_DIR} /arrow/cpp/_build/thrift_ep-prefix/src/thrift_ep-build
270
- $SUDO cmake --install ./ --prefix ${INSTALL_PREFIX}
271
- )
272
282
}
273
283
274
284
function install_cuda {
@@ -296,6 +306,7 @@ function install_velox_deps {
296
306
run_and_time install_conda
297
307
run_and_time install_duckdb
298
308
run_and_time install_stemmer
309
+ run_and_time install_thrift
299
310
run_and_time install_arrow
300
311
}
301
312
0 commit comments