diff --git a/scripts/setup-centos9.sh b/scripts/setup-centos9.sh index 825d2d29e32a0..b9c7a8f701460 100755 --- a/scripts/setup-centos9.sh +++ b/scripts/setup-centos9.sh @@ -41,6 +41,7 @@ FB_OS_VERSION="v2024.05.20.00" FMT_VERSION="10.1.1" BOOST_VERSION="boost-1.84.0" ARROW_VERSION="15.0.0" +STEMMER_VERSION="2.2.0" function dnf_install { dnf install -y -q --setopt=install_weak_deps=False "$@" @@ -175,6 +176,17 @@ function install_duckdb { fi } +function install_stemmer { + wget_and_untar https://snowballstem.org/dist/libstemmer_c-${STEMMER_VERSION}.tar.gz stemmer + ( + cd stemmer + sed -i '/CPPFLAGS=-Iinclude/ s/$/ -fPIC/' Makefile + make clean && make "-j${NPROC}" + ${SUDO} cp libstemmer.a /usr/local/lib/ + ${SUDO} cp include/libstemmer.h /usr/local/include/ + ) +} + function install_arrow { wget_and_untar https://archive.apache.org/dist/arrow/arrow-${ARROW_VERSION}/apache-arrow-${ARROW_VERSION}.tar.gz arrow ( @@ -224,6 +236,7 @@ function install_velox_deps { run_and_time install_mvfst run_and_time install_fbthrift run_and_time install_duckdb + run_and_time install_stemmer run_and_time install_arrow } diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index e40bba1d99232..114ae3b371d24 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -57,6 +57,7 @@ FB_OS_VERSION="v2024.05.20.00" FMT_VERSION="10.1.1" BOOST_VERSION="boost-1.84.0" ARROW_VERSION="15.0.0" +STEMMER_VERSION="2.2.0" # Install packages required for build. function install_build_prerequisites { @@ -184,6 +185,17 @@ function install_duckdb { fi } +function install_stemmer { + wget_and_untar https://snowballstem.org/dist/libstemmer_c-${STEMMER_VERSION}.tar.gz stemmer + ( + cd stemmer + sed -i '/CPPFLAGS=-Iinclude/ s/$/ -fPIC/' Makefile + make clean && make "-j${NPROC}" + ${SUDO} cp libstemmer.a /usr/local/lib/ + ${SUDO} cp include/libstemmer.h /usr/local/include/ + ) +} + function install_arrow { wget_and_untar https://archive.apache.org/dist/arrow/arrow-${ARROW_VERSION}/apache-arrow-${ARROW_VERSION}.tar.gz arrow ( @@ -233,6 +245,7 @@ function install_velox_deps { run_and_time install_fbthrift run_and_time install_conda run_and_time install_duckdb + run_and_time install_stemmer run_and_time install_arrow }