Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/mpd fix build failure with fmt 12.2.0
@ 2026-07-09 14:01 Andreas Ziegler
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Ziegler @ 2026-07-09 14:01 UTC (permalink / raw)
  To: buildroot; +Cc: Andreas Ziegler

Building mpd with fmt 12.2.0 fails with:

../src/net/ToString.cxx: In function 'std::string ToString(SocketAddress)':
../src/net/ToString.cxx:80:37: error: 'format' is not a member of 'fmt'
   80 |                         return fmt::format("[{}]:{}", host, serv);
      |                                     ^~~~~~
../src/net/ToString.cxx:84:29: error: 'format' is not a member of 'fmt'
   84 |                 return fmt::format("{}:{}", host, serv);
      |                             ^~~~~~

Root cause is an API change in fmt:

Made the <fmt/core.h> header equivalent to <fmt/base.h> by default. Code
that relied on <fmt/core.h> pulling in <fmt/format.h> must now either
include <fmt/format.h> directly or define FMT_DEPRECATED_HEAVY_CORE to
opt back in. (https://github.com/fmtlib/fmt/releases#release-12.2.0)

Implement the mentioned workaround until mpd adopts the new architecture.

Signed-off-by: Andreas Ziegler <br025@umbiko.net>
---
 package/mpd/mpd.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/mpd/mpd.mk b/package/mpd/mpd.mk
index 2014488520..feaf3d4e84 100644
--- a/package/mpd/mpd.mk
+++ b/package/mpd/mpd.mk
@@ -27,6 +27,9 @@ MPD_CONF_OPTS = \
 	-Dsidplay=disabled \
 	-Dsnapcast=false
 
+# remove this once mpd has moved the minimum fmt version to 12.2.0
+MPD_CXXFLAGS = $(TARGET_CFLAGS) -DFMT_DEPRECATED_HEAVY_CORE=1
+
 ifeq ($(BR2_PACKAGE_EXPAT),y)
 MPD_DEPENDENCIES += expat
 MPD_CONF_OPTS += -Dexpat=enabled
-- 
2.53.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-10  4:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260709140143.449145-1-br025__10977.6866667502$1783605750$gmane$org@umbiko.net>
     [not found] ` <152271d1-20f6-4a18-ae06-5efa548d91b0@kuhls.net>
2026-07-10  4:29   ` [Buildroot] [PATCH 1/1] package/mpd fix build failure with fmt 12.2.0 Andreas Ziegler
2026-07-09 14:01 Andreas Ziegler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox