From 358b7f50a7457b2d543632bbdb8f3ce1a7c22812 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Thu, 10 Jul 2025 11:14:27 +0100 Subject: [PATCH] fix: Link with boost libraries explicitly (#5546) Having `boost::boost` in `self.requires` makes clio link with all boost libraries. There are additionally several Boost stacktrace backends that are both linked with, which violate ODR. This change fixes the problem. --- cmake/deps/Boost.cmake | 3 +-- conanfile.py | 12 +++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cmake/deps/Boost.cmake b/cmake/deps/Boost.cmake index 041c2380e1..031202f4d2 100644 --- a/cmake/deps/Boost.cmake +++ b/cmake/deps/Boost.cmake @@ -2,7 +2,6 @@ find_package(Boost 1.82 REQUIRED COMPONENTS chrono container - context coroutine date_time filesystem @@ -24,7 +23,7 @@ endif() target_link_libraries(ripple_boost INTERFACE - Boost::boost + Boost::headers Boost::chrono Boost::container Boost::coroutine diff --git a/conanfile.py b/conanfile.py index 1a9e88fc0d..2df08544cd 100644 --- a/conanfile.py +++ b/conanfile.py @@ -164,7 +164,17 @@ class Xrpl(ConanFile): # `include/`, not `include/ripple/proto/`. libxrpl.includedirs = ['include', 'include/ripple/proto'] libxrpl.requires = [ - 'boost::boost', + 'boost::headers', + 'boost::chrono', + 'boost::container', + 'boost::coroutine', + 'boost::date_time', + 'boost::filesystem', + 'boost::json', + 'boost::program_options', + 'boost::regex', + 'boost::system', + 'boost::thread', 'date::date', 'grpc::grpc++', 'libarchive::libarchive',