Skip to content

Commit

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

The boost_headers target was added to Boost first
in version 1.82 and are now removed from the
Velox bundled CMakeLists.

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.
  • Loading branch information
czentgr committed Feb 8, 2024
1 parent fe52e60 commit 6443521
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
8 changes: 4 additions & 4 deletions CMake/resolve_dependency_modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Following is the list of libraries and their minimum version
that Velox requires. Some of these libraries can be installed
via a platform's package manager (eg. `brew` on MacOS).
The versions of certain libraries is the default provided by
The versions of certain libraries is the default provided by
the platform's package manager. Some libraries can be bundled
by Velox. See details on bundling below.

| Library Name | Minimum Version | Bundled? |
| Library Name | Minimum Version | Bundled? |
|-------------------|-----------------|----------|
| ninja | default | No |
| ccache | default | No |
Expand All @@ -16,14 +16,14 @@ by Velox. See details on bundling below.
| gtest (testing) | default | Yes |
| libevent | default | No |
| libsodium | default | No |
| lz4 | default | No |
| lz4 | default | No |
| snappy | default | No |
| lzo | default | No |
| xz | default | No |
| zstd | default | No |
| openssl | default | No |
| protobuf | 21 (exact) | Yes |
| boost | 1.66.0 | Yes |
| boost | 1.84.0 | Yes |
| flex | 2.5.13 | No |
| bison | 3.0.4 | No |
| cmake | 3.14 | No |
Expand Down
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 CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ set(BOOST_INCLUDE_LIBRARIES
thread)

set_source(Boost)
resolve_dependency(Boost 1.66.0 COMPONENTS ${BOOST_INCLUDE_LIBRARIES})
resolve_dependency(Boost 1.84.0 COMPONENTS ${BOOST_INCLUDE_LIBRARIES})

# Range-v3 will be enable when the codegen code actually lands keeping it here
# for reference. find_package(range-v3)
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup-centos8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function cmake_install {
wget_and_untar https://github.com/gflags/gflags/archive/v2.2.2.tar.gz gflags
wget_and_untar https://github.com/google/glog/archive/v0.6.0.tar.gz glog
wget_and_untar http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz lzo
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
wget_and_untar https://github.com/google/snappy/archive/1.1.8.tar.gz snappy
wget_and_untar https://github.com/fmtlib/fmt/archive/10.1.1.tar.gz fmt

Expand Down
11 changes: 9 additions & 2 deletions scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ CPU_TARGET="${CPU_TARGET:-avx}"
COMPILER_FLAGS=$(get_cxx_flags "$CPU_TARGET")
export COMPILER_FLAGS
FB_OS_VERSION=v2023.12.04.00
BOOST_VERSION=boost-1.84.0
NPROC=$(getconf _NPROCESSORS_ONLN)
DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)}
export CMAKE_BUILD_TYPE=Release

# Install all velox and folly dependencies.
# 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.
apt update && apt install sudo
Expand All @@ -43,7 +44,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 \
libfmt-dev \
Expand Down Expand Up @@ -87,6 +87,12 @@ function prompt {
) 2> /dev/null
}

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 @@ -120,6 +126,7 @@ function install_conda {
}

function install_velox_deps {
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 6443521

Please sign in to comment.