Skip to contentSkip to conversation

package/gnuradio: fix build with fmt >= 11.x

PATCH Applied Julien Olivain 2 participants 2 messages Aug 10, 2024 – Aug 12, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gnuradio: fix build with fmt >= 11.x

gnuradio is failing to build since commit 6b86f076c3 "package/fmt: bump to version 11.0.1" with output:

    /build/gnuradio-3.10.7.0/gr-blocks/lib/message_debug_impl.cc: In member function 'void gr::blocks::message_debug_impl::log(const pmt::pmt_t&)':
    /build/gnuradio-3.10.7.0/gr-blocks/lib/message_debug_impl.cc:65:44: error: 'join' is not a member of 'fmt'
       65 |                                       fmt::join(begin, begin + output_length, " "),
          |                                            ^~~~

This commit adds a backported upstream patch to fix the issue.

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/7540345284
http://autobuild.buildroot.org/results/4c92949ef74a119d9a70e4fdd55af05a66580b0c/

---
Patch tested in:
https://gitlab.com/jolivain/buildroot/-/jobs/7551460731

---
 ...o_signature-include-spdlog-ranges.h-.patch | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 package/gnuradio/0001-blocks-runtime-io_signature-include-spdlog-ranges.h-.patch
package/gnuradio/0001-blocks-runtime-io_signature-include-spdlog-ranges.h-.patch new file +38 -0
new file mode 100644
index 0000000000..6a08b8edee
@@ -0,0 +1,38 @@
+From 03c9a40883e610e54b8fc3c3ce1842d68d7ce2e4 Mon Sep 17 00:00:00 2001
+From: Kefu Chai <[email protected]>
+Date: Mon, 15 Jul 2024 09:27:16 +0800
+Subject: [PATCH] blocks,runtime: io_signature: include spdlog/*/ranges.h for
+ using fmt::join()
+
+fmt::join() was moved into fmt/ranges.h since fmt 11, so let's
+include the corresponding header in spdlog for using it.
+
+Signed-off-by: Kefu Chai <[email protected]>
+(cherry picked from commit 19b070051c1c2b5fb6f2da8fb6422b27418c3dfa)
+Signed-off-by: Jeff Long <[email protected]>
+Upstream: https://github.com/gnuradio/gnuradio/commit/ead459813367e7fd679dad067d1b020010d49b4f
+[Julien: backported commit ead45981 from v3.10.11.0]
+Signed-off-by: Julien Olivain <[email protected]>
+---
+ gr-blocks/lib/message_debug_impl.cc | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/gr-blocks/lib/message_debug_impl.cc b/gr-blocks/lib/message_debug_impl.cc
+index 1e81aec0d..415d2be97 100644
+--- a/gr-blocks/lib/message_debug_impl.cc
++++ b/gr-blocks/lib/message_debug_impl.cc
+@@ -14,6 +14,11 @@
+ #include <pmt/pmt.h>
+ #include <spdlog/common.h>
+ #include <spdlog/fmt/fmt.h>
++#if __has_include(<spdlog/fmt/ranges.h>)
++#include <spdlog/fmt/ranges.h>
++#elif __has_include(<spdlog/fmt/bundled/ranges.h>)
++#include <spdlog/fmt/bundled/ranges.h>
++#endif
+ #include <functional>
+ #include <utility>
+ #include <vector>
+-- 
+2.46.0
+
Signature · 6 lines
2.46.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 14 lines · On Sat, 10 Aug 2024 22:05:28 +0200 Julien Olivain <[email protected]> wrote:

gnuradio is failing to build since commit 6b86f076c3 "package/fmt: bump to version 11.0.1" with output:

    /build/gnuradio-3.10.7.0/gr-blocks/lib/message_debug_impl.cc: In member function 'void gr::blocks::message_debug_impl::log(const pmt::pmt_t&)':
    /build/gnuradio-3.10.7.0/gr-blocks/lib/message_debug_impl.cc:65:44: error: 'join' is not a member of 'fmt'
       65 |                                       fmt::join(begin, begin + output_length, " "),
          |                                            ^~~~

This commit adds a backported upstream patch to fix the issue.

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/7540345284
http://autobuild.buildroot.org/results/4c92949ef74a119d9a70e4fdd55af05a66580b0c/

Quoted 8 lines

---
Patch tested in:
https://gitlab.com/jolivain/buildroot/-/jobs/7551460731

---
 ...o_signature-include-spdlog-ranges.h-.patch | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 package/gnuradio/0001-blocks-runtime-io_signature-include-spdlog-ranges.h-.patch

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot