From 31ce7c81d4b1e34857fbddcc4b25bf5030b9cf7f Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Thu, 19 Dec 2024 14:24:46 -0500 Subject: [PATCH 01/12] Build CI jobs with "werr" set * Treats warnings as errors so the build will fail, avoiding further problems down the line. * Also include OS and compiler information in the dependencies environment dump. --- .github/actions/build/action.yml | 2 ++ .github/workflows/nix.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 6714369155f..8fbff2d23df 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -20,6 +20,8 @@ runs: ${{ inputs.generator && format('-G "{0}"', inputs.generator) || '' }} \ -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \ -DCMAKE_BUILD_TYPE=${{ inputs.configuration }} \ + -Dassert=TRUE \ + -Dwerr=TRUE \ -Dtests=TRUE \ -Dxrpld=TRUE \ ${{ inputs.cmake-args }} \ diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 9f2cbac951f..7d9f21cf5a3 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -69,6 +69,8 @@ jobs: - name: check environment run: | echo ${PATH} | tr ':' '\n' + lsb_release -a || true + ${{ matrix.profile.cc }} --version conan --version cmake --version env | sort From e103657a578e36a0e769bbec82f974ae6d8c174f Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Thu, 19 Dec 2024 16:42:41 -0500 Subject: [PATCH 02/12] Use the same compiler options for xrpl.libxrpl and all its submodules * Resolves an issue introduced by #5111, which inadvertently removed the -Wno-maybe-uninitialized compiler option from those modules. This resulted in new "may be used uninitialized" build warnings, first noticed in the "protocol" module. When compiling with derr=TRUE, those warnings became errors, which made the build fail. --- cmake/RippledCore.cmake | 80 ++++++++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 32 deletions(-) diff --git a/cmake/RippledCore.cmake b/cmake/RippledCore.cmake index c37971befdb..46139caa8fc 100644 --- a/cmake/RippledCore.cmake +++ b/cmake/RippledCore.cmake @@ -67,6 +67,7 @@ include(target_link_modules) # Level 01 add_module(xrpl beast) +list(APPEND submodules beast) target_link_libraries(xrpl.libxrpl.beast PUBLIC xrpl.imports.main xrpl.libpb @@ -74,17 +75,21 @@ target_link_libraries(xrpl.libxrpl.beast PUBLIC # Level 02 add_module(xrpl basics) +list(APPEND submodules basics) target_link_libraries(xrpl.libxrpl.basics PUBLIC xrpl.libxrpl.beast) # Level 03 add_module(xrpl json) +list(APPEND submodules json) target_link_libraries(xrpl.libxrpl.json PUBLIC xrpl.libxrpl.basics) add_module(xrpl crypto) +list(APPEND submodules crypto) target_link_libraries(xrpl.libxrpl.crypto PUBLIC xrpl.libxrpl.basics) # Level 04 add_module(xrpl protocol) +list(APPEND submodules protocol) target_link_libraries(xrpl.libxrpl.protocol PUBLIC xrpl.libxrpl.crypto xrpl.libxrpl.json @@ -92,9 +97,11 @@ target_link_libraries(xrpl.libxrpl.protocol PUBLIC # Level 05 add_module(xrpl resource) +list(APPEND submodules resource) target_link_libraries(xrpl.libxrpl.resource PUBLIC xrpl.libxrpl.protocol) add_module(xrpl server) +list(APPEND submodules server) target_link_libraries(xrpl.libxrpl.server PUBLIC xrpl.libxrpl.protocol) @@ -112,13 +119,7 @@ file(GLOB_RECURSE sources CONFIGURE_DEPENDS target_sources(xrpl.libxrpl PRIVATE ${sources}) target_link_modules(xrpl PUBLIC - basics - beast - crypto - json - protocol - resource - server + ${submodules} ) # All headers in libxrpl are in modules. @@ -130,33 +131,48 @@ target_link_modules(xrpl PUBLIC # $ # $) -target_compile_definitions(xrpl.libxrpl - PUBLIC - BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT - BOOST_CONTAINER_FWD_BAD_DEQUE - HAS_UNCAUGHT_EXCEPTIONS=1) - -target_compile_options(xrpl.libxrpl - PUBLIC - $<$:-Wno-maybe-uninitialized> - $<$:-DENABLE_VOIDSTAR> +# These settings must be applied to all the header modules, too. +set(base "xrpl.libxrpl") +foreach(submodule + "" + ${submodules} ) + STRING(LENGTH "${submodule}" len) + if(len EQUAL 0) + set(module "${base}") + else() + set(module "${base}.${submodule}") + endif() + message(STATUS "Setting up module ${module}") + + target_compile_definitions("${module}" + PUBLIC + BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT + BOOST_CONTAINER_FWD_BAD_DEQUE + HAS_UNCAUGHT_EXCEPTIONS=1) + + target_compile_options("${module}" + PUBLIC + $<$:-Wno-maybe-uninitialized> + $<$:-DENABLE_VOIDSTAR> + ) -target_link_libraries(xrpl.libxrpl - PUBLIC - LibArchive::LibArchive - OpenSSL::Crypto - Ripple::boost - Ripple::opts - Ripple::syslibs - absl::random_random - date::date - ed25519::ed25519 - secp256k1::secp256k1 - xrpl.libpb - xxHash::xxhash - $<$:antithesis-sdk-cpp> -) + target_link_libraries("${module}" + PUBLIC + LibArchive::LibArchive + OpenSSL::Crypto + Ripple::boost + Ripple::opts + Ripple::syslibs + absl::random_random + date::date + ed25519::ed25519 + secp256k1::secp256k1 + xrpl.libpb + xxHash::xxhash + $<$:antithesis-sdk-cpp> + ) +endforeach() if(xrpld) add_executable(rippled) From f7aaccbecf0191cfcface950124da77bc0d2be03 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Mon, 6 Jan 2025 18:40:14 -0500 Subject: [PATCH 03/12] Revert "Use the same compiler options for xrpl.libxrpl and all its submodules" This reverts commit e103657a578e36a0e769bbec82f974ae6d8c174f. --- cmake/RippledCore.cmake | 80 +++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 48 deletions(-) diff --git a/cmake/RippledCore.cmake b/cmake/RippledCore.cmake index 46139caa8fc..c37971befdb 100644 --- a/cmake/RippledCore.cmake +++ b/cmake/RippledCore.cmake @@ -67,7 +67,6 @@ include(target_link_modules) # Level 01 add_module(xrpl beast) -list(APPEND submodules beast) target_link_libraries(xrpl.libxrpl.beast PUBLIC xrpl.imports.main xrpl.libpb @@ -75,21 +74,17 @@ target_link_libraries(xrpl.libxrpl.beast PUBLIC # Level 02 add_module(xrpl basics) -list(APPEND submodules basics) target_link_libraries(xrpl.libxrpl.basics PUBLIC xrpl.libxrpl.beast) # Level 03 add_module(xrpl json) -list(APPEND submodules json) target_link_libraries(xrpl.libxrpl.json PUBLIC xrpl.libxrpl.basics) add_module(xrpl crypto) -list(APPEND submodules crypto) target_link_libraries(xrpl.libxrpl.crypto PUBLIC xrpl.libxrpl.basics) # Level 04 add_module(xrpl protocol) -list(APPEND submodules protocol) target_link_libraries(xrpl.libxrpl.protocol PUBLIC xrpl.libxrpl.crypto xrpl.libxrpl.json @@ -97,11 +92,9 @@ target_link_libraries(xrpl.libxrpl.protocol PUBLIC # Level 05 add_module(xrpl resource) -list(APPEND submodules resource) target_link_libraries(xrpl.libxrpl.resource PUBLIC xrpl.libxrpl.protocol) add_module(xrpl server) -list(APPEND submodules server) target_link_libraries(xrpl.libxrpl.server PUBLIC xrpl.libxrpl.protocol) @@ -119,7 +112,13 @@ file(GLOB_RECURSE sources CONFIGURE_DEPENDS target_sources(xrpl.libxrpl PRIVATE ${sources}) target_link_modules(xrpl PUBLIC - ${submodules} + basics + beast + crypto + json + protocol + resource + server ) # All headers in libxrpl are in modules. @@ -131,48 +130,33 @@ target_link_modules(xrpl PUBLIC # $ # $) -# These settings must be applied to all the header modules, too. -set(base "xrpl.libxrpl") -foreach(submodule - "" - ${submodules} +target_compile_definitions(xrpl.libxrpl + PUBLIC + BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT + BOOST_CONTAINER_FWD_BAD_DEQUE + HAS_UNCAUGHT_EXCEPTIONS=1) + +target_compile_options(xrpl.libxrpl + PUBLIC + $<$:-Wno-maybe-uninitialized> + $<$:-DENABLE_VOIDSTAR> ) - STRING(LENGTH "${submodule}" len) - if(len EQUAL 0) - set(module "${base}") - else() - set(module "${base}.${submodule}") - endif() - message(STATUS "Setting up module ${module}") - - target_compile_definitions("${module}" - PUBLIC - BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT - BOOST_CONTAINER_FWD_BAD_DEQUE - HAS_UNCAUGHT_EXCEPTIONS=1) - - target_compile_options("${module}" - PUBLIC - $<$:-Wno-maybe-uninitialized> - $<$:-DENABLE_VOIDSTAR> - ) - target_link_libraries("${module}" - PUBLIC - LibArchive::LibArchive - OpenSSL::Crypto - Ripple::boost - Ripple::opts - Ripple::syslibs - absl::random_random - date::date - ed25519::ed25519 - secp256k1::secp256k1 - xrpl.libpb - xxHash::xxhash - $<$:antithesis-sdk-cpp> - ) -endforeach() +target_link_libraries(xrpl.libxrpl + PUBLIC + LibArchive::LibArchive + OpenSSL::Crypto + Ripple::boost + Ripple::opts + Ripple::syslibs + absl::random_random + date::date + ed25519::ed25519 + secp256k1::secp256k1 + xrpl.libpb + xxHash::xxhash + $<$:antithesis-sdk-cpp> +) if(xrpld) add_executable(rippled) From 83babee81a91c5ff3997237f6d7401e43b7546e9 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Mon, 6 Jan 2025 19:57:05 -0500 Subject: [PATCH 04/12] Use the same compiler options for all xrpl / libxrpl modules * Resolves an issue introduced by #5111, which inadvertently removed the -Wno-maybe-uninitialized compiler option from some modules. This resulted in new "may be used uninitialized" build warnings, first noticed in the "protocol" module. When compiling with derr=TRUE, those warnings became errors, which made the build fail. --- cmake/RippledCore.cmake | 34 +++++----------------------------- cmake/RippledInterface.cmake | 5 +++++ 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/cmake/RippledCore.cmake b/cmake/RippledCore.cmake index c37971befdb..1ce0ebb9792 100644 --- a/cmake/RippledCore.cmake +++ b/cmake/RippledCore.cmake @@ -49,7 +49,9 @@ target_link_libraries(xrpl.libpb # TODO: Clean up the number of library targets later. add_library(xrpl.imports.main INTERFACE) -target_link_libraries(xrpl.imports.main INTERFACE + +target_link_libraries(xrpl.imports.main + INTERFACE LibArchive::LibArchive OpenSSL::Crypto Ripple::boost @@ -59,7 +61,9 @@ target_link_libraries(xrpl.imports.main INTERFACE date::date ed25519::ed25519 secp256k1::secp256k1 + xrpl.libpb xxHash::xxhash + $<$:antithesis-sdk-cpp> ) include(add_module) @@ -130,34 +134,6 @@ target_link_modules(xrpl PUBLIC # $ # $) -target_compile_definitions(xrpl.libxrpl - PUBLIC - BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT - BOOST_CONTAINER_FWD_BAD_DEQUE - HAS_UNCAUGHT_EXCEPTIONS=1) - -target_compile_options(xrpl.libxrpl - PUBLIC - $<$:-Wno-maybe-uninitialized> - $<$:-DENABLE_VOIDSTAR> -) - -target_link_libraries(xrpl.libxrpl - PUBLIC - LibArchive::LibArchive - OpenSSL::Crypto - Ripple::boost - Ripple::opts - Ripple::syslibs - absl::random_random - date::date - ed25519::ed25519 - secp256k1::secp256k1 - xrpl.libpb - xxHash::xxhash - $<$:antithesis-sdk-cpp> -) - if(xrpld) add_executable(rippled) if(unity) diff --git a/cmake/RippledInterface.cmake b/cmake/RippledInterface.cmake index 56d36a528ff..ca14313e14f 100644 --- a/cmake/RippledInterface.cmake +++ b/cmake/RippledInterface.cmake @@ -7,6 +7,9 @@ add_library (Ripple::opts ALIAS opts) target_compile_definitions (opts INTERFACE BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS + BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT + BOOST_CONTAINER_FWD_BAD_DEQUE + HAS_UNCAUGHT_EXCEPTIONS=1 $<$: BOOST_ASIO_NO_DEPRECATED BOOST_FILESYSTEM_NO_DEPRECATED @@ -22,6 +25,8 @@ target_compile_definitions (opts target_compile_options (opts INTERFACE $<$,$>:-Wsuggest-override> + $<$:-Wno-maybe-uninitialized> + $<$:-DENABLE_VOIDSTAR> $<$:-fno-omit-frame-pointer> $<$,$>:-g --coverage -fprofile-abs-path> $<$,$>:-g --coverage> From 2b123708b0f7ea4a69e8b79ef41c8d7c15bc34ee Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Wed, 8 Jan 2025 22:51:26 -0500 Subject: [PATCH 05/12] Add a "unity" param to add_module * Turns out that target properties don't propagate to dependents the way compile definitions and options do. --- cmake/RippledCore.cmake | 14 +++++++------- cmake/add_module.cmake | 9 ++++++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/cmake/RippledCore.cmake b/cmake/RippledCore.cmake index 1ce0ebb9792..cad90849774 100644 --- a/cmake/RippledCore.cmake +++ b/cmake/RippledCore.cmake @@ -70,35 +70,35 @@ include(add_module) include(target_link_modules) # Level 01 -add_module(xrpl beast) +add_module(xrpl beast ${unity}) target_link_libraries(xrpl.libxrpl.beast PUBLIC xrpl.imports.main xrpl.libpb ) # Level 02 -add_module(xrpl basics) +add_module(xrpl basics ${unity}) target_link_libraries(xrpl.libxrpl.basics PUBLIC xrpl.libxrpl.beast) # Level 03 -add_module(xrpl json) +add_module(xrpl json ${unity}) target_link_libraries(xrpl.libxrpl.json PUBLIC xrpl.libxrpl.basics) -add_module(xrpl crypto) +add_module(xrpl crypto ${unity}) target_link_libraries(xrpl.libxrpl.crypto PUBLIC xrpl.libxrpl.basics) # Level 04 -add_module(xrpl protocol) +add_module(xrpl protocol ${unity}) target_link_libraries(xrpl.libxrpl.protocol PUBLIC xrpl.libxrpl.crypto xrpl.libxrpl.json ) # Level 05 -add_module(xrpl resource) +add_module(xrpl resource ${unity}) target_link_libraries(xrpl.libxrpl.resource PUBLIC xrpl.libxrpl.protocol) -add_module(xrpl server) +add_module(xrpl server ${unity}) target_link_libraries(xrpl.libxrpl.server PUBLIC xrpl.libxrpl.protocol) diff --git a/cmake/add_module.cmake b/cmake/add_module.cmake index bcfce1bf600..73b45502860 100644 --- a/cmake/add_module.cmake +++ b/cmake/add_module.cmake @@ -9,12 +9,15 @@ include(isolate_headers) # that cannot include headers from other directories in include/ # unless they come through linked libraries. # -# add_module(parent a) -# add_module(parent b) +# add_module(parent a true) +# add_module(parent b false) # target_link_libraries(project.libparent.b PUBLIC project.libparent.a) -function(add_module parent name) +function(add_module parent name unity) set(target ${PROJECT_NAME}.lib${parent}.${name}) add_library(${target} OBJECT) + if(unity) + set_target_properties(${target} PROPERTIES UNITY_BUILD ON) + endif() file(GLOB_RECURSE sources CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/lib${parent}/${name}/*.cpp" ) From dada97093ff1724b82559a11e14bfb0b50886407 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Tue, 14 Jan 2025 20:10:24 -0500 Subject: [PATCH 06/12] Revert "Add a "unity" param to add_module" This reverts commit 2b123708b0f7ea4a69e8b79ef41c8d7c15bc34ee. --- cmake/RippledCore.cmake | 14 +++++++------- cmake/add_module.cmake | 9 +++------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/cmake/RippledCore.cmake b/cmake/RippledCore.cmake index cad90849774..1ce0ebb9792 100644 --- a/cmake/RippledCore.cmake +++ b/cmake/RippledCore.cmake @@ -70,35 +70,35 @@ include(add_module) include(target_link_modules) # Level 01 -add_module(xrpl beast ${unity}) +add_module(xrpl beast) target_link_libraries(xrpl.libxrpl.beast PUBLIC xrpl.imports.main xrpl.libpb ) # Level 02 -add_module(xrpl basics ${unity}) +add_module(xrpl basics) target_link_libraries(xrpl.libxrpl.basics PUBLIC xrpl.libxrpl.beast) # Level 03 -add_module(xrpl json ${unity}) +add_module(xrpl json) target_link_libraries(xrpl.libxrpl.json PUBLIC xrpl.libxrpl.basics) -add_module(xrpl crypto ${unity}) +add_module(xrpl crypto) target_link_libraries(xrpl.libxrpl.crypto PUBLIC xrpl.libxrpl.basics) # Level 04 -add_module(xrpl protocol ${unity}) +add_module(xrpl protocol) target_link_libraries(xrpl.libxrpl.protocol PUBLIC xrpl.libxrpl.crypto xrpl.libxrpl.json ) # Level 05 -add_module(xrpl resource ${unity}) +add_module(xrpl resource) target_link_libraries(xrpl.libxrpl.resource PUBLIC xrpl.libxrpl.protocol) -add_module(xrpl server ${unity}) +add_module(xrpl server) target_link_libraries(xrpl.libxrpl.server PUBLIC xrpl.libxrpl.protocol) diff --git a/cmake/add_module.cmake b/cmake/add_module.cmake index 73b45502860..bcfce1bf600 100644 --- a/cmake/add_module.cmake +++ b/cmake/add_module.cmake @@ -9,15 +9,12 @@ include(isolate_headers) # that cannot include headers from other directories in include/ # unless they come through linked libraries. # -# add_module(parent a true) -# add_module(parent b false) +# add_module(parent a) +# add_module(parent b) # target_link_libraries(project.libparent.b PUBLIC project.libparent.a) -function(add_module parent name unity) +function(add_module parent name) set(target ${PROJECT_NAME}.lib${parent}.${name}) add_library(${target} OBJECT) - if(unity) - set_target_properties(${target} PROPERTIES UNITY_BUILD ON) - endif() file(GLOB_RECURSE sources CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/lib${parent}/${name}/*.cpp" ) From 3b79e1fade23843d631a155a331b3eb5992f7136 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Tue, 14 Jan 2025 20:33:09 -0500 Subject: [PATCH 07/12] Make use of the CMAKE_UNITY_BUILD variable * Removes the need to set the UNITY_BUILD property on each project, except xrpl.libpb, where it needs to be forced OFF. --- cmake/RippledCore.cmake | 7 +------ cmake/RippledSettings.cmake | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/cmake/RippledCore.cmake b/cmake/RippledCore.cmake index 1ce0ebb9792..fc0576872a5 100644 --- a/cmake/RippledCore.cmake +++ b/cmake/RippledCore.cmake @@ -9,6 +9,7 @@ include(target_protobuf_sources) # define a bunch of `static const` variables with the same names, # so we just build them as a separate library. add_library(xrpl.libpb) +set_target_properties(xrpl.libpb PROPERTIES UNITY_BUILD OFF) target_protobuf_sources(xrpl.libpb xrpl/proto LANGUAGE cpp IMPORT_DIRS include/xrpl/proto @@ -104,9 +105,6 @@ target_link_libraries(xrpl.libxrpl.server PUBLIC xrpl.libxrpl.protocol) add_library(xrpl.libxrpl) set_target_properties(xrpl.libxrpl PROPERTIES OUTPUT_NAME xrpl) -if(unity) - set_target_properties(xrpl.libxrpl PROPERTIES UNITY_BUILD ON) -endif() add_library(xrpl::libxrpl ALIAS xrpl.libxrpl) @@ -136,9 +134,6 @@ target_link_modules(xrpl PUBLIC if(xrpld) add_executable(rippled) - if(unity) - set_target_properties(rippled PROPERTIES UNITY_BUILD ON) - endif() if(tests) target_compile_definitions(rippled PUBLIC ENABLE_TESTS) endif() diff --git a/cmake/RippledSettings.cmake b/cmake/RippledSettings.cmake index 3eeebed428c..58877e1885b 100644 --- a/cmake/RippledSettings.cmake +++ b/cmake/RippledSettings.cmake @@ -17,6 +17,7 @@ if(unity) if(NOT is_ci) set(CMAKE_UNITY_BUILD_BATCH_SIZE 15 CACHE STRING "") endif() + set(CMAKE_UNITY_BUILD ON CACHE BOOL "Do a unity build") endif() if(is_clang AND is_linux) option(voidstar "Enable Antithesis instrumentation." OFF) From 0ec72ec770d058c900a713aa1910d8eeec1ae347 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Wed, 15 Jan 2025 18:08:10 -0500 Subject: [PATCH 08/12] From @Bronek: fix error in gcc 13 --- src/xrpld/app/paths/detail/DirectStep.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xrpld/app/paths/detail/DirectStep.cpp b/src/xrpld/app/paths/detail/DirectStep.cpp index 95e64b337bc..3debe9791e2 100644 --- a/src/xrpld/app/paths/detail/DirectStep.cpp +++ b/src/xrpld/app/paths/detail/DirectStep.cpp @@ -336,22 +336,22 @@ DirectIPaymentStep::quality(ReadView const& sb, QualityDirection qDir) const if (!sle) return QUALITY_ONE; - auto const& field = [this, qDir]() -> SF_UINT32 const& { + auto const& field = *[this, qDir]() { if (qDir == QualityDirection::in) { // compute dst quality in if (this->dst_ < this->src_) - return sfLowQualityIn; + return &sfLowQualityIn; else - return sfHighQualityIn; + return &sfHighQualityIn; } else { // compute src quality out if (this->src_ < this->dst_) - return sfLowQualityOut; + return &sfLowQualityOut; else - return sfHighQualityOut; + return &sfHighQualityOut; } }(); From 535efd7a8a33be079a57355f1242e87efbad1907 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Thu, 16 Jan 2025 11:06:03 -0500 Subject: [PATCH 09/12] Revert "From @Bronek: fix error in gcc 13" This reverts commit 0ec72ec770d058c900a713aa1910d8eeec1ae347. --- src/xrpld/app/paths/detail/DirectStep.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xrpld/app/paths/detail/DirectStep.cpp b/src/xrpld/app/paths/detail/DirectStep.cpp index 3debe9791e2..95e64b337bc 100644 --- a/src/xrpld/app/paths/detail/DirectStep.cpp +++ b/src/xrpld/app/paths/detail/DirectStep.cpp @@ -336,22 +336,22 @@ DirectIPaymentStep::quality(ReadView const& sb, QualityDirection qDir) const if (!sle) return QUALITY_ONE; - auto const& field = *[this, qDir]() { + auto const& field = [this, qDir]() -> SF_UINT32 const& { if (qDir == QualityDirection::in) { // compute dst quality in if (this->dst_ < this->src_) - return &sfLowQualityIn; + return sfLowQualityIn; else - return &sfHighQualityIn; + return sfHighQualityIn; } else { // compute src quality out if (this->src_ < this->dst_) - return &sfLowQualityOut; + return sfLowQualityOut; else - return &sfHighQualityOut; + return sfHighQualityOut; } }(); From 699b0ea1670fca7273e8698d62cc898cac9a1339 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Wed, 15 Jan 2025 18:08:10 -0500 Subject: [PATCH 10/12] From @Bronek: simpler error fix for gcc 13 --- src/xrpld/app/paths/detail/DirectStep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xrpld/app/paths/detail/DirectStep.cpp b/src/xrpld/app/paths/detail/DirectStep.cpp index 95e64b337bc..49e26d877ef 100644 --- a/src/xrpld/app/paths/detail/DirectStep.cpp +++ b/src/xrpld/app/paths/detail/DirectStep.cpp @@ -336,7 +336,7 @@ DirectIPaymentStep::quality(ReadView const& sb, QualityDirection qDir) const if (!sle) return QUALITY_ONE; - auto const& field = [this, qDir]() -> SF_UINT32 const& { + auto const& field = [&, this, qDir]() -> SF_UINT32 const& { if (qDir == QualityDirection::in) { // compute dst quality in From b2cce3fc29a199d6a9eb8e05c70a2f0069114f68 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Thu, 16 Jan 2025 11:13:14 -0500 Subject: [PATCH 11/12] Move `ENABLE_VOIDSTAR` to target_compile_definitions --- cmake/RippledInterface.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/RippledInterface.cmake b/cmake/RippledInterface.cmake index ca14313e14f..85e27172712 100644 --- a/cmake/RippledInterface.cmake +++ b/cmake/RippledInterface.cmake @@ -21,12 +21,12 @@ target_compile_definitions (opts > $<$:BEAST_NO_UNIT_TEST_INLINE=1> $<$:BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES=1> - $<$:RIPPLE_SINGLE_IO_SERVICE_THREAD=1>) + $<$:RIPPLE_SINGLE_IO_SERVICE_THREAD=1> + $<$:ENABLE_VOIDSTAR>) target_compile_options (opts INTERFACE $<$,$>:-Wsuggest-override> $<$:-Wno-maybe-uninitialized> - $<$:-DENABLE_VOIDSTAR> $<$:-fno-omit-frame-pointer> $<$,$>:-g --coverage -fprofile-abs-path> $<$,$>:-g --coverage> From d5bc0ddf83ef34545163cdcca1d7f1214e47412c Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Thu, 16 Jan 2025 12:11:51 -0500 Subject: [PATCH 12/12] fixup! From @Bronek: simpler error fix for gcc 13 --- src/xrpld/app/paths/detail/DirectStep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xrpld/app/paths/detail/DirectStep.cpp b/src/xrpld/app/paths/detail/DirectStep.cpp index 49e26d877ef..ffd500009e7 100644 --- a/src/xrpld/app/paths/detail/DirectStep.cpp +++ b/src/xrpld/app/paths/detail/DirectStep.cpp @@ -336,7 +336,7 @@ DirectIPaymentStep::quality(ReadView const& sb, QualityDirection qDir) const if (!sle) return QUALITY_ONE; - auto const& field = [&, this, qDir]() -> SF_UINT32 const& { + auto const& field = [&, this]() -> SF_UINT32 const& { if (qDir == QualityDirection::in) { // compute dst quality in