Skip to content

Commit

Permalink
Upgrade Boost to 1.84.0 (#8679)
Browse files Browse the repository at this point in the history
Summary:
The boost version 1.84.0 fixes a bug that prevents
the addition of a group of inverse functions.
The fix was provided in Boost PR
boostorg/math#1007

The update occurs for the setup scripts for CentOS and Ubuntu. MacOS already installs the
latest available Boost version on brew.

In addition, the requirement for the Boost version is updated to make sure the proper version is used.
There is no known build problem when upgrading the version.
Fixes issue: #8624

Pull Request resolved: #8679

Reviewed By: Yuhta

Differential Revision: D54384316

Pulled By: kgpai

fbshipit-source-id: 7442b028a9b2f1b36b3190a7909a4a55ef52e72c
  • Loading branch information
czentgr authored and facebook-github-bot committed Mar 1, 2024
1 parent a38891a commit 6d50a1d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
7 changes: 2 additions & 5 deletions CMake/resolve_dependency_modules/boost/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ add_compile_options(-w)
# We need to use boost > 1.70 to build it with CMake 1.81 was the first to be
# released as a github release INCLUDING the cmake files (which are not in the
# officale releases for some reason)
set(VELOX_BOOST_BUILD_VERSION 1.81.0)
set(VELOX_BOOST_BUILD_VERSION 1.84.0)
string(
CONCAT VELOX_BOOST_SOURCE_URL
"https://github.com/boostorg/boost/releases/download/"
"boost-${VELOX_BOOST_BUILD_VERSION}/"
"boost-${VELOX_BOOST_BUILD_VERSION}.tar.gz")
set(VELOX_BOOST_BUILD_SHA256_CHECKSUM
121da556b718fd7bd700b5f2e734f8004f1cfa78b7d30145471c526ba75a151c)
4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95)

resolve_dependency_url(BOOST)
message(STATUS "Building boost from source")
Expand Down Expand Up @@ -65,8 +65,5 @@ list(REMOVE_ITEM BOOST_INCLUDE_LIBRARIES headers)
set(BUILD_SHARED_LIBS ON)
FetchContent_MakeAvailable(Boost)

# To aling with Boost system install we create Boost::headers target
add_library(boost_headers INTERFACE)
add_library(Boost::headers ALIAS boost_headers)
list(TRANSFORM BOOST_HEADER_ONLY PREPEND Boost::)
target_link_libraries(boost_headers INTERFACE ${BOOST_HEADER_ONLY})
2 changes: 1 addition & 1 deletion scripts/setup-centos8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function install_lzo {
}

function install_boost {
wget_and_untar https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.gz boost
wget_and_untar https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.gz boost
(
cd boost
./bootstrap.sh --prefix=/usr/local
Expand Down
9 changes: 8 additions & 1 deletion scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ 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
Expand All @@ -44,7 +45,6 @@ sudo --preserve-env apt update && sudo --preserve-env apt install -y libunwind-d
libc-ares-dev \
libcurl4-openssl-dev \
libssl-dev \
libboost-all-dev \
libicu-dev \
libdouble-conversion-dev \
libgoogle-glog-dev \
Expand Down Expand Up @@ -72,6 +72,12 @@ function install_fmt {
cmake_install -DFMT_TEST=OFF
}

function install_boost {
github_checkout boostorg/boost "${BOOST_VERSION}" --recursive
./bootstrap.sh --prefix=/usr/local
./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
Expand Down Expand Up @@ -115,6 +121,7 @@ function install_conda {

function install_velox_deps {
run_and_time install_fmt
run_and_time install_boost
run_and_time install_folly
run_and_time install_fizz
run_and_time install_wangle
Expand Down

0 comments on commit 6d50a1d

Please sign in to comment.