Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] Bump Boost to 1.81.0 #2940

Merged
merged 4 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
cxx: g++

- name: Linux-latest
os: ubuntu-latest
os: ubuntu-22.04
python-version: '3.8'
packages: python3-zmq qttools5-dev qtbase5-dev qttools5-dev-tools libqt5svg5-dev libqt5charts5-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev libgmp-dev libsodium-dev cargo
cc: gcc
Expand All @@ -108,15 +108,15 @@ jobs:
- name: macOS
os: macos-12
python-version: '3.8'
packages: llvm@13 autoconf automake berkeley-db@4 libtool boost@1.76 miniupnpc libnatpmp pkg-config qt@5 zmq libevent qrencode gmp libsodium
packages: llvm@13 autoconf automake berkeley-db@4 libtool boost miniupnpc libnatpmp pkg-config qt@5 zmq libevent qrencode gmp libsodium
boost_root: true
cc: $(brew --prefix llvm@13)/bin/clang
cxx: $(brew --prefix llvm@13)/bin/clang++

- name: macOS-latest
os: macos-14
python-version: '3.10'
packages: llvm@14 autoconf automake berkeley-db@4 libtool boost@1.76 miniupnpc libnatpmp pkg-config qt@5 zmq libevent qrencode gmp libsodium
packages: llvm@14 autoconf automake berkeley-db@4 libtool boost miniupnpc libnatpmp pkg-config qt@5 zmq libevent qrencode gmp libsodium
boost_root: true
cc: $(brew --prefix llvm@14)/bin/clang
cxx: $(brew --prefix llvm@14)/bin/clang++
Expand Down Expand Up @@ -165,11 +165,11 @@ jobs:
if [ "${{ matrix.config.boost_root }}" = "true" ]; then
export CI_BOOST=1
if [ "${{ matrix.config.os }}" = "macos-14" ]; then
export LDFLAGS="-L/opt/homebrew/opt/boost@1.76/lib"
export CPPFLAGS="-I/opt/homebrew/opt/boost@1.76/include"
export LDFLAGS="-L/opt/homebrew/opt/boost/lib"
export CPPFLAGS="-I/opt/homebrew/opt/boost/include"
else
export CPPFLAGS="-I/usr/local/opt/boost@1.76/include -I/usr/local/opt/berkeley-db@4/include"
export LDFLAGS="-L/usr/local/opt/boost@1.76/lib -L/usr/local/opt/berkeley-db@4/lib"
export CPPFLAGS="-I/usr/local/opt/boost/include -I/usr/local/opt/berkeley-db@4/include"
export LDFLAGS="-L/usr/local/opt/boost/lib -L/usr/local/opt/berkeley-db@4/lib"
fi
fi
fi
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:

- name: x64-Linux-latest
id: Linux-x86_64-nodepends-latest
os: ubuntu-latest
os: ubuntu-22.04
python-version: '3.8'
packages: python3-zmq qtbase5-dev qttools5-dev-tools libqt5svg5-dev libqt5charts5-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libgmp-dev libsodium-dev cargo
unit_tests: true
Expand All @@ -228,24 +228,24 @@ jobs:
id: macOS-nodepends
os: macos-12
python-version: '3.8'
packages: autoconf automake ccache berkeley-db@4 libtool boost@1.76 miniupnpc libnatpmp pkg-config qt@5 zmq libevent qrencode gmp libsodium librsvg
packages: autoconf automake ccache berkeley-db@4 libtool boost miniupnpc libnatpmp pkg-config qt@5 zmq libevent qrencode gmp libsodium librsvg
unit_tests: true
functional_tests: true
cc: clang
cxx: clang++
BITCOIN_CONFIG: "--enable-zmq --enable-gui --enable-reduce-exports --enable-werror --enable-debug --with-boost=/usr/local/opt/boost@1.76"
BITCOIN_CONFIG: "--enable-zmq --enable-gui --enable-reduce-exports --enable-werror --enable-debug --with-boost=/usr/local/opt/boost"

- name: arm64-macOS-latest
id: macOS-nodepends-latest
os: macos-14
python-version: '3.10'
packages: autoconf automake ccache berkeley-db@4 libtool boost@1.76 miniupnpc libnatpmp pkg-config qt@5 zmq libevent qrencode gmp libsodium librsvg
packages: autoconf automake ccache berkeley-db@4 libtool boost miniupnpc libnatpmp pkg-config qt@5 zmq libevent qrencode gmp libsodium librsvg
unit_tests: true
functional_tests: true
goal: deploy
cc: clang
cxx: clang++
BITCOIN_CONFIG: "--enable-zmq --enable-gui --enable-reduce-exports --enable-werror --enable-debug --with-boost=/opt/homebrew/opt/boost@1.76"
BITCOIN_CONFIG: "--enable-zmq --enable-gui --enable-reduce-exports --enable-werror --enable-debug --with-boost=/opt/homebrew/opt/boost"

steps:
- name: Get Source
Expand Down Expand Up @@ -297,8 +297,8 @@ jobs:
fi

if [ "${{ matrix.config.os }}" = "macos-12" ]; then
export CPPFLAGS="-I/usr/local/opt/boost@1.76/include -I/usr/local/opt/berkeley-db@4/include"
export LDFLAGS="-L/usr/local/opt/boost@1.76/lib -L/usr/local/opt/berkeley-db@4/lib"
export CPPFLAGS="-I/usr/local/opt/boost/include -I/usr/local/opt/berkeley-db@4/include"
export LDFLAGS="-L/usr/local/opt/boost/lib -L/usr/local/opt/berkeley-db@4/lib"
fi

if [[ ${{ matrix.config.os }} = ubuntu* ]]; then
Expand Down Expand Up @@ -383,21 +383,21 @@ jobs:

- name: x64-Linux-latest
id: Linux-x86_64-nodepends-latest-tests
os: ubuntu-latest
os: ubuntu-22.04
python-version: '3.8'
packages: python3-zmq libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libgmp-dev libsodium-dev

- name: x64-macOS
id: macOS-nodepends
os: macos-12
python-version: '3.8'
packages: berkeley-db@4 boost@1.76 miniupnpc libnatpmp pkg-config zmq libevent qrencode gmp libsodium
packages: berkeley-db@4 boost miniupnpc libnatpmp pkg-config zmq libevent qrencode gmp libsodium

- name: arm64-macOS-latest
id: macOS-nodepends-latest
os: macos-14
python-version: '3.10'
packages: berkeley-db@4 boost@1.76 miniupnpc libnatpmp pkg-config zmq libevent qrencode gmp libsodium
packages: berkeley-db@4 boost miniupnpc libnatpmp pkg-config zmq libevent qrencode gmp libsodium

steps:
- name: Initialize Python
Expand Down
27 changes: 18 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,15 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# Github Actions specific Boost override (macOS only)
if(DEFINED ENV{CI_BOOST})
if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm")
set(BOOST_R "--with-boost=/opt/homebrew/opt/boost@1.76")
set(ENV{BOOSTROOT} "/opt/homebrew/opt/boost@1.76")
set(BOOST_R "--with-boost=/opt/homebrew/opt/boost")
set(ENV{BOOSTROOT} "/opt/homebrew/opt/boost")
else()
set(BOOST_R "--with-boost=/usr/local/opt/boost@1.76")
set(ENV{BOOSTROOT} "/usr/local/opt/boost@1.76")
set(BOOST_R "--with-boost=/usr/local/opt/boost")
set(ENV{BOOSTROOT} "/usr/local/opt/boost")
endif()
message(STATUS "Boost Root set to: ${BOOST_R}")
endif()
set(Boost_USE_MULTITHREADED ON)
set(Boost_NO_BOOST_CMAKE ON)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(ENV{target} "Linux")
file(READ "/proc/version" _SYS_VERSION)
Expand Down Expand Up @@ -94,15 +93,25 @@ if(BerkeleyDB_FOUND)
endif()
endif()

find_package(LibEvent REQUIRED)
# Find required Boost library dependency
set(Boost_USE_STATIC_LIBS ON)
set(Boost_VERBOSE ON)
# Use the new upstream BoostConfig.cmake for CMake versions starting with 3.30.0
if(CMAKE_VERSION VERSION_LESS "3.30.0")
else()
cmake_policy(SET CMP0167 NEW)
endif()
find_package(Boost COMPONENTS system filesystem chrono thread unit_test_framework REQUIRED)

# Other required library dependencies
find_package(GMP REQUIRED)
find_package(LibEvent REQUIRED)
find_package(Sodium REQUIRED)

find_package(ZMQ)
# Optional library dependencies
find_package(Miniupnp)
find_package(NAT-PMP)
find_package(Boost COMPONENTS system filesystem chrono thread REQUIRED)
find_package(Sodium REQUIRED)
find_package(ZMQ)

include_directories(${GMP_INCLUDE_DIR})

Expand Down
8 changes: 4 additions & 4 deletions depends/packages/boost.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package=boost
$(package)_version=1_71_0
$(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/
$(package)_file_name=boost_$($(package)_version).tar.bz2
$(package)_sha256_hash=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee
$(package)_version=1.81.0
$(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$($(package)_version)/source/
$(package)_file_name=boost_$(subst .,_,$($(package)_version)).tar.bz2
$(package)_sha256_hash=71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa
$(package)_dependencies=native_b2

define $(package)_set_vars
Expand Down
2 changes: 1 addition & 1 deletion depends/packages/expat.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package=expat
$(package)_version=2.2.6
$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_2_2_6/
$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$($(package)_version))/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2

Expand Down
3 changes: 0 additions & 3 deletions src/bench/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.14)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(Boost_USE_STATIC_LIBS ON)
find_package(Boost COMPONENTS system filesystem chrono thread unit_test_framework REQUIRED)

set(RAW_TEST_FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/block2680960.raw)

# Generate raw files
Expand Down
3 changes: 0 additions & 3 deletions src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.14)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(Boost_USE_STATIC_LIBS ON)
find_package(Boost COMPONENTS system filesystem chrono thread unit_test_framework REQUIRED)

set(JSON_TEST_FILES
${CMAKE_CURRENT_SOURCE_DIR}/data/script_tests.json
${CMAKE_CURRENT_SOURCE_DIR}/data/base58_keys_valid.json
Expand Down
Loading