mpd: fix build error when fmt updated
PATCH 1/1 mpd: fix build error when fmt updated
From: Wang Mingyu <[email protected]>
backport upstream patch for build error when fmt updated:
ix-build-error-when-fmt-updated.patch minor-fixup-for-libfmt10.patch
--- .../fix-build-error-when-fmt-updated.patch | 71 +++++++++++++++++++ .../mpd/minor-fixup-for-libfmt10.patch | 27 +++++++ .../recipes-multimedia/musicpd/mpd_0.23.12.bb | 6 +- 3 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd/fix-build-error-when-fmt-updated.patch create mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd/minor-fixup-for-libfmt10.patch
meta-multimedia/recipes-multimedia/musicpd/mpd/fix-build-error-when-fmt-updated.patch new file +71 -0
@@ -0,0 +1,71 @@ +Upstream-Status: Backport [https://github.com/MusicPlayerDaemon/MPD/commit/181b96dd2d71bc8f2668776719d344466f258b5d] + +Signed-off-by: Wang Mingyu <[email protected]> + +From 181b96dd2d71bc8f2668776719d344466f258b5d Mon Sep 17 00:00:00 2001 +From: Max Kellermann <[email protected]> +Date: Mon, 15 May 2023 20:52:21 +0200 +Subject: [PATCH] command/player, SongPrint: use AudioFormatFormatter() + +libfmt version 10 apparently doesn't know how to format a +`StringBuffer`, failing the MPD build. Since we have a formatter +specialization for `AudioFormat`, let's use that - it's better and +easier to use. + +Closes https://github.com/MusicPlayerDaemon/MPD/issues/1807 +--- + src/SongPrint.cxx | 5 +++-- + src/command/PlayerCommands.cxx | 3 ++- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/SongPrint.cxx b/src/SongPrint.cxx +index 98d544cc38..835669d276 100644 +--- a/src/SongPrint.cxx ++++ b/src/SongPrint.cxx +@@ -8,6 +8,7 @@ + #include "TagPrint.hxx" + #include "client/Response.hxx" + #include "fs/Traits.hxx" ++#include "lib/fmt/AudioFormatFormatter.hxx" + #include "time/ChronoUtil.hxx" + #include "util/StringBuffer.hxx" + #include "util/UriUtil.hxx" +@@ -77,7 +78,7 @@ song_print_info(Response &r, const LightSong &song, bool base) noexcept + time_print(r, "Last-Modified", song.mtime); + + if (song.audio_format.IsDefined()) +- r.Fmt(FMT_STRING("Format: {}\n"), ToString(song.audio_format)); ++ r.Fmt(FMT_STRING("Format: {}\n"), song.audio_format); + + tag_print_values(r, song.tag); + +@@ -100,7 +101,7 @@ song_print_info(Response &r, const DetachedSong &song, bool base) noexcept + time_print(r, "Last-Modified", song.GetLastModified()); + + if (const auto &f = song.GetAudioFormat(); f.IsDefined()) +- r.Fmt(FMT_STRING("Format: {}\n"), ToString(f)); ++ r.Fmt(FMT_STRING("Format: {}\n"), f); + + tag_print_values(r, song.GetTag()); + +diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx +index 5108b9d3c4..0b5a917020 100644 +--- a/src/command/PlayerCommands.cxx ++++ b/src/command/PlayerCommands.cxx +@@ -13,6 +13,7 @@ + #include "Partition.hxx" + #include "Instance.hxx" + #include "IdleFlags.hxx" ++#include "lib/fmt/AudioFormatFormatter.hxx" + #include "util/StringBuffer.hxx" + #include "util/ScopeExit.hxx" + #include "util/Exception.hxx" +@@ -170,7 +171,7 @@ handle_status(Client &client, [[maybe_unused]] Request args, Response &r) + + if (player_status.audio_format.IsDefined()) + r.Fmt(FMT_STRING(COMMAND_STATUS_AUDIO ": {}\n"), +- ToString(player_status.audio_format)); ++ player_status.audio_format); + } + + #ifdef ENABLE_DATABASE
meta-multimedia/recipes-multimedia/musicpd/mpd/minor-fixup-for-libfmt10.patch new file +27 -0
@@ -0,0 +1,27 @@ +Upstream-Status: Backport +[https://github.com/MusicPlayerDaemon/MPD/commit/f869593ac8913e52c711e974257bd6dc0d5dbf26] + +Signed-off-by: Wang Mingyu <[email protected]> + +From f869593ac8913e52c711e974257bd6dc0d5dbf26 Mon Sep 17 00:00:00 2001 +From: Max Kellermann <[email protected]> +Date: Mon, 15 May 2023 20:59:58 +0200 +Subject: [PATCH] TimePrint: minor fixup for libfmt 10 + +libfmt version 10 has difficulties formatting a `StringBuffer`, and we +need to help it by explicitly invoking the `c_str()` method. +--- + src/TimePrint.cxx | 2 +- + 1 files changed, 1 insertions(+), 1 deletion(-) + +diff --git a/src/TimePrint.cxx b/src/TimePrint.cxx +index 5bf05f6238..d47f3178bb 100644 +--- a/src/TimePrint.cxx ++++ b/src/TimePrint.cxx +@@ -20,5 +20,5 @@ time_print(Response &r, const char *name, + return; + } + +- r.Fmt(FMT_STRING("{}: {}\n"), name, s); ++ r.Fmt(FMT_STRING("{}: {}\n"), name, s.c_str()); + }
meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.12.bb +4 -2
@@ -18,10 +18,12 @@ DEPENDS += " \ fmt \ " -SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=v0.23.x;protocol=https \ +SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=master;protocol=https \ file://mpd.conf.in \ + file://minor-fixup-for-libfmt10.patch \ + file://fix-build-error-when-fmt-updated.patch \ " -SRCREV = "d91da9679801224847c30147f5914785b6f8f240" +SRCREV = "b1422fbda40a1831d397fb161e7a555443c2a072" S = "${WORKDIR}/git" EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-Dsystemd=enabled -Dsystemd_system_unit_dir=${systemd_system_unitdir} -Dsystemd_user_unit_dir=${systemd_system_unitdir}', '-Dsystemd=disabled', d)}"
Signature · 1 line
2.34.1
PATCH 1/1 spdlog: fix build error for master fmt
From: Wang Mingyu <[email protected]>
error message:include/spdlog/common.h:168:111: error: 'basic_runtime' is not a member of 'fmt'
Add fix-build-for-master-fmt.patch:
* update fmt_runtime_string macro
* fix build of updated macro
--- .../spdlog/fix-build-for-master-fmt.patch | 44 +++++++++++++++++++ .../recipes-support/spdlog/spdlog_1.11.0.bb | 1 + 2 files changed, 45 insertions(+) create mode 100644 meta-oe/recipes-support/spdlog/spdlog/fix-build-for-master-fmt.patch
meta-oe/recipes-support/spdlog/spdlog/fix-build-for-master-fmt.patch new file +44 -0
@@ -0,0 +1,44 @@ +Upstream-Status: Backport +[https://github.com/gabime/spdlog/commit/0ca574ae168820da0268b3ec7607ca7b33024d05] + +Signed-off-by: Wang Mingyu <[email protected]> + +From 0ca574ae168820da0268b3ec7607ca7b33024d05 Mon Sep 17 00:00:00 2001 +From: H1X4 <[email protected]> +Date: Fri, 31 Mar 2023 20:39:32 +0300 +Subject: [PATCH] fix build for master fmt (non-bundled) (#2694) + +* fix build for master fmt (non-bundled) + +* update fmt_runtime_string macro + +* fix build of updated macro +--- + include/spdlog/common.h | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/include/spdlog/common.h b/include/spdlog/common.h +index e69201a81..5f671c5c6 100644 +--- a/include/spdlog/common.h ++++ b/include/spdlog/common.h +@@ -173,12 +173,19 @@ using format_string_t = fmt::format_string<Args...>; + template<class T> + using remove_cvref_t = typename std::remove_cv<typename std::remove_reference<T>::type>::type; + ++template <typename Char> ++#if FMT_VERSION >= 90101 ++using fmt_runtime_string = fmt::runtime_format_string<Char>; ++#else ++using fmt_runtime_string = fmt::basic_runtime<Char>; ++#endif ++ + // clang doesn't like SFINAE disabled constructor in std::is_convertible<> so have to repeat the condition from basic_format_string here, + // in addition, fmt::basic_runtime<Char> is only convertible to basic_format_string<Char> but not basic_string_view<Char> + template<class T, class Char = char> + struct is_convertible_to_basic_format_string + : std::integral_constant<bool, +- std::is_convertible<T, fmt::basic_string_view<Char>>::value || std::is_same<remove_cvref_t<T>, fmt::basic_runtime<Char>>::value> ++ std::is_convertible<T, fmt::basic_string_view<Char>>::value || std::is_same<remove_cvref_t<T>, fmt_runtime_string<Char>>::value> + {}; + + # if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)
meta-oe/recipes-support/spdlog/spdlog_1.11.0.bb +1 -0
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ad SRCREV = "ad0e89cbfb4d0c1ce4d097e134eb7be67baebb36" SRC_URI = "git://github.com/gabime/spdlog.git;protocol=https;branch=v1.x \ file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch \ + file://fix-build-for-master-fmt.patch \ " DEPENDS += "fmt"
Signature · 1 line
2.34.1
PATCH 1/1 wavpack: upgrade 4.60.1 -> 5.1.0
In reply to [email protected]From: Wang Mingyu <[email protected]>
Changelog:
--- meta-oe/recipes-multimedia/wavpack/wavpack_4.60.1.bb | 10 ---------- meta-oe/recipes-multimedia/wavpack/wavpack_5.1.0.bb | 9 +++++++++ 2 files changed, 9 insertions(+), 10 deletions(-) delete mode 100644 meta-oe/recipes-multimedia/wavpack/wavpack_4.60.1.bb create mode 100644 meta-oe/recipes-multimedia/wavpack/wavpack_5.1.0.bb
meta-oe/recipes-multimedia/wavpack/wavpack_4.60.1.bb deleted +0 -10
@@ -1,10 +0,0 @@ -DESCRIPTION = "WavPack is a completely open audio compression format providing lossless, high-quality lossy, and a unique hybrid compression mode." -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://license.txt;md5=f596650807588c61fcab60bec8242df8" - -SRC_URI = "http://wavpack.com/wavpack-${PV}.tar.bz2" -SRC_URI[md5sum] = "7bb1528f910e4d0003426c02db856063" -SRC_URI[sha256sum] = "175ee4f2effd6f51e6ec487956f41177256bf892c2e8e07de5d27ed4ee6888c5" - -inherit autotools lib_package -
meta-oe/recipes-multimedia/wavpack/wavpack_5.1.0.bb new file +9 -0
@@ -0,0 +1,9 @@ +DESCRIPTION = "WavPack is a completely open audio compression format providing lossless, high-quality lossy, and a unique hybrid compression mode." +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://license.txt;md5=8c1a910e5c2a8b30ec8ffb2ffa63d9b2" + +SRC_URI = "git://github.com/dbry/WavPack.git;branch=master;protocol=https" +SRCREV = "9ccc3fe4a37d069137ceabe513a4dd9b0a09c1c2" +S = "${WORKDIR}/git" + +inherit autotools lib_package
Signature · 1 line
2.34.1
here is next error
https://errors.yoctoproject.org/Errors/Details/704258/
Quoted 157 lines · wangmy
From: Wang Mingyu <[email protected]>
backport upstream patch for build error when fmt updated:
ix-build-error-when-fmt-updated.patch minor-fixup-for-libfmt10.patchSigned-off-by Wang Mingyu <[email protected]>--- .../fix-build-error-when-fmt-updated.patch | 71 +++++++++++++++++++ .../mpd/minor-fixup-for-libfmt10.patch | 27 +++++++ .../recipes-multimedia/musicpd/mpd_0.23.12.bb | 6 +- 3 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd/fix-build-error-when-fmt-updated.patch create mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd/minor-fixup-for-libfmt10.patchmeta-multimedia/recipes-multimedia/musicpd/mpd/fix-build-error-when-fmt-updated.patch new file +71
-0@@ -0,0 +1,71 @@ +Upstream-Status: Backport [https://github.com/MusicPlayerDaemon/MPD/commit/181b96dd2d71bc8f2668776719d344466f258b5d] + +Signed-off-by: Wang Mingyu <[email protected]> + +From 181b96dd2d71bc8f2668776719d344466f258b5d Mon Sep 17 00:00:00 2001 +From: Max Kellermann <[email protected]> +Date: Mon, 15 May 2023 20:52:21 +0200 +Subject: [PATCH] command/player, SongPrint: use AudioFormatFormatter() + +libfmt version 10 apparently doesn't know how to format a +`StringBuffer`, failing the MPD build. Since we have a formatter +specialization for `AudioFormat`, let's use that - it's better and +easier to use. + +Closes https://github.com/MusicPlayerDaemon/MPD/issues/1807 +--- + src/SongPrint.cxx | 5 +++-- + src/command/PlayerCommands.cxx | 3 ++- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/SongPrint.cxx b/src/SongPrint.cxx +index 98d544cc38..835669d276 100644 +--- a/src/SongPrint.cxx ++++ b/src/SongPrint.cxx +@@ -8,6 +8,7 @@ + #include "TagPrint.hxx" + #include "client/Response.hxx" + #include "fs/Traits.hxx" ++#include "lib/fmt/AudioFormatFormatter.hxx" + #include "time/ChronoUtil.hxx" + #include "util/StringBuffer.hxx" + #include "util/UriUtil.hxx" +@@ -77,7 +78,7 @@ song_print_info(Response &r, const LightSong &song, bool base) noexcept + time_print(r, "Last-Modified", song.mtime); + + if (song.audio_format.IsDefined()) +- r.Fmt(FMT_STRING("Format: {}\n"), ToString(song.audio_format)); ++ r.Fmt(FMT_STRING("Format: {}\n"), song.audio_format); + + tag_print_values(r, song.tag); + +@@ -100,7 +101,7 @@ song_print_info(Response &r, const DetachedSong &song, bool base) noexcept + time_print(r, "Last-Modified", song.GetLastModified()); + + if (const auto &f = song.GetAudioFormat(); f.IsDefined()) +- r.Fmt(FMT_STRING("Format: {}\n"), ToString(f)); ++ r.Fmt(FMT_STRING("Format: {}\n"), f); + + tag_print_values(r, song.GetTag()); + +diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx +index 5108b9d3c4..0b5a917020 100644 +--- a/src/command/PlayerCommands.cxx ++++ b/src/command/PlayerCommands.cxx +@@ -13,6 +13,7 @@ + #include "Partition.hxx" + #include "Instance.hxx" + #include "IdleFlags.hxx" ++#include "lib/fmt/AudioFormatFormatter.hxx" + #include "util/StringBuffer.hxx" + #include "util/ScopeExit.hxx" + #include "util/Exception.hxx" +@@ -170,7 +171,7 @@ handle_status(Client &client, [[maybe_unused]] Request args, Response &r) + + if (player_status.audio_format.IsDefined()) + r.Fmt(FMT_STRING(COMMAND_STATUS_AUDIO ": {}\n"), +- ToString(player_status.audio_format)); ++ player_status.audio_format); + } + + #ifdef ENABLE_DATABASEmeta-multimedia/recipes-multimedia/musicpd/mpd/minor-fixup-for-libfmt10.patch new file +27
-0@@ -0,0 +1,27 @@ +Upstream-Status: Backport +[https://github.com/MusicPlayerDaemon/MPD/commit/f869593ac8913e52c711e974257bd6dc0d5dbf26] + +Signed-off-by: Wang Mingyu <[email protected]> + +From f869593ac8913e52c711e974257bd6dc0d5dbf26 Mon Sep 17 00:00:00 2001 +From: Max Kellermann <[email protected]> +Date: Mon, 15 May 2023 20:59:58 +0200 +Subject: [PATCH] TimePrint: minor fixup for libfmt 10 + +libfmt version 10 has difficulties formatting a `StringBuffer`, and we +need to help it by explicitly invoking the `c_str()` method. +--- + src/TimePrint.cxx | 2 +- + 1 files changed, 1 insertions(+), 1 deletion(-) + +diff --git a/src/TimePrint.cxx b/src/TimePrint.cxx +index 5bf05f6238..d47f3178bb 100644 +--- a/src/TimePrint.cxx ++++ b/src/TimePrint.cxx +@@ -20,5 +20,5 @@ time_print(Response &r, const char *name, + return; + } + +- r.Fmt(FMT_STRING("{}: {}\n"), name, s); ++ r.Fmt(FMT_STRING("{}: {}\n"), name, s.c_str()); + }meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.12.bb +4
-3@@ -18,10 +18,12 @@ DEPENDS += " \ fmt \ " -SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=v0.23.x;protocol=https \ +SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=master;protocol=https \ file://mpd.conf.in \ + file://minor-fixup-for-libfmt10.patch \ + file://fix-build-error-when-fmt-updated.patch \ " -SRCREV = "d91da9679801224847c30147f5914785b6f8f240" +SRCREV = "b1422fbda40a1831d397fb161e7a555443c2a072" S = "${WORKDIR}/git" EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-Dsystemd=enabled -Dsystemd_system_unit_dir=${systemd_system_unitdir} -Dsystemd_user_unit_dir=${systemd_system_unitdir}', '-Dsystemd=disabled', d)}" --2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#102623): https://lists.openembedded.org/g/openembedded-devel/message/102623
Mute This Topic: https://lists.openembedded.org/mt/98922100/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-