From c9a46107ff3b00c9ee0b90720b789b25aa1ec846 Mon Sep 17 00:00:00 2001 From: Joe Abraham Date: Tue, 3 Sep 2024 10:44:22 +0530 Subject: [PATCH] fix setup script --- scripts/setup-macos.sh | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/scripts/setup-macos.sh b/scripts/setup-macos.sh index fa84514b239d8..5d01171052c29 100755 --- a/scripts/setup-macos.sh +++ b/scripts/setup-macos.sh @@ -35,9 +35,11 @@ PYTHON_VENV=${PYHTON_VENV:-"${SCRIPTDIR}/../.venv"} NPROC=$(getconf _NPROCESSORS_ONLN) DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)} -MACOS_VELOX_DEPS="bison boost double-conversion fast_float flex fmt gflags glog googletest icu4c libevent libsodium lz4 lzo openssl protobuf@21 simdjson snappy thrift xz xsimd zstd" +MACOS_VELOX_DEPS="bison flex fast_float fmt gflags glog googletest icu4c libevent libsodium lz4 lzo openssl protobuf@21 simdjson snappy thrift xz zstd" MACOS_BUILD_DEPS="ninja cmake ccache" FB_OS_VERSION="v2024.08.26.00" +XSIMD_VERSION="10.0.0" +BOOST_VERSION="boost-1.84.0" function update_brew { DEFAULT_BREW_PATH=/usr/local/bin/brew @@ -78,6 +80,11 @@ function install_build_prerequisites { source ${PYTHON_VENV}/bin/activate; pip3 install cmake-format regex pyyaml } +function install_xsimd { + wget_and_untar https://github.com/xtensor-stack/xsimd/archive/refs/tags/${XSIMD_VERSION}.tar.gz xsimd + cmake_install xsimd + } + function install_velox_deps_from_brew { for pkg in ${MACOS_VELOX_DEPS} do @@ -89,6 +96,23 @@ function install_proxygen { github_checkout facebook/proxygen "${FB_OS_VERSION}" cmake_install -DBUILD_TESTS=OFF } +function install_boost { + wget_and_untar https://github.com/boostorg/boost/releases/download/${BOOST_VERSION}/${BOOST_VERSION}.tar.gz boost + ( + cd boost + if [[ ${USE_CLANG} != "false" ]]; then + ./bootstrap.sh --prefix=/usr/local --with-toolset="clang-15" + # Switch the compiler from the clang-15 toolset which doesn't exist (clang-15.jam) to + # clang of version 15 when toolset clang-15 is used. + # This reconciles the project-config.jam generation with what the b2 build system allows for customization. + sed -i 's/using clang-15/using clang : 15/g' project-config.jam + ${SUDO} ./b2 "-j${NPROC}" -d0 install threading=multi toolset=clang-15 --without-python + else + ./bootstrap.sh --prefix=/usr/local + ${SUDO} ./b2 "-j${NPROC}" -d0 install threading=multi --without-python + fi + ) + } function install_folly { wget_and_untar https://github.com/facebook/folly/archive/refs/tags/${FB_OS_VERSION}.tar.gz folly @@ -140,13 +164,14 @@ function install_velox_deps { run_and_time install_wangle run_and_time install_mvfst run_and_time install_fbthrift + run_and_time install_boost + run_and_time install_xsimd run_and_time install_proxygen } (return 2> /dev/null) && return # If script was sourced, don't run commands. ( - update_brew if [[ $# -ne 0 ]]; then for cmd in "$@"; do run_and_time "${cmd}"