From 52d3babf1b6f1d38b87000b3a14de70c93a0dc8c Mon Sep 17 00:00:00 2001 From: John Freeman Date: Thu, 13 Jul 2023 13:25:08 -0400 Subject: [PATCH] Update dependencies (#4595) Use the most recent versions in ConanCenter. * Due to a bug in Clang 16, you may get a compile error: "call to 'async_teardown' is ambiguous" * A compiler flag workaround is documented in `BUILD.md`. * At this time, building this with gcc 13 may require editing some files in `.conan/data` * A patch to support gcc13 may be added in a later PR. --------- Co-authored-by: Scott Schurr --- .../actions/xahau-ga-dependencies/action.yml | 4 ++-- .github/workflows/xahau-ga-macos.yml | 3 ++- BUILD.md | 20 ++++++++++++++++--- conanfile.py | 11 +++++----- src/ripple/basics/RangeSet.h | 1 + src/ripple/consensus/Consensus.h | 2 ++ src/ripple/json/impl/json_reader.cpp | 2 -- src/ripple/overlay/impl/Handshake.cpp | 2 +- src/ripple/rpc/impl/ServerHandler.cpp | 2 +- src/test/jtx/TrustedPublisherServer.h | 2 +- 10 files changed, 33 insertions(+), 16 deletions(-) diff --git a/.github/actions/xahau-ga-dependencies/action.yml b/.github/actions/xahau-ga-dependencies/action.yml index 0340e937e..f0c67ba25 100644 --- a/.github/actions/xahau-ga-dependencies/action.yml +++ b/.github/actions/xahau-ga-dependencies/action.yml @@ -59,7 +59,7 @@ runs: - name: Export custom recipes shell: bash run: | - conan export external/snappy snappy/1.1.9@ + conan export external/snappy snappy/1.1.10@ conan export external/soci soci/4.0.3@ - name: Install dependencies @@ -83,4 +83,4 @@ runs: path: | ~/.conan ~/.conan2 - key: ${{ steps.cache-restore-conan.outputs.cache-primary-key }} \ No newline at end of file + key: ${{ steps.cache-restore-conan.outputs.cache-primary-key }} diff --git a/.github/workflows/xahau-ga-macos.yml b/.github/workflows/xahau-ga-macos.yml index 5c802c7e9..ce48ff4b4 100644 --- a/.github/workflows/xahau-ga-macos.yml +++ b/.github/workflows/xahau-ga-macos.yml @@ -91,6 +91,7 @@ jobs: run: | conan profile new default --detect || true # Ignore error if profile exists conan profile update settings.compiler.cppstd=20 default + conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default - name: Install dependencies uses: ./.github/actions/xahau-ga-dependencies @@ -113,4 +114,4 @@ jobs: - name: Test run: | - ${{ env.build_dir }}/rippled --unittest --unittest-jobs $(nproc) \ No newline at end of file + ${{ env.build_dir }}/rippled --unittest --unittest-jobs $(nproc) diff --git a/BUILD.md b/BUILD.md index 0c62fb1ef..87267c1bd 100644 --- a/BUILD.md +++ b/BUILD.md @@ -117,7 +117,7 @@ can't build earlier Boost versions. which allows you to statically link it with GCC, if you want. ``` - conan export external/snappy snappy/1.1.9@ + conan export external/snappy snappy/1.1.10@ ``` 5. Export our [Conan recipe for SOCI](./external/soci). @@ -180,7 +180,7 @@ can't build earlier Boost versions. `$OUTPUT_FOLDER/build/generators/conan_toolchain.cmake`. Single-config generators: - + ``` cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release .. ``` @@ -210,7 +210,7 @@ can't build earlier Boost versions. ``` Multi-config generators: - + ``` cmake --build . --config Release cmake --build . --config Debug @@ -279,6 +279,18 @@ conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_HAS_STD_INVOKE_R ``` +### call to 'async_teardown' is ambiguous + +If you are compiling with an early version of Clang 16, then you might hit +a [regression][6] when compiling C++20 that manifests as an [error in a Boost +header][7]. You can workaround it by adding this preprocessor definition: + +``` +conan profile update 'env.CXXFLAGS="-DBOOST_ASIO_DISABLE_CONCEPTS"' default +conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default +``` + + ### recompile with -fPIC If you get a linker error suggesting that you recompile Boost with @@ -430,6 +442,8 @@ but it is more convenient to put them in a [profile][profile]. [1]: https://github.com/conan-io/conan-center-index/issues/13168 [5]: https://en.wikipedia.org/wiki/Unity_build +[6]: https://github.com/boostorg/beast/issues/2648 +[7]: https://github.com/boostorg/beast/issues/2661 [build_type]: https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html [runtime]: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html [toolchain]: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html diff --git a/conanfile.py b/conanfile.py index 016b6bbac..86e6c29c2 100644 --- a/conanfile.py +++ b/conanfile.py @@ -26,9 +26,9 @@ class Xrpl(ConanFile): requires = [ 'boost/1.86.0', 'date/3.0.1', - 'libarchive/3.6.0', - 'lz4/1.9.3', 'grpc/1.50.1', + 'libarchive/3.6.2', + 'lz4/1.9.3', 'nudb/2.0.8', 'openssl/1.1.1u', 'protobuf/3.21.9', @@ -52,6 +52,7 @@ class Xrpl(ConanFile): 'unity': False, 'cassandra-cpp-driver:shared': False, + 'cassandra-cpp-driver:use_atomic': None, 'date:header_only': True, 'grpc:shared': False, 'grpc:secure': True, @@ -102,12 +103,12 @@ class Xrpl(ConanFile): def requirements(self): if self.options.jemalloc: - self.requires('jemalloc/5.2.1') + self.requires('jemalloc/5.3.0') if self.options.reporting: self.requires('cassandra-cpp-driver/2.15.3') - self.requires('libpq/13.6') + self.requires('libpq/14.7') if self.options.rocksdb: - self.requires('rocksdb/6.27.3') + self.requires('rocksdb/6.29.5') exports_sources = ( 'CMakeLists.txt', 'Builds/*', 'bin/getRippledInfo', 'src/*', 'cfg/*' diff --git a/src/ripple/basics/RangeSet.h b/src/ripple/basics/RangeSet.h index e003a229a..3a9e470dd 100644 --- a/src/ripple/basics/RangeSet.h +++ b/src/ripple/basics/RangeSet.h @@ -28,6 +28,7 @@ #include #include +#include namespace ripple { diff --git a/src/ripple/consensus/Consensus.h b/src/ripple/consensus/Consensus.h index df5ec01ce..8970024c3 100644 --- a/src/ripple/consensus/Consensus.h +++ b/src/ripple/consensus/Consensus.h @@ -30,6 +30,8 @@ #include #include #include + +#include #include #include #include diff --git a/src/ripple/json/impl/json_reader.cpp b/src/ripple/json/impl/json_reader.cpp index dd2f9a694..299accd84 100644 --- a/src/ripple/json/impl/json_reader.cpp +++ b/src/ripple/json/impl/json_reader.cpp @@ -30,8 +30,6 @@ namespace Json { // Implementation of class Reader // //////////////////////////////// -constexpr unsigned Reader::nest_limit; - static std::string codePointToUTF8(unsigned int cp) { diff --git a/src/ripple/overlay/impl/Handshake.cpp b/src/ripple/overlay/impl/Handshake.cpp index 11b75e28d..2cc45f3f0 100644 --- a/src/ripple/overlay/impl/Handshake.cpp +++ b/src/ripple/overlay/impl/Handshake.cpp @@ -46,7 +46,7 @@ getFeatureValue( return {}; boost::smatch match; boost::regex rx(feature + "=([^;\\s]+)"); - auto const value = std::string(header->value()); + std::string const value = std::string(header->value()); if (boost::regex_search(value, match, rx)) return {match[1]}; return {}; diff --git a/src/ripple/rpc/impl/ServerHandler.cpp b/src/ripple/rpc/impl/ServerHandler.cpp index d5dc4832f..bb49c91ce 100644 --- a/src/ripple/rpc/impl/ServerHandler.cpp +++ b/src/ripple/rpc/impl/ServerHandler.cpp @@ -248,7 +248,7 @@ build_map(boost::beast::http::fields const& h) std::map c; for (auto const& e : h) { - auto key(std::string(e.name_string())); + std::string key(std::string(e.name_string())); std::transform(key.begin(), key.end(), key.begin(), [](auto kc) { return std::tolower(static_cast(kc)); }); diff --git a/src/test/jtx/TrustedPublisherServer.h b/src/test/jtx/TrustedPublisherServer.h index 64be52185..ff285d83e 100644 --- a/src/test/jtx/TrustedPublisherServer.h +++ b/src/test/jtx/TrustedPublisherServer.h @@ -575,7 +575,7 @@ private: if (ec) break; - auto path = req.target(); //.to_string(); + std::string path = req.target(); //.to_string(); res.insert("Server", "TrustedPublisherServer"); res.version(req.version()); res.keep_alive(req.keep_alive());