Skip to content

Commit

Permalink
feat(thirdparty): Bump boost to 1.86.0 (apache#2124)
Browse files Browse the repository at this point in the history
This patch bumps the boost library from 1.69.0 to 1.86.0.

This patch also changes to build and link only static library for boost, it's
useful when deploy Pegasus servers if reduce the dependent libraries.
  • Loading branch information
acelyc111 authored Sep 25, 2024
1 parent 20a478d commit 297d605
Show file tree
Hide file tree
Showing 25 changed files with 85 additions and 62 deletions.
4 changes: 0 additions & 4 deletions build_tools/pack_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ mkdir -p ${pack}/lib
copy_file ${BUILD_LATEST_DIR}/output/lib/libpegasus_client_static.a ${pack}/lib
# TODO(yingchun): make sure shared lib works well too
# copy_file ${BUILD_LATEST_DIR}/output/lib/libpegasus_client_shared.so ${pack}/lib
copy_file ${THIRDPARTY_ROOT}/output/lib/libboost*.so.1.69.0 ${pack}/lib
ln -sf `ls ${pack}/lib | grep libboost_system` ${pack}/lib/libboost_system.so
ln -sf `ls ${pack}/lib | grep libboost_filesystem` ${pack}/lib/libboost_filesystem.so
ln -sf `ls ${pack}/lib | grep libboost_regex` ${pack}/lib/libboost_regex.so

cp -v -r ./src/include ${pack}

Expand Down
1 change: 0 additions & 1 deletion build_tools/pack_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ else
copy_file ${THIRDPARTY_ROOT}/output/lib/libtcmalloc_and_profiler.so.4 ${pack}/bin
fi

copy_file ${THIRDPARTY_ROOT}/output/lib/libboost*.so.1.69.0 ${pack}/bin
copy_file ${THIRDPARTY_ROOT}/output/lib/libhdfs* ${pack}/bin
copy_file ${THIRDPARTY_ROOT}/output/lib/librocksdb.so.8 ${pack}/bin
copy_file ./admin_tools/config_hdfs.sh ${pack}/bin
Expand Down
1 change: 0 additions & 1 deletion build_tools/pack_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ else
copy_file ${THIRDPARTY_ROOT}/output/lib/libtcmalloc_and_profiler.so.4 ${pack}/lib/
fi

copy_file ${THIRDPARTY_ROOT}/output/lib/libboost*.so.1.69.0 ${pack}/lib/
copy_file ${THIRDPARTY_ROOT}/output/lib/libhdfs* ${pack}/lib/
copy_file ${THIRDPARTY_ROOT}/output/lib/librocksdb.so.8 ${pack}/lib/
copy_file `get_stdcpp_lib $custom_gcc $separate_servers` ${pack}/lib/
Expand Down
7 changes: 4 additions & 3 deletions cmake_modules/BaseFunctions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,13 @@ function(dsn_setup_include_path)#TODO(huangwei5): remove this
endfunction(dsn_setup_include_path)

function(dsn_setup_thirdparty_libs)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_STATIC_RUNTIME OFF)
set(BOOST_ROOT ${THIRDPARTY_INSTALL_DIR})
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)
set(Boost_NO_SYSTEM_PATHS ON)
set(Boost_NO_BOOST_CMAKE ON)
set(Boost_NO_WARN_NEW_VERSIONS ON)

set(CMAKE_PREFIX_PATH ${THIRDPARTY_INSTALL_DIR};${CMAKE_PREFIX_PATH})
message(STATUS "CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
Expand Down
1 change: 1 addition & 0 deletions src/meta/meta_bulk_load_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <algorithm>
#include <chrono>
#include <cstdint>
#include <istream>
#include <string_view>
#include <type_traits>

Expand Down
2 changes: 2 additions & 0 deletions src/meta/meta_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
*/

#include <boost/lexical_cast.hpp>
#include <algorithm>
#include <cstdint>
#include <ostream>

#include "common/gpid.h"
#include "common/replication_enums.h"
Expand Down
1 change: 1 addition & 0 deletions src/meta/test/meta_bulk_load_service_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <functional>
#include <map>
#include <memory>
#include <ostream>
#include <string>
#include <type_traits>
#include <unordered_map>
Expand Down
1 change: 1 addition & 0 deletions src/meta/test/meta_split_service_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <cstdint>
#include <map>
#include <memory>
#include <ostream>
#include <string>
#include <thread>
#include <utility>
Expand Down
1 change: 1 addition & 0 deletions src/meta/test/meta_state/meta_state_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include <boost/lexical_cast.hpp>
#include <chrono>
#include <ostream>
#include <thread>

#include "gtest/gtest.h"
Expand Down
11 changes: 8 additions & 3 deletions src/perf_counter/perf_counter_atomic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,20 @@
#include "perf_counter/perf_counter_atomic.h"

#include <boost/asio/basic_deadline_timer.hpp>
#include <stdlib.h>
#include <cstdlib>
#include <functional>
#include <new>

#include "boost/asio/deadline_timer.hpp"
#include "boost/asio/detail/impl/epoll_reactor.hpp"
#include "boost/asio/detail/impl/scheduler.ipp"
#include "boost/asio/detail/impl/service_registry.hpp"
#include "boost/asio/detail/impl/timer_queue_ptime.ipp"
#include "boost/asio/impl/any_io_executor.ipp"
#include "boost/asio/impl/io_context.hpp"
#include "boost/date_time/posix_time/posix_time_duration.hpp"
#include "boost/system/error_code.hpp"
#include "boost/system/detail/errc.hpp"
#include "boost/system/detail/error_code.hpp"
#include "boost/system/detail/error_condition.hpp"
#include "utils/flags.h"
#include "utils/shared_io_service.h"

Expand Down
34 changes: 19 additions & 15 deletions src/redis_protocol/proxy_ut/redis_proxy_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,26 @@
*/

#include <boost/asio.hpp> // IWYU pragma: keep
// IWYU pragma: no_include <boost/asio/buffer.hpp>
// IWYU pragma: no_include <boost/asio/detail/type_traits.hpp>
// IWYU pragma: no_include <boost/asio/impl/io_context.ipp>
// IWYU pragma: no_include <boost/asio/impl/read.hpp>
// IWYU pragma: no_include <boost/asio/impl/write.hpp>
// IWYU pragma: no_include <boost/asio/io_service.hpp>
// IWYU pragma: no_include <boost/asio/ip/address.hpp>
// IWYU pragma: no_include <boost/asio/ip/address_v4.hpp>
// IWYU pragma: no_include <boost/asio/ip/impl/address.ipp>
// IWYU pragma: no_include <boost/asio/ip/impl/address_v4.ipp>
// IWYU pragma: no_include <boost/asio/ip/tcp.hpp>
// IWYU pragma: no_include <boost/asio/socket_base.hpp>
#include <boost/system/error_code.hpp>
#include <boost/asio/buffer.hpp>
#include <boost/asio/detail/impl/reactive_socket_service_base.ipp>
#include <boost/asio/detail/impl/scheduler.ipp>
#include <boost/asio/detail/impl/service_registry.hpp>
#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/impl/io_context.hpp>
#include <boost/asio/impl/io_context.ipp>
#include <boost/asio/impl/read.hpp>
#include <boost/asio/impl/write.hpp>
#include <boost/asio/io_service.hpp>
#include <boost/asio/ip/address.hpp>
#include <boost/asio/ip/address_v4.hpp>
#include <boost/asio/ip/impl/address.ipp>
#include <boost/asio/ip/impl/address_v4.ipp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/socket_base.hpp>
#include <boost/system/detail/error_code.hpp>
#include <gtest/gtest_prod.h>
#include <string.h>
#include <chrono>
#include <cstring>
#include <memory>
#include <set>
#include <string>
Expand All @@ -45,10 +49,10 @@
#include "gtest/gtest.h"
#include "proxy_layer.h"
#include "redis_parser.h"
#include "runtime/app_model.h"
#include "rpc/rpc_address.h"
#include "rpc/rpc_message.h"
#include "rpc/rpc_stream.h"
#include "runtime/app_model.h"
#include "runtime/service_app.h"
#include "task/task_spec.h"
#include "utils/blob.h"
Expand Down
1 change: 0 additions & 1 deletion src/replica/replica_backup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <map>
#include <memory>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions src/replica/storage/simple_kv/test/checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*/

#include <boost/lexical_cast.hpp>
#include <algorithm>
// IWYU pragma: no_include <ext/alloc_traits.h>
#include <atomic>
#include <functional>
Expand Down
1 change: 0 additions & 1 deletion src/replica/storage/simple_kv/test/checker.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class meta_service_app;

namespace replication {
class replica_configuration;

class replication_service_app;

namespace test {
Expand Down
14 changes: 8 additions & 6 deletions src/rpc/asio_net_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,19 @@
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/ip/udp.hpp>
#include <boost/asio/socket_base.hpp>
#include <boost/system/error_code.hpp>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <limits>
#include <memory>
#include <new>
#include <utility>

#include "asio_rpc_session.h"
#include "boost/asio/detail/impl/scheduler.ipp"
#include "boost/asio/impl/any_io_executor.ipp"
#include "boost/system/detail/error_code.hpp"
#include "runtime/tool_api.h"
// IWYU pragma: no_include "boost/asio/basic_datagram_socket.hpp"
// IWYU pragma: no_include "boost/asio/basic_socket_acceptor.hpp"
// IWYU pragma: no_include "boost/asio/basic_stream_socket.hpp"
Expand All @@ -73,7 +76,6 @@
// IWYU pragma: no_include "boost/system/error_code.hpp
#include "task/task.h"
#include "task/task_worker.h"
#include "runtime/tool_api.h"
#include "utils/autoref_ptr.h"
#include "utils/blob.h"
#include "utils/customizable_id.h"
Expand Down
8 changes: 4 additions & 4 deletions src/rpc/asio_rpc_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@
#include <boost/asio/basic_stream_socket.hpp>
#include <boost/asio/buffer.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/impl/io_context.hpp>
#include <boost/asio/impl/system_executor.hpp>
#include <boost/asio/impl/write.hpp>
#include <boost/asio/ip/address.hpp>
#include <boost/asio/ip/address_v4.hpp>
#include <boost/asio/ip/impl/address.ipp>
#include <boost/asio/ip/impl/address_v4.ipp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/socket_base.hpp>
#include <boost/system/error_code.hpp>
// IWYU pragma: no_include <ext/alloc_traits.h>
#include <cstddef>
#include <iterator>
#include <new>
#include <utility>
#include <vector>

#include "boost/asio/impl/any_io_executor.ipp"
#include "boost/asio/write.hpp"
#include "boost/system/detail/error_code.hpp"
// IWYU pragma: no_include "boost/asio/basic_stream_socket.hpp"
// IWYU pragma: no_include "boost/asio/buffer.hpp"
// IWYU pragma: no_include "boost/asio/error.hpp"
Expand Down
8 changes: 7 additions & 1 deletion src/security/kinit_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,18 @@
#include <memory>
#include <mutex>
#include <new>
#include <utility>

#include "boost/asio/basic_deadline_timer.hpp"
#include "boost/asio/detail/impl/epoll_reactor.hpp"
#include "boost/asio/detail/impl/scheduler.ipp"
#include "boost/asio/detail/impl/service_registry.hpp"
#include "boost/asio/detail/impl/timer_queue_ptime.ipp"
#include "boost/asio/impl/any_io_executor.ipp"
#include "boost/asio/impl/io_context.hpp"
#include "boost/date_time/posix_time/posix_time_duration.hpp"
#include "boost/system/error_code.hpp"
#include "boost/system/detail/errc.hpp"
#include "boost/system/detail/error_code.hpp"
#include "fmt/core.h"
#include "utils/defer.h"
#include "utils/error_code.h"
Expand Down
5 changes: 2 additions & 3 deletions src/server/capacity_unit_calculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@

#include "capacity_unit_calculator.h"

#include <string_view>
#include <rocksdb/status.h>
#include <sys/param.h>
#include <cmath>
#include <cstdint>
#include <string_view>

#include "hotkey_collector.h"
#include "rrdb/rrdb_types.h"
#include "rpc/rpc_message.h"
#include "rrdb/rrdb_types.h"
#include "utils/autoref_ptr.h"
#include "utils/blob.h"
#include "utils/flags.h"
Expand Down
4 changes: 2 additions & 2 deletions src/server/hotkey_collector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

#include "hotkey_collector.h"

#include <string_view>
#include <boost/container_hash/extensions.hpp>
#include <boost/container_hash/hash.hpp>
// IWYU pragma: no_include <ext/alloc_traits.h>
#include <fmt/core.h>
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <string_view>
#include <unordered_map>

#include "base/pegasus_key_schema.h"
Expand Down
3 changes: 1 addition & 2 deletions src/shell/commands/bulk_load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
// IWYU pragma: no_include <ext/alloc_traits.h>
#include <fmt/core.h>
#include <getopt.h>
#include <stdio.h>
#include <algorithm>
#include <cstdint>
#include <cstdio>
#include <iostream>
#include <map>
#include <memory>
Expand Down
9 changes: 6 additions & 3 deletions src/task/simple_task_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,23 @@

#include "simple_task_queue.h"

#include <stdio.h>
#include <cstdio>
#include <memory>
#include <new>
#include <utility>

#include "boost/asio/basic_deadline_timer.hpp"
#include "boost/asio/deadline_timer.hpp"
#include "boost/asio/detail/impl/epoll_reactor.hpp"
#include "boost/asio/detail/impl/scheduler.ipp"
#include "boost/asio/detail/impl/service_registry.hpp"
#include "boost/asio/detail/impl/timer_queue_ptime.ipp"
#include "boost/asio/error.hpp"
#include "boost/asio/impl/any_io_executor.ipp"
#include "boost/asio/impl/io_context.hpp"
#include "boost/asio/impl/io_context.ipp"
#include "boost/asio/io_service.hpp"
#include "boost/date_time/posix_time/posix_time_duration.hpp"
#include "boost/system/error_code.hpp"
#include "boost/system/detail/error_code.hpp"
#include "runtime/tool_api.h"
#include "task.h"
#include "task/task_queue.h"
Expand Down
3 changes: 1 addition & 2 deletions src/test/function_test/restore/test_restore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
#include <boost/cstdint.hpp>
#include <boost/lexical_cast.hpp>
#include <fmt/core.h>
#include <stdio.h>
#include <unistd.h>
#include <algorithm>
#include <chrono>
#include <cstdint>
#include <cstdio>
#include <iostream>
#include <memory>
#include <string>
Expand Down
6 changes: 3 additions & 3 deletions src/utils/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/system/error_code.hpp>
#include <errno.h>
#include <boost/system/detail/error_code.hpp>
#include <cerrno>
#include <fmt/core.h>
#include <ftw.h>
#include <glob.h>
Expand All @@ -42,8 +42,8 @@
// IWYU pragma: no_include <bits/struct_stat.h>
#include <unistd.h>
#include <memory>

#include <string_view>

#include "errors.h"
#include "utils/defer.h"
#include "utils/env.h"
Expand Down
8 changes: 6 additions & 2 deletions src/utils/metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@

#include <boost/algorithm/string/join.hpp>
#include <boost/asio/basic_deadline_timer.hpp>
#include <boost/asio/detail/impl/scheduler.ipp>
#include <boost/asio/detail/impl/service_registry.hpp>
#include <boost/asio/impl/any_io_executor.ipp>
#include <boost/asio/impl/io_context.hpp>
#include <boost/date_time/posix_time/posix_time_duration.hpp>
#include <boost/system/error_code.hpp>
#include <boost/system/detail/errc.hpp>
#include <boost/system/detail/error_code.hpp>
#include <fmt/core.h>
#include <unistd.h>
#include <new>
#include <string_view>

#include "http/http_method.h"
Expand Down
Loading

0 comments on commit 297d605

Please sign in to comment.