Skip to content

Commit

Permalink
[VL] Adapt setup-centos8.sh to latest velox helper functions (#7442)
Browse files Browse the repository at this point in the history
  • Loading branch information
liujiayi771 authored Oct 9, 2024
1 parent afec39f commit f37517a
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions ep/build-velox/src/setup-centos8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ CMAKE_BUILD_TYPE="${BUILD_TYPE:-Release}"
BUILD_DUCKDB="${BUILD_DUCKDB:-true}"
export CC=/opt/rh/gcc-toolset-9/root/bin/gcc
export CXX=/opt/rh/gcc-toolset-9/root/bin/g++
DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)/deps-download}

FB_OS_VERSION="v2024.05.20.00"
FMT_VERSION="10.1.1"
Expand Down Expand Up @@ -78,7 +79,7 @@ function install_conda {
function install_openssl {
wget_and_untar https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1s.tar.gz openssl
(
cd openssl
cd ${DEPENDENCY_DIR}/openssl
./config no-shared && make depend && make && sudo make install
)
}
Expand All @@ -87,18 +88,18 @@ function install_gflags {
# Remove an older version if present.
dnf remove -y gflags
wget_and_untar https://github.com/gflags/gflags/archive/v2.2.2.tar.gz gflags
cmake_install gflags -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_LIB=ON -DLIB_SUFFIX=64
cmake_install_dir gflags -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_LIB=ON -DLIB_SUFFIX=64
}

function install_glog {
wget_and_untar https://github.com/google/glog/archive/v0.6.0.tar.gz glog
cmake_install glog -DBUILD_SHARED_LIBS=ON
cmake_install_dir glog -DBUILD_SHARED_LIBS=ON
}

function install_lzo {
wget_and_untar http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz lzo
(
cd lzo
cd ${DEPENDENCY_DIR}/lzo
./configure --prefix=/usr --enable-shared --disable-static --docdir=/usr/share/doc/lzo-2.10
make "-j$(nproc)"
make install
Expand All @@ -108,26 +109,26 @@ function install_lzo {
function install_boost {
wget_and_untar https://github.com/boostorg/boost/releases/download/${BOOST_VERSION}/${BOOST_VERSION}.tar.gz boost
(
cd boost
cd ${DEPENDENCY_DIR}/boost
./bootstrap.sh --prefix=/usr/local
./b2 "-j$(nproc)" -d0 install threading=multi --without-python
)
}

function install_snappy {
wget_and_untar https://github.com/google/snappy/archive/1.1.8.tar.gz snappy
cmake_install snappy -DSNAPPY_BUILD_TESTS=OFF
cmake_install_dir snappy -DSNAPPY_BUILD_TESTS=OFF
}

function install_fmt {
wget_and_untar https://github.com/fmtlib/fmt/archive/${FMT_VERSION}.tar.gz fmt
cmake_install fmt -DFMT_TEST=OFF
cmake_install_dir fmt -DFMT_TEST=OFF
}

function install_protobuf {
wget_and_untar https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protobuf-all-21.8.tar.gz protobuf
(
cd protobuf
cd ${DEPENDENCY_DIR}/protobuf
./configure CXXFLAGS="-fPIC" --prefix=/usr/local
make "-j${NPROC}"
make install
Expand All @@ -137,34 +138,34 @@ function install_protobuf {

function install_fizz {
wget_and_untar https://github.com/facebookincubator/fizz/archive/refs/tags/${FB_OS_VERSION}.tar.gz fizz
cmake_install fizz/fizz -DBUILD_TESTS=OFF
cmake_install_dir fizz/fizz -DBUILD_TESTS=OFF
}

function install_folly {
wget_and_untar https://github.com/facebook/folly/archive/refs/tags/${FB_OS_VERSION}.tar.gz folly
cmake_install folly -DFOLLY_HAVE_INT128_T=ON
cmake_install_dir folly -DFOLLY_HAVE_INT128_T=ON
}

function install_wangle {
wget_and_untar https://github.com/facebook/wangle/archive/refs/tags/${FB_OS_VERSION}.tar.gz wangle
cmake_install wangle/wangle -DBUILD_TESTS=OFF
cmake_install_dir wangle/wangle -DBUILD_TESTS=OFF
}

function install_fbthrift {
wget_and_untar https://github.com/facebook/fbthrift/archive/refs/tags/${FB_OS_VERSION}.tar.gz fbthrift
cmake_install fbthrift -Denable_tests=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF
cmake_install_dir fbthrift -Denable_tests=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF
}

function install_mvfst {
wget_and_untar https://github.com/facebook/mvfst/archive/refs/tags/${FB_OS_VERSION}.tar.gz mvfst
cmake_install mvfst -DBUILD_TESTS=OFF
cmake_install_dir mvfst -DBUILD_TESTS=OFF
}

function install_duckdb {
if $BUILD_DUCKDB ; then
echo 'Building DuckDB'
wget_and_untar https://github.com/duckdb/duckdb/archive/refs/tags/v0.8.1.tar.gz duckdb
cmake_install duckdb -DBUILD_UNITTESTS=OFF -DENABLE_SANITIZER=OFF -DENABLE_UBSAN=OFF -DBUILD_SHELL=OFF -DEXPORT_DLL_SYMBOLS=OFF -DCMAKE_BUILD_TYPE=Release
cmake_install_dir duckdb -DBUILD_UNITTESTS=OFF -DENABLE_SANITIZER=OFF -DENABLE_UBSAN=OFF -DBUILD_SHELL=OFF -DEXPORT_DLL_SYMBOLS=OFF -DCMAKE_BUILD_TYPE=Release
fi
}

Expand Down

0 comments on commit f37517a

Please sign in to comment.