Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lib stemmer in setup scripts #10984

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
- "CMakeLists.txt"
- "CMake/**"
- "third_party/**"
- "scripts/setup-macos.sh"
- ".github/workflows/macos.yml"

pull_request:
Expand All @@ -31,6 +32,7 @@ on:
- "CMakeLists.txt"
- "CMake/**"
- "third_party/**"
- "scripts/setup-macos.sh"
- ".github/workflows/macos.yml"

permissions:
Expand Down
13 changes: 13 additions & 0 deletions scripts/setup-centos9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ FMT_VERSION="10.1.1"
BOOST_VERSION="boost-1.84.0"
ARROW_VERSION="15.0.0"
FAST_FLOAT_VERSION="v6.1.6"
STEMMER_VERSION="2.2.0"

function dnf_install {
dnf install -y -q --setopt=install_weak_deps=False "$@"
Expand Down Expand Up @@ -178,6 +179,17 @@ function install_duckdb {
fi
}

function install_stemmer {
wget_and_untar https://snowballstem.org/dist/libstemmer_c-${STEMMER_VERSION}.tar.gz stemmer
(
cd ${DEPENDENCY_DIR}/stemmer
sed -i '/CPPFLAGS=-Iinclude/ s/$/ -fPIC/' Makefile
make clean && make "-j${NPROC}"
${SUDO} cp libstemmer.a ${INSTALL_PREFIX}/lib/
${SUDO} cp include/libstemmer.h ${INSTALL_PREFIX}/include/
)
}

function install_arrow {
wget_and_untar https://archive.apache.org/dist/arrow/arrow-${ARROW_VERSION}/apache-arrow-${ARROW_VERSION}.tar.gz arrow
cmake_install_dir arrow/cpp \
Expand Down Expand Up @@ -233,6 +245,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
}

Expand Down
13 changes: 13 additions & 0 deletions scripts/setup-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ MACOS_BUILD_DEPS="ninja cmake"
FB_OS_VERSION="v2024.09.16.00"
FMT_VERSION="10.1.1"
FAST_FLOAT_VERSION="v6.1.6"
STEMMER_VERSION="2.2.0"

function update_brew {
DEFAULT_BREW_PATH=/usr/local/bin/brew
Expand Down Expand Up @@ -157,6 +158,17 @@ function install_duckdb {
fi
}

function install_stemmer {
wget_and_untar https://snowballstem.org/dist/libstemmer_c-${STEMMER_VERSION}.tar.gz stemmer
(
cd ${DEPENDENCY_DIR}/stemmer
sed -i '/CPPFLAGS=-Iinclude/ s/$/ -fPIC/' Makefile
make clean && make "-j${NPROC}"
${SUDO} cp libstemmer.a ${INSTALL_PREFIX}/lib/
${SUDO} cp include/libstemmer.h ${INSTALL_PREFIX}/include/
)
}

function install_velox_deps {
run_and_time install_velox_deps_from_brew
run_and_time install_ranges_v3
Expand All @@ -170,6 +182,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
}

(return 2> /dev/null) && return # If script was sourced, don't run commands.
Expand Down
13 changes: 13 additions & 0 deletions scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ FMT_VERSION="10.1.1"
BOOST_VERSION="boost-1.84.0"
ARROW_VERSION="15.0.0"
FAST_FLOAT_VERSION="v6.1.6"
STEMMER_VERSION="2.2.0"

# Install packages required for build.
function install_build_prerequisites {
Expand Down Expand Up @@ -186,6 +187,17 @@ function install_duckdb {
fi
}

function install_stemmer {
wget_and_untar https://snowballstem.org/dist/libstemmer_c-${STEMMER_VERSION}.tar.gz stemmer
(
cd ${DEPENDENCY_DIR}/stemmer
sed -i '/CPPFLAGS=-Iinclude/ s/$/ -fPIC/' Makefile
make clean && make "-j${NPROC}"
${SUDO} cp libstemmer.a ${INSTALL_PREFIX}/lib/
${SUDO} cp include/libstemmer.h ${INSTALL_PREFIX}/include/
)
}

function install_arrow {
wget_and_untar https://archive.apache.org/dist/arrow/arrow-${ARROW_VERSION}/apache-arrow-${ARROW_VERSION}.tar.gz arrow
cmake_install_dir arrow/cpp \
Expand Down Expand Up @@ -241,6 +253,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
}

Expand Down
Loading