Skip to content

Commit

Permalink
Download source code archive directly for ubuntu and macos setup
Browse files Browse the repository at this point in the history
  • Loading branch information
liujiayi771 committed Mar 21, 2024
1 parent 0e65b22 commit 99cca16
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 42 deletions.
12 changes: 7 additions & 5 deletions scripts/setup-centos8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export CPPFLAGS=$CFLAGS # Used by LZO.
CMAKE_BUILD_TYPE="${BUILD_TYPE:-Release}"
BUILD_DUCKDB="${BUILD_DUCKDB:-true}"

FB_OS_VERSION="v2023.12.04.00"
FMT_VERSION="10.1.1"
BOOST_VERSION="boost-1.84.0"

function dnf_install {
dnf install -y -q --setopt=install_weak_deps=False "$@"
}
Expand Down Expand Up @@ -80,7 +84,7 @@ function install_lzo {
}

function install_boost {
wget_and_untar https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.gz boost
wget_and_untar https://github.com/boostorg/boost/releases/download/${BOOST_VERSION}/${BOOST_VERSION}.tar.gz boost
(
cd boost
./bootstrap.sh --prefix=/usr/local
Expand All @@ -97,7 +101,7 @@ function install_snappy {
}

function install_fmt {
wget_and_untar https://github.com/fmtlib/fmt/archive/10.1.1.tar.gz fmt
wget_and_untar https://github.com/fmtlib/fmt/archive/${FMT_VERSION}.tar.gz fmt
(
cd fmt
cmake_install -DFMT_TEST=OFF
Expand All @@ -115,8 +119,6 @@ function install_protobuf {
)
}

FB_OS_VERSION="v2023.12.04.00"

function install_fizz {
wget_and_untar https://github.com/facebookincubator/fizz/archive/refs/tags/${FB_OS_VERSION}.tar.gz fizz
(
Expand All @@ -129,7 +131,7 @@ function install_folly {
wget_and_untar https://github.com/facebook/folly/archive/refs/tags/${FB_OS_VERSION}.tar.gz folly
(
cd folly
cmake_install -DFOLLY_HAVE_INT128_T=ON
cmake_install -DBUILD_TESTS=OFF -DFOLLY_HAVE_INT128_T=ON
)
}

Expand Down
65 changes: 46 additions & 19 deletions scripts/setup-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)}
MACOS_DEPS="ninja flex bison cmake ccache protobuf@21 icu4c boost gflags glog libevent lz4 lzo snappy xz zstd openssl libsodium"

FB_OS_VERSION="v2023.12.04.00"
FMT_VERSION="10.1.1"

function update_brew {
DEFAULT_BREW_PATH=/usr/local/bin/brew
Expand Down Expand Up @@ -70,49 +71,75 @@ function install_build_prerequisites {
}

function install_fmt {
github_checkout fmtlib/fmt 10.1.1
cmake_install -DFMT_TEST=OFF
wget_and_untar https://github.com/fmtlib/fmt/archive/${FMT_VERSION}.tar.gz fmt
(
cd fmt
cmake_install -DFMT_TEST=OFF
)
}

function install_folly {
github_checkout facebook/folly "${FB_OS_VERSION}"
cmake_install -DBUILD_TESTS=OFF -DFOLLY_HAVE_INT128_T=ON
wget_and_untar https://github.com/facebook/folly/archive/refs/tags/${FB_OS_VERSION}.tar.gz folly
(
cd folly
cmake_install -DBUILD_TESTS=OFF -DFOLLY_HAVE_INT128_T=ON
)
}

function install_fizz {
github_checkout facebookincubator/fizz "${FB_OS_VERSION}"
cmake_install -DBUILD_TESTS=OFF -S fizz
wget_and_untar https://github.com/facebookincubator/fizz/archive/refs/tags/${FB_OS_VERSION}.tar.gz fizz
(
cd fizz/fizz
cmake_install -DBUILD_TESTS=OFF -S fizz
)
}

function install_wangle {
github_checkout facebook/wangle "${FB_OS_VERSION}"
cmake_install -DBUILD_TESTS=OFF -S wangle
wget_and_untar https://github.com/facebook/wangle/archive/refs/tags/${FB_OS_VERSION}.tar.gz wangle
(
cd wangle/wangle
cmake_install -DBUILD_TESTS=OFF -S wangle
)
}

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


function install_fbthrift {
github_checkout facebook/fbthrift "${FB_OS_VERSION}"
cmake_install -DBUILD_TESTS=OFF
wget_and_untar https://github.com/facebook/fbthrift/archive/refs/tags/${FB_OS_VERSION}.tar.gz fbthrift
(
cd fbthrift
cmake_install -Denable_tests=OFF
)
}

function install_double_conversion {
github_checkout google/double-conversion v3.1.5
cmake_install -DBUILD_TESTING=OFF
wget_and_untar https://github.com/google/double-conversion/archive/refs/tags/v3.1.5.tar.gz double-conversion
(
cd double-conversion
cmake_install -DBUILD_TESTING=OFF
)
}

function install_ranges_v3 {
github_checkout ericniebler/range-v3 0.12.0
cmake_install -DRANGES_ENABLE_WERROR=OFF -DRANGE_V3_TESTS=OFF -DRANGE_V3_EXAMPLES=OFF
wget_and_untar https://github.com/ericniebler/range-v3/archive/refs/tags/0.12.0.tar.gz ranges_v3
(
cd ranges_v3
cmake_install -DRANGES_ENABLE_WERROR=OFF -DRANGE_V3_TESTS=OFF -DRANGE_V3_EXAMPLES=OFF
)
}

function install_re2 {
github_checkout google/re2 2021-04-01
cmake_install -DRE2_BUILD_TESTING=OFF
wget_and_untar https://github.com/google/re2/archive/refs/tags/2021-04-01.tar.gz re2
(
cd re2
cmake_install -DRE2_BUILD_TESTING=OFF
)
}

function install_velox_deps {
Expand Down
59 changes: 41 additions & 18 deletions scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ source $SCRIPTDIR/setup-helper-functions.sh
CPU_TARGET="${CPU_TARGET:-avx}"
COMPILER_FLAGS=$(get_cxx_flags "$CPU_TARGET")
export COMPILER_FLAGS
FB_OS_VERSION=v2023.12.04.00
FMT_VERSION=10.1.1
BOOST_VERSION=boost-1.84.0
NPROC=$(getconf _NPROCESSORS_ONLN)
DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)}
export CMAKE_BUILD_TYPE=Release
SUDO="${SUDO:-"sudo --preserve-env"}"

FB_OS_VERSION="v2023.12.04.00"
FMT_VERSION="10.1.1"
BOOST_VERSION="boost-1.84.0"

# Install all velox and folly dependencies.
# The is an issue on 22.04 where a version conflict prevents glog install,
# installing libunwind first fixes this.
Expand All @@ -41,6 +42,7 @@ ${SUDO} apt install -y \
g++ \
cmake \
ccache \
curl \
ninja-build \
checkinstall \
git \
Expand Down Expand Up @@ -70,39 +72,60 @@ ${SUDO} apt install -y \
wget

function install_fmt {
github_checkout fmtlib/fmt "${FMT_VERSION}"
cmake_install -DFMT_TEST=OFF
wget_and_untar https://github.com/fmtlib/fmt/archive/${FMT_VERSION}.tar.gz fmt
(
cd fmt
cmake_install -DFMT_TEST=OFF
)
}

function install_boost {
github_checkout boostorg/boost "${BOOST_VERSION}" --recursive
./bootstrap.sh --prefix=/usr/local
${SUDO} ./b2 "-j$(nproc)" -d0 install threading=multi
wget_and_untar https://github.com/boostorg/boost/releases/download/${BOOST_VERSION}/${BOOST_VERSION}.tar.gz boost
(
cd boost
./bootstrap.sh --prefix=/usr/local
${SUDO} ./b2 "-j$(nproc)" -d0 install threading=multi
)
}

function install_folly {
github_checkout facebook/folly "${FB_OS_VERSION}"
cmake_install -DBUILD_TESTS=OFF -DFOLLY_HAVE_INT128_T=ON
wget_and_untar https://github.com/facebook/folly/archive/refs/tags/${FB_OS_VERSION}.tar.gz folly
(
cd folly
cmake_install -DBUILD_TESTS=OFF -DFOLLY_HAVE_INT128_T=ON
)
}

function install_fizz {
github_checkout facebookincubator/fizz "${FB_OS_VERSION}"
cmake_install -DBUILD_TESTS=OFF -S fizz
wget_and_untar https://github.com/facebookincubator/fizz/archive/refs/tags/${FB_OS_VERSION}.tar.gz fizz
(
cd fizz/fizz
cmake_install -DBUILD_TESTS=OFF -S fizz
)
}

function install_wangle {
github_checkout facebook/wangle "${FB_OS_VERSION}"
cmake_install -DBUILD_TESTS=OFF -S wangle
wget_and_untar https://github.com/facebook/wangle/archive/refs/tags/${FB_OS_VERSION}.tar.gz wangle
(
cd wangle/wangle
cmake_install -DBUILD_TESTS=OFF -S wangle
)
}

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

function install_fbthrift {
github_checkout facebook/fbthrift "${FB_OS_VERSION}"
cmake_install -DBUILD_TESTS=OFF
wget_and_untar https://github.com/facebook/fbthrift/archive/refs/tags/${FB_OS_VERSION}.tar.gz fbthrift
(
cd fbthrift
cmake_install -Denable_tests=OFF
)
}

function install_conda {
Expand Down

0 comments on commit 99cca16

Please sign in to comment.