-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed compile with libfmt-11.1.0 #2173
Comments
I have no idea what this error means. Where can I find information about this fmt API change? |
Maybe related? |
The following patch could fix the build but I'm not sure this is a correct fix, as I'm new to both MPD and fmtlib. $NetBSD$
Fix build with fmtlib-11. In this function S can be a type created by
fmtlib macro FMT_STRING(), which is actually a lambda function and cannot
be converted directly to fmt::string_view.
https://github.com/MusicPlayerDaemon/MPD/issues/2173
--- src/client/Response.hxx.orig 2025-01-06 04:21:57.888848307 +0000
+++ src/client/Response.hxx
@@ -83,7 +83,7 @@ public:
template<typename S, typename... Args>
bool Fmt(const S &format_str, Args&&... args) noexcept {
#if FMT_VERSION >= 90000
- return VFmt(format_str,
+ return VFmt(fmt::format_string<Args...>(format_str),
fmt::make_format_args(args...));
#elif FMT_VERSION >= 70000
return VFmt(fmt::to_string_view(format_str),
@@ -113,7 +113,7 @@ public:
void FmtError(enum ack code,
const S &format_str, Args&&... args) noexcept {
#if FMT_VERSION >= 90000
- return VFmtError(code, format_str,
+ return VFmtError(code, fmt::format_string<Args...>(format_str),
fmt::make_format_args(args...));
#elif FMT_VERSION >= 70000
return VFmtError(code, fmt::to_string_view(format_str), |
I can confirm this issue. I temporarily downgraded to |
@depressed-pho wonderful. |
Why can nobody show me documentation of this API change? |
|
Still erroring here with fmt-11.1.1
|
Sorry, you are right. I was actually triggered by commit fmtlib/fmt@21aa095 (which is not released yet) and did a test with master. But I only successfully compiled fmtlib and forgot to link it to mpd. And the latest master also fails with mpd. I now created an issue in the fmt repo fmtlib/fmt#4304, let's hope we can get some more insight. |
@MaxKellermann here is the way the fmt author explains things: fmtlib/fmt#4304 (comment) and an additional remark here fmtlib/fmt#4304 (comment) |
Bug report
Describe the bug
Compile with libfmt 1.11.0 fails (api changes)
Expected Behavior
Actual Behavior
Version
0.23.16
Configuration
Log
Majority of the errors being
error: cannot convert
The text was updated successfully, but these errors were encountered: