Skip to content
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

Closed
heitbaum opened this issue Dec 27, 2024 · 11 comments
Closed

Failed compile with libfmt-11.1.0 #2173

heitbaum opened this issue Dec 27, 2024 · 11 comments

Comments

@heitbaum
Copy link
Contributor

heitbaum commented Dec 27, 2024

Bug report

Describe the bug

Compile with libfmt 1.11.0 fails (api changes)

Expected Behavior

  • Successful compile

Actual Behavior

  • error

Version

0.23.16

Configuration

Log

Majority of the errors being error: cannot convert


[2/81] Compiling C++ object mpd.p/src_decoder_DecoderPrint.cxx.o
FAILED: mpd.p/src_decoder_DecoderPrint.cxx.o 
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ -Impd.p -I. -I.. -Isrc -I../src -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/dbus-1.0 -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/lib/dbus-1.0/include -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/yajl -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c++17 -ffast-math -ftree-vectorize -Wcast-qual -Wdouble-promotion -Wmissing-declarations -Wshadow -Wunused -Wvla -Wwrite-strings -Wno-stringop-overflow -fno-threadsafe-statics -fmerge-all-constants -Wcomma-subscript -Wextra-semi -Wmismatched-tags -Woverloaded-virtual -Wsign-promo -Wvolatile -Wvirtual-inheritance -Wno-non-virtual-dtor -Wsuggest-override -fvisibility=hidden -ffunction-sections -fdata-sections -D_GNU_SOURCE -march=x86-64-v3 -Wall -pipe -O2 -fomit-frame-pointer -DNDEBUG -DPCRE2_CODE_UNIT_WIDTH=0 -DBOOST_ALL_NO_LIB -MD -MQ mpd.p/src_decoder_DecoderPrint.cxx.o -MF mpd.p/src_decoder_DecoderPrint.cxx.o.d -o mpd.p/src_decoder_DecoderPrint.cxx.o -c ../src/decoder/DecoderPrint.cxx
In file included from ../src/decoder/DecoderPrint.cxx:23:
../src/client/Response.hxx: In instantiation of 'bool Response::Fmt(const S&, Args&& ...) [with S = decoder_plugin_print(Response&, const DecoderPlugin&)::<lambda()>::FMT_COMPILE_STRING; Args = {const char* const&}]':
../src/decoder/DecoderPrint.cxx:38:7:   required from here
   38 |         r.Fmt(FMT_STRING("plugin: {}\n"), plugin.name);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/client/Response.hxx:86:28: error: cannot convert 'const decoder_plugin_print(Response&, const DecoderPlugin&)::<lambda()>::FMT_COMPILE_STRING' to 'fmt::v11::string_view' {aka 'fmt::v11::basic_string_view<char>'}
   86 |                 return VFmt(format_str,
      |                        ~~~~^~~~~~~~~~~~
   87 |                             fmt::make_format_args(args...));
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/client/Response.hxx:81:36: note: initializing argument 1 of 'bool Response::VFmt(fmt::v11::string_view, fmt::v11::format_args)'
   81 |         bool VFmt(fmt::string_view format_str, fmt::format_args args) noexcept;
      |                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
../src/client/Response.hxx: In instantiation of 'bool Response::Fmt(const S&, Args&& ...) [with S = decoder_plugin_print(Response&, const DecoderPlugin&)::<lambda()>::FMT_COMPILE_STRING; Args = {const char* const&}]':
../src/decoder/DecoderPrint.cxx:42:9:   required from here
   42 |                         r.Fmt(FMT_STRING("suffix: {}\n"), *p);
      |                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/client/Response.hxx:86:28: error: cannot convert 'const decoder_plugin_print(Response&, const DecoderPlugin&)::<lambda()>::FMT_COMPILE_STRING' to 'fmt::v11::string_view' {aka 'fmt::v11::basic_string_view<char>'}
   86 |                 return VFmt(format_str,
      |                        ~~~~^~~~~~~~~~~~
   87 |                             fmt::make_format_args(args...));
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/client/Response.hxx:81:36: note: initializing argument 1 of 'bool Response::VFmt(fmt::v11::string_view, fmt::v11::format_args)'
   81 |         bool VFmt(fmt::string_view format_str, fmt::format_args args) noexcept;
      |                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
../src/client/Response.hxx: In instantiation of 'bool Response::Fmt(const S&, Args&& ...) [with S = decoder_plugin_print(Response&, const DecoderPlugin&)::<lambda()>::FMT_COMPILE_STRING; Args = {const char* const&}]':
../src/decoder/DecoderPrint.cxx:46:9:   required from here
   46 |                         r.Fmt(FMT_STRING("mime_type: {}\n"), *p);
      |                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/client/Response.hxx:86:28: error: cannot convert 'const decoder_plugin_print(Response&, const DecoderPlugin&)::<lambda()>::FMT_COMPILE_STRING' to 'fmt::v11::string_view' {aka 'fmt::v11::basic_string_view<char>'}
   86 |                 return VFmt(format_str,
      |                        ~~~~^~~~~~~~~~~~
   87 |                             fmt::make_format_args(args...));
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/client/Response.hxx:81:36: note: initializing argument 1 of 'bool Response::VFmt(fmt::v11::string_view, fmt::v11::format_args)'
   81 |         bool VFmt(fmt::string_view format_str, fmt::format_args args) noexcept;
      |                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
…
@MaxKellermann
Copy link
Member

I have no idea what this error means. Where can I find information about this fmt API change?

@lazypingu
Copy link
Contributor

gabime/spdlog#3301

Maybe related?

@depressed-pho
Copy link
Contributor

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),

@LemonBreezes
Copy link

I can confirm this issue. I temporarily downgraded to dev-libs/libfmt-11.0.2 on Gentoo. MPD failed to compile with dev-libs/libfmt-11.1.1.

@neheb
Copy link
Contributor

neheb commented Jan 7, 2025

@depressed-pho wonderful.

@MaxKellermann
Copy link
Member

Why can nobody show me documentation of this API change?

@a-dekker
Copy link

a-dekker commented Jan 11, 2025

Issue is already fixed on the fmt side in https://github.com/fmtlib/fmt/releases/tag/11.1.1
Still not compiling with mpd

@heitbaum
Copy link
Contributor Author

Issue is already fixed on the fmt side in https://github.com/fmtlib/fmt/releases/tag/11.1.1

Still erroring here with fmt-11.1.1


BUILD      mpd (target)
    TOOLCHAIN      meson (auto-detect)
Executing (target): meson setup --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var --buildtype=plain -Dstrip=true --cross-file=/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mpd-0.23.16/.x86_64-libreelec-linux-gnu/meson.conf -Dadplug=disabled -Dalsa=enabled -Dao=disabled -Daudiofile=disabled -Dbzip2=enabled -Dcdio_paranoia=disabled -Dchromaprint=disabled -Dcue=true -Dcurl=enabled -Ddatabase=true -Ddocumentation=disabled -Ddsd=true -Dexpat=enabled -Dfaad=enabled -Dffmpeg=enabled -Dfifo=true -Dflac=enabled -Dfluidsynth=disabled -Dfuzzer=false -Dgme=disabled -Dhttpd=true -Dhtml_manual=false -Diconv=disabled -Dicu=disabled -Did3tag=enabled -Dipv6=enabled -Diso9660=enabled -Djack=disabled -Dlame=enabled -Dlibmpdclient=enabled -Dlibsamplerate=enabled -Dlocal_socket=false -Dmad=enabled -Dmanpages=false -Dmikmod=disabled -Dmms=disabled -Dmodplug=disabled -Dmpcdec=disabled -Dmpg123=disabled -Dneighbor=false -Dnfs=enabled -Dopenal=disabled -Dopus=enabled -Doss=disabled -Dpipe=true -Dpulse=enabled -Dqobuz=enabled -Drecorder=false -Dshine=disabled -Dshout=disabled -Dsidplay=disabled -Dsmbclient=enabled -Dsndfile=enabled -Dsndio=disabled -Dsolaris_output=disabled -Dsoundcloud=enabled -Dsoxr=enabled -Dsqlite=enabled -Dsyslog=disabled -Dsystemd=disabled -Dtest=false -Dtwolame=disabled -Dupnp=disabled -Dvorbis=enabled -Dvorbisenc=enabled -Dwave_encoder=true -Dwavpack=enabled -Dwebdav=enabled -Dwildmidi=disabled -Dyajl=enabled -Dzeroconf=avahi -Dzlib=enabled -Dzzip=disabled /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mpd-0.23.16
Directory already configured.

Just run your build command (e.g. ninja) and Meson will regenerate as necessary.
Run "meson setup --reconfigure" to force Meson to regenerate.

If build failures persist, run "meson setup --wipe" to rebuild from scratch
using the same options as passed when configuring the build.
Executing (target): ninja 
[0/1] Regenerating build files
The Meson build system
Version: 1.7.0.rc1
Source dir: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mpd-0.23.16
Build dir: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mpd-0.23.16/.x86_64-libreelec-linux-gnu
Build type: cross build
Project name: mpd
Project version: 0.23.16
C compiler for the host machine: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-gcc (gcc 15.0.0 "x86_64-libreelec-linux-gnu-gcc-15.0.0 (GCC) 15.0.0 20250105 (experimental)")
C linker for the host machine: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-gcc ld.gold 2.43.1
C++ compiler for the host machine: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ (gcc 15.0.0 "x86_64-libreelec-linux-gnu-g++-15.0.0 (GCC) 15.0.0 20250105 (experimental)")
C++ linker for the host machine: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ ld.gold 2.43.1
C compiler for the build machine: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/host-gcc (gcc 14.2.0 "gcc (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0")
C linker for the build machine: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/host-gcc ld.bfd 2.42
C++ compiler for the build machine: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/host-g++ (gcc 14.2.0 "g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0")
C++ linker for the build machine: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/host-g++ ld.bfd 2.42
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Found git repository at /var/media/DATA/home-rudi/LibreELEC.tv
Configuring Version.h using configuration
Compiler for C++ supports arguments -fvisibility=hidden: YES (cached)
Compiler for C++ supports arguments -ffunction-sections: YES (cached)
Compiler for C++ supports arguments -fdata-sections: YES (cached)
Compiler for C supports arguments -fvisibility=hidden: YES (cached)
Compiler for C supports arguments -ffunction-sections: YES (cached)
Compiler for C supports arguments -fdata-sections: YES (cached)
Compiler for C++ supports arguments -ffast-math: YES (cached)
Compiler for C++ supports arguments -ftree-vectorize: YES (cached)
Compiler for C++ supports arguments -Wcast-qual: YES (cached)
Compiler for C++ supports arguments -Wdouble-promotion: YES (cached)
Compiler for C++ supports arguments -Wmissing-declarations: YES (cached)
Compiler for C++ supports arguments -Wshadow: YES (cached)
Compiler for C++ supports arguments -Wunused: YES (cached)
Compiler for C++ supports arguments -Wvla: YES (cached)
Compiler for C++ supports arguments -Wwrite-strings: YES (cached)
Compiler for C++ supports arguments -Wunreachable-code-aggressive: NO (cached)
Compiler for C++ supports arguments -Wused-but-marked-unused: NO (cached)
Compiler for C++ supports arguments -Wno-stringop-overflow: YES (cached)
Compiler for C++ supports arguments -Wno-nan-infinity-disabled: NO (cached)
Compiler for C++ supports arguments -fno-threadsafe-statics: YES (cached)
Compiler for C++ supports arguments -fmerge-all-constants: YES (cached)
Compiler for C++ supports arguments -Wcomma-subscript: YES (cached)
Compiler for C++ supports arguments -Wextra-semi: YES (cached)
Compiler for C++ supports arguments -Wmismatched-tags: YES (cached)
Compiler for C++ supports arguments -Woverloaded-virtual: YES (cached)
Compiler for C++ supports arguments -Wsign-promo: YES (cached)
Compiler for C++ supports arguments -Wvolatile: YES (cached)
Compiler for C++ supports arguments -Wvirtual-inheritance: YES (cached)
Compiler for C++ supports arguments -Wno-non-virtual-dtor: YES (cached)
Compiler for C++ supports arguments -Wcomma: NO (cached)
Compiler for C++ supports arguments -Wheader-hygiene: NO (cached)
Compiler for C++ supports arguments -Winconsistent-missing-destructor-override: NO (cached)
Compiler for C++ supports arguments -Wsuggest-override: YES (cached)
Compiler for C supports arguments -ffast-math: YES (cached)
Compiler for C supports arguments -ftree-vectorize: YES (cached)
Compiler for C supports arguments -Wcast-qual: YES (cached)
Compiler for C supports arguments -Wdouble-promotion: YES (cached)
Compiler for C supports arguments -Wmissing-declarations: YES (cached)
Compiler for C supports arguments -Wshadow: YES (cached)
Compiler for C supports arguments -Wunused: YES (cached)
Compiler for C supports arguments -Wvla: YES (cached)
Compiler for C supports arguments -Wwrite-strings: YES (cached)
Compiler for C supports arguments -Wunreachable-code-aggressive: NO (cached)
Compiler for C supports arguments -Wused-but-marked-unused: NO (cached)
Compiler for C supports arguments -Wno-stringop-overflow: YES (cached)
Compiler for C supports arguments -Wno-nan-infinity-disabled: NO (cached)
Compiler for C supports arguments -Wmissing-prototypes: YES (cached)
Compiler for C supports arguments -Wstrict-prototypes: YES (cached)
Compiler for C++ supports link arguments -Wl,-z,relro: YES (cached)
Compiler for C++ supports link arguments -Wl,-z,now: YES (cached)
Compiler for C++ supports link arguments -Wl,--gc-sections: YES (cached)
Checking for function "getpwnam_r" : YES (cached)
Checking for function "initgroups" : YES (cached)
Checking for function "fnmatch" : YES (cached)
Checking for function "strndup" : YES (cached)
Checking for function "strcasestr" : YES (cached)
Dependency boost found: YES 1.87.0 (cached)
Dependency fmt found: YES 11.1.1 (cached)
Found pkg-config: YES (/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/pkg-config) 0.29.2
Found CMake: NO
Run-time dependency liburing found: NO (tried pkgconfig and cmake)
Configuring Features.h using configuration
Dependency threads found: YES unknown (cached)
Checking for function "pthread_setname_np" with dependency threads: YES (cached)
Header "sys/socket.h" has symbol "AF_INET6" : YES (cached)
Configuring Features.h using configuration
Dependency dbus-1 found: YES 1.16.0 (cached)
Dependency icu-i18n skipped: feature icu disabled
Dependency icu-uc skipped: feature icu disabled
Dependency iconv skipped: feature iconv disabled
Dependency smbclient found: YES 0.8.0 (cached)
Dependency zlib found: YES 1.3.1 (cached)
Dependency alsa found: YES 1.2.13 (cached)
Dependency libchromaprint skipped: feature chromaprint disabled
Dependency libcurl found: YES 8.11.1 (cached)
Dependency expat found: YES 2.6.4 (cached)
Dependency libavformat found: YES 61.7.100 (cached)
Dependency libavcodec found: YES 61.19.100 (cached)
Dependency libavutil found: YES 59.39.100 (cached)
Dependency libavfilter found: YES 10.4.100 (cached)
Dependency libnfs found: YES 5.0.3 (cached)
Dependency libpcre2-8 found: YES 10.45 (cached)
Run-time dependency libpipewire-0.3 found: NO (tried pkgconfig and cmake)
Dependency libpulse found: YES 17.0 (cached)
Library sndio skipped: feature sndio disabled
Dependency sqlite3 found: YES 3.47.2 (cached)
Dependency libsystemd skipped: feature systemd disabled
Dependency yajl found: YES 2.1.0 (cached)
Dependency avahi-client found: YES 0.8 (cached)
Dependency id3tag found: YES 0.16.3 (cached)
Dependency samplerate found: YES 0.2.2 (cached)
Dependency soxr found: YES 0.1.3 (cached)
Dependency libcdio_paranoia skipped: feature cdio_paranoia disabled
Dependency libmms skipped: feature mms disabled
Configuring Features.h using configuration
Dependency libiso9660 found: YES 2.1.1 (cached)
Library bz2 found: YES
Dependency zziplib skipped: feature zzip disabled
Configuring Features.h using configuration
Dependency ao skipped: feature ao disabled
Dependency jack skipped: feature jack disabled
Dependency shout skipped: feature shout disabled
Configuring Features.h using configuration
Dependency flac found: YES 1.4.3 (cached)
Dependency opus found: YES 1.4-git-a8e4ebb (cached)
Dependency vorbis found: YES 1.3.7 (cached)
Dependency vorbisenc found: YES 1.3.7 (cached)
Dependency ogg found: YES 1.3.5 (cached)
Dependency adplug skipped: feature adplug disabled
Dependency fluidsynth skipped: feature fluidsynth disabled
Dependency audiofile skipped: feature audiofile disabled
Library faad found: YES
Dependency libgme skipped: feature gme disabled
Library mad found: YES
Dependency libmikmod skipped: feature mikmod disabled
Dependency libmodplug skipped: feature modplug disabled
Dependency libopenmpt found: YES 0.7.13+release.autotools (cached)
Library mpcdec skipped: feature mpcdec disabled
Dependency libmpg123 skipped: feature mpg123 disabled
Dependency sndfile found: YES 1.2.2 (cached)
Dependency wavpack found: YES 5.7.0 (cached)
Dependency wildmidi skipped: feature wildmidi disabled
Library WildMidi skipped: feature wildmidi disabled
Configuring Features.h using configuration
Library mp3lame found: YES
Dependency twolame skipped: feature twolame disabled
Dependency shine skipped: feature shine disabled
Configuring Features.h using configuration
Configuring Features.h using configuration
Dependency libmpdclient found: YES 2.22 (cached)
Configuring config.h using configuration
Build targets in project: 69

mpd 0.23.16

  User defined options
    Cross files   : /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mpd-0.23.16/.x86_64-libreelec-linux-gnu/meson.conf
    adplug        : disabled
    alsa          : enabled
    ao            : disabled
    audiofile     : disabled
    bindir        : /usr/bin
    buildtype     : plain
    bzip2         : enabled
    cdio_paranoia : disabled
    chromaprint   : disabled
    cue           : true
    curl          : enabled
    database      : true
    documentation : disabled
    dsd           : true
    expat         : enabled
    faad          : enabled
    ffmpeg        : enabled
    fifo          : true
    flac          : enabled
    fluidsynth    : disabled
    fuzzer        : false
    gme           : disabled
    html_manual   : false
    httpd         : true
    iconv         : disabled
    icu           : disabled
    id3tag        : enabled
    ipv6          : enabled
    iso9660       : enabled
    jack          : disabled
    lame          : enabled
    libdir        : /usr/lib
    libexecdir    : /usr/lib
    libmpdclient  : enabled
    libsamplerate : enabled
    local_socket  : false
    localstatedir : /var
    mad           : enabled
    manpages      : false
    mikmod        : disabled
    mms           : disabled
    modplug       : disabled
    mpcdec        : disabled
    mpg123        : disabled
    neighbor      : false
    nfs           : enabled
    openal        : disabled
    opus          : enabled
    oss           : disabled
    pipe          : true
    prefix        : /usr
    pulse         : enabled
    qobuz         : enabled
    recorder      : false
    sbindir       : /usr/sbin
    shine         : disabled
    shout         : disabled
    sidplay       : disabled
    smbclient     : enabled
    sndfile       : enabled
    sndio         : disabled
    solaris_output: disabled
    soundcloud    : enabled
    soxr          : enabled
    sqlite        : enabled
    strip         : true
    sysconfdir    : /etc
    syslog        : disabled
    systemd       : disabled
    test          : false
    twolame       : disabled
    upnp          : disabled
    vorbis        : enabled
    vorbisenc     : enabled
    wave_encoder  : true
    wavpack       : enabled
    webdav        : enabled
    wildmidi      : disabled
    yajl          : enabled
    zeroconf      : avahi
    zlib          : enabled
    zzip          : disabled

Found ninja-1.12.1 at /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/ninja
Cleaning... 0 files.
[24/310] Compiling C++ object src/output/liboutput_glue.a.p/Print.cxx.o
FAILED: src/output/liboutput_glue.a.p/Print.cxx.o 
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ -Isrc/output/liboutput_glue.a.p -Isrc/output -I../src/output -Isrc -I../src -I. -I.. -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c++17 -ffast-math -ftree-vectorize -Wcast-qual -Wdouble-promotion -Wmissing-declarations -Wshadow -Wunused -Wvla -Wwrite-strings -Wno-stringop-overflow -fno-threadsafe-statics -fmerge-all-constants -Wcomma-subscript -Wextra-semi -Wmismatched-tags -Woverloaded-virtual -Wsign-promo -Wvolatile -Wvirtual-inheritance -Wno-non-virtual-dtor -Wsuggest-override -fvisibility=hidden -ffunction-sections -fdata-sections -D_GNU_SOURCE -march=x86-64-v3 -Wall -pipe -O2 -fomit-frame-pointer -DNDEBUG -fPIC -MD -MQ src/output/liboutput_glue.a.p/Print.cxx.o -MF src/output/liboutput_glue.a.p/Print.cxx.o.d -o src/output/liboutput_glue.a.p/Print.cxx.o -c ../src/output/Print.cxx
In file included from ../src/output/Print.cxx:27:
../src/client/Response.hxx: In instantiation of 'bool Response::Fmt(const S&, Args&& ...) [with S = printAudioDevices(Response&, const MultipleOutputs&)::<lambda()>::FMT_COMPILE_STRING; Args = {unsigned int&, const char*, const char*, unsigned int}]':
../src/output/Print.cxx:37:8:   required from here
   37 |                 r.Fmt(FMT_STRING("outputid: {}\n"
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   38 |                                  "outputname: {}\n"
      |                                  ~~~~~~~~~~~~~~~~~~
   39 |                                  "plugin: {}\n"
      |                                  ~~~~~~~~~~~~~~
   40 |                                  "outputenabled: {}\n"),
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~
   41 |                       i,
      |                       ~~
   42 |                       ao.GetName(), ao.GetPluginName(),
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   43 |                       (unsigned)ao.IsEnabled());
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~
../src/client/Response.hxx:86:28: error: cannot convert 'const printAudioDevices(Response&, const MultipleOutputs&)::<lambda()>::FMT_COMPILE_STRING' to 'fmt::v11::string_view' {aka 'fmt::v11::basic_string_view<char>'}
   86 |                 return VFmt(format_str,
      |                        ~~~~^~~~~~~~~~~~
   87 |                             fmt::make_format_args(args...));
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/client/Response.hxx:81:36: note: initializing argument 1 of 'bool Response::VFmt(fmt::v11::string_view, fmt::v11::format_args)'
   81 |         bool VFmt(fmt::string_view format_str, fmt::format_args args) noexcept;
      |                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
../src/client/Response.hxx: In instantiation of 'bool Response::Fmt(const S&, Args&& ...) [with S = printAudioDevices(Response&, const MultipleOutputs&)::<lambda()>::FMT_COMPILE_STRING; Args = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]':
../src/output/Print.cxx:46:9:   required from here
   46 |                         r.Fmt(FMT_STRING("attribute: {}={}\n"),
      |                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   47 |                               attribute, value);
      |                               ~~~~~~~~~~~~~~~~~
../src/client/Response.hxx:86:28: error: cannot convert 'const printAudioDevices(Response&, const MultipleOutputs&)::<lambda()>::FMT_COMPILE_STRING' to 'fmt::v11::string_view' {aka 'fmt::v11::basic_string_view<char>'}
   86 |                 return VFmt(format_str,
      |                        ~~~~^~~~~~~~~~~~
   87 |                             fmt::make_format_args(args...));
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/client/Response.hxx:81:36: note: initializing argument 1 of 'bool Response::VFmt(fmt::v11::string_view, fmt::v11::format_args)'
   81 |         bool VFmt(fmt::string_view format_str, fmt::format_args args) noexcept;
      |                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
[39/310] Compiling C++ object src/decoder/plugins/libdecoder_plugins.a.p/FfmpegDecoderPlugin.cxx.o
ninja: build stopped: subcommand failed.
FAILURE: s/build mpd during make_target (default)
*********** FAILED COMMAND ***********
ninja ${NINJA_OPTS} ${PKG_MAKE_OPTS_TARGET}
**************************************

@a-dekker
Copy link

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.

@a-dekker
Copy link

a-dekker commented Jan 11, 2025

@MaxKellermann here is the way the fmt author explains things: fmtlib/fmt#4304 (comment) and an additional remark here fmtlib/fmt#4304 (comment)

@heitbaum
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants