Skip to content

Commit

Permalink
build(core): Update Boost to v1.87.0 in order to pull in boost::urls;…
Browse files Browse the repository at this point in the history
… Replace calls to boost::asio's deprecated `expires_from_now` with `expires_after`. (y-scope#636)
  • Loading branch information
gibber9809 authored Dec 16, 2024
1 parent ddba9b9 commit 9ced086
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion components/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ endif()
if(CLP_USE_STATIC_LIBS)
set(Boost_USE_STATIC_LIBS ON)
endif()
find_package(Boost 1.74 REQUIRED iostreams program_options filesystem system regex)
find_package(Boost 1.81 REQUIRED iostreams program_options filesystem system regex url)
if(Boost_FOUND)
message(STATUS "Found Boost ${Boost_VERSION}")
else()
Expand Down
7 changes: 3 additions & 4 deletions components/core/src/reducer/reducer_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void PeriodicUpsertTask::operator()([[maybe_unused]] boost::system::error_code c
}

auto& upsert_timer = m_server_ctx->get_upsert_timer();
upsert_timer.expires_from_now(std::chrono::milliseconds(m_server_ctx->get_upsert_interval()));
upsert_timer.expires_after(std::chrono::milliseconds(m_server_ctx->get_upsert_interval()));
upsert_timer.async_wait(PeriodicUpsertTask(m_server_ctx));
}

Expand Down Expand Up @@ -205,9 +205,8 @@ void SchedulerUpdateListenerTask::operator()(

if (m_server_ctx->is_timeline_aggregation()) {
auto& upsert_timer = m_server_ctx->get_upsert_timer();
upsert_timer.expires_from_now(
std::chrono::milliseconds(m_server_ctx->get_upsert_interval())
);
upsert_timer.expires_after(std::chrono::milliseconds(m_server_ctx->get_upsert_interval()
));
upsert_timer.async_wait(PeriodicUpsertTask(m_server_ctx));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
lib_install_scripts_dir="${script_dir}/.."

# NOTE: The remaining installation scripts depend on boost, so we install it beforehand.
"${lib_install_scripts_dir}/install-boost.sh" 1.76.0
"${lib_install_scripts_dir}/install-boost.sh" 1.87.0

"${lib_install_scripts_dir}/fmtlib.sh" 8.0.1
"${lib_install_scripts_dir}/spdlog.sh" 1.9.2
Expand Down
2 changes: 1 addition & 1 deletion components/core/tools/scripts/lib_install/install-boost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tar xzf ${tar_filename}
cd boost_${version_with_underscores}

# Build
./bootstrap.sh --with-libraries=filesystem,iostreams,program_options,regex,system
./bootstrap.sh --with-libraries=filesystem,iostreams,program_options,regex,system,url
./b2 -j${num_cpus}

# Install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
lib_install_scripts_dir=$script_dir/..

# NOTE: boost must be installed first since the remaining packages depend on it
"$lib_install_scripts_dir"/install-boost.sh 1.74.0
"$lib_install_scripts_dir"/install-boost.sh 1.87.0

"$lib_install_scripts_dir"/fmtlib.sh 8.0.1
"$lib_install_scripts_dir"/libarchive.sh 3.5.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ set -u
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
lib_install_scripts_dir=$script_dir/..

# NOTE: boost must be installed first since the remaining packages depend on it
"$lib_install_scripts_dir"/install-boost.sh 1.87.0

"$lib_install_scripts_dir"/fmtlib.sh 8.0.1
"$lib_install_scripts_dir"/libarchive.sh 3.5.1
"$lib_install_scripts_dir"/lz4.sh 1.8.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
build-essential \
git \
jq \
libboost-filesystem-dev \
libboost-iostreams-dev \
libboost-program-options-dev \
libcurl4 \
libcurl4-openssl-dev \
libmariadb-dev \
Expand Down

0 comments on commit 9ced086

Please sign in to comment.