Hello,

Thanks for the patch! I'm sorry I didn't get to this earlier; I was 
really busy with university when the bug was first posted, and by the 
time break started I had already forgotten about it. Just uploaded a new 
revision with your patch.

Thanks,
--
Ben Westover

On 1/2/25 11:51 AM, Shengqi Chen wrote:
> Control: tags -1 + patch
> 
> Hi,
> 
> The attached patch can fix FTBFS.
> 
> I can also do NMU or submit MR on salsa, whichever way you like.
> 
> --
> Thanks,
> Shengqi Chen
> 
>  From e99da5ce664e3bd290c264b229e7aa15074d5e58 Mon Sep 17 00:00:00 2001
> From: Shengqi Chen <ha...@debian.org>
> Date: Fri, 3 Jan 2025 00:45:47 +0800
> Subject: [PATCH] d/patches: add patch to fix FTBFS with fmtlib 10 (closes:
> #1086567)
> 
> Signed-off-by: Shengqi Chen <ha...@debian.org>
> ---
> debian/patches/fix-fmtlib-10.patch | 54 ++++++++++++++++++++++++++++++
> debian/patches/series | 1 +
> 2 files changed, 55 insertions(+)
> create mode 100644 debian/patches/fix-fmtlib-10.patch
> 
> diff --git a/debian/patches/fix-fmtlib-10.patch 
> b/debian/patches/fix-fmtlib-10.patch
> new file mode 100644
> index 0000000..7d3b7b6
> --- /dev/null
> +++ b/debian/patches/fix-fmtlib-10.patch
> @@ -0,0 +1,54 @@
> +Description: Fix FTBFS with fmtlib 10
> +Author: Shengqi Chen <ha...@debian.org>
> +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1086567
> +Forwarded: not-needed
> +Last-Update: 2025-01-03
> +---
> +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> +--- a/src/base/tools/String.h
> ++++ b/src/base/tools/String.h
> +@@ -21,11 +21,11 @@
> +
> +
> + #include "3rdparty/rapidjson/fwd.h"
> +-
> ++#include "3rdparty/fmt/format.h"
> +
> + #include <utility>
> + #include <vector>
> +-
> ++#include <string_view>
> +
> + namespace xmrig {
> +
> +@@ -86,6 +86,7 @@
> + String &toUpper();
> +
> + static String join(const std::vector<String> &vec, char sep);
> ++ template <typename T> friend struct fmt::formatter;
> +
> + private:
> + void copy(const char *str);
> +@@ -100,5 +101,12 @@
> +
> + } /* namespace xmrig */
> +
> ++template <> struct fmt::formatter<xmrig::String>: 
> formatter<std::string_view> {
> ++ auto format(xmrig::String c, format_context& ctx) const
> ++ -> format_context::iterator {
> ++ return fmt::formatter<std::string_view>::format(std::string_view(c.m_data, 
> c.m_size), ctx);
> ++ }
> ++};
> ++
> +
> + #endif /* XMRIG_STRING_H */
> +--- a/cmake/flags.cmake
> ++++ b/cmake/flags.cmake
> +@@ -1,6 +1,6 @@
> + set(CMAKE_CXX_STANDARD_REQUIRED ON)
> + set(CMAKE_CXX_EXTENSIONS OFF)
> +-set(CMAKE_CXX_STANDARD 11)
> ++set(CMAKE_CXX_STANDARD 17)
> +
> + set(CMAKE_C_STANDARD 99)
> + set(CMAKE_C_STANDARD_REQUIRED ON)
> diff --git a/debian/patches/series b/debian/patches/series
> index 2f4313a..8b0eb80 100644
> --- a/debian/patches/series
> +++ b/debian/patches/series
> @@ -4,3 +4,4 @@ make-donation-optional.patch
> reproducibility.patch
> use-system-fmt.patch
> use-system-opencl.patch
> +fix-fmtlib-10.patch
> --
> 2.39.5

Attachment: OpenPGP_signature.asc
Description: PGP signature

Reply via email to