#1150270 yuzu: FTBFS: error: passing ‘const fmt::v11::formatter<Common::FS::SeekOrigin, char, void>’ as ‘this’ argument discards qualifiers

Package:
src:yuzu
Source:
src:yuzu
Submitter:
Sebastian Ramacher
Date:
2026-10-17 16:55:03 UTC
Severity:
normal
Tags:
#1150270#5
Date:
2026-10-07 20:00:43 UTC
From:
To:
Source: yuzu
Version: 0-1734+ds-10
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: sramacher@debian.org

Dear maintainer,

yuzu FTBFS with the new fmtlib:

[1220/2601] /usr/bin/x86_64-linux-gnu-g++ -DARCHITECTURE_x86_64=1 -DBOOST_ASIO_DISABLE_CONCEPTS -DBOOST_CONTEXT_DYN_LINK="" -DBOOST_CONTEXT_EXPORT=EXPORT -DBOOST_CONTEXT_NO_LIB="" -DEXPERIMENTAL_KEY_INSTRUCTIONS -DFMT_SHARED -DNDEBUG -DYUZU_ENABLE_PORTABLE -DYUZU_UNIX=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/build/reproducible-path/yuzu-0-1734+ds/src/. -I/build/reproducible-path/yuzu-0-1734+ds/externals/./microprofile -isystem /usr/include/stb -isystem /usr/lib/llvm-21/include -g -Werror=clobbered -Werror=volatile-register-var -D__DEB_CANARY_CXXFLAGS_61b4a64be663682e8cb037d9719ad8cd__ -ffile-prefix-map=/build/reproducible-path/yuzu-0-1734+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -march=x86-64-v2 -D__DEB_CANARY_CPPFLAGS_61b4a64be663682e8cb037d9719ad8cd__ -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -DNDEBUG -std=gnu++20 -flto=auto -fno-fat-lto-objects -fwrapv -Werror=all -Werror=extra -Werror=missing-declarations -Werror=shadow -Werror=unused -Wno-attributes -Wno-invalid-offsetof -Wno-unused-parameter -Wno-missing-field-initializers -mcx16 -Wno-array-bounds -Wno-stringop-overread -Wno-stringop-overflow -Winvalid-pch -include /build/reproducible-path/yuzu-0-1734+ds/obj-x86_64-linux-gnu/src/common/CMakeFiles/common.dir/cmake_pch.hxx -MD -MT src/common/CMakeFiles/common.dir/fs/file.cpp.o -MF src/common/CMakeFiles/common.dir/fs/file.cpp.o.d -o src/common/CMakeFiles/common.dir/fs/file.cpp.o -c /build/reproducible-path/yuzu-0-1734+ds/src/common/fs/file.cpp
FAILED: [code=1] src/common/CMakeFiles/common.dir/fs/file.cpp.o
/usr/bin/x86_64-linux-gnu-g++ -DARCHITECTURE_x86_64=1 -DBOOST_ASIO_DISABLE_CONCEPTS -DBOOST_CONTEXT_DYN_LINK="" -DBOOST_CONTEXT_EXPORT=EXPORT -DBOOST_CONTEXT_NO_LIB="" -DEXPERIMENTAL_KEY_INSTRUCTIONS -DFMT_SHARED -DNDEBUG -DYUZU_ENABLE_PORTABLE -DYUZU_UNIX=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/build/reproducible-path/yuzu-0-1734+ds/src/. -I/build/reproducible-path/yuzu-0-1734+ds/externals/./microprofile -isystem /usr/include/stb -isystem /usr/lib/llvm-21/include -g -Werror=clobbered -Werror=volatile-register-var -D__DEB_CANARY_CXXFLAGS_61b4a64be663682e8cb037d9719ad8cd__ -ffile-prefix-map=/build/reproducible-path/yuzu-0-1734+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -march=x86-64-v2 -D__DEB_CANARY_CPPFLAGS_61b4a64be663682e8cb037d9719ad8cd__ -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -DNDEBUG -std=gnu++20 -flto=auto -fno-fat-lto-objects -fwrapv -Werror=all -Werror=extra -Werror=missing-declarations -Werror=shadow -Werror=unused -Wno-attributes -Wno-invalid-offsetof -Wno-unused-parameter -Wno-missing-field-initializers -mcx16 -Wno-array-bounds -Wno-stringop-overread -Wno-stringop-overflow -Winvalid-pch -include /build/reproducible-path/yuzu-0-1734+ds/obj-x86_64-linux-gnu/src/common/CMakeFiles/common.dir/cmake_pch.hxx -MD -MT src/common/CMakeFiles/common.dir/fs/file.cpp.o -MF src/common/CMakeFiles/common.dir/fs/file.cpp.o.d -o src/common/CMakeFiles/common.dir/fs/file.cpp.o -c /build/reproducible-path/yuzu-0-1734+ds/src/common/fs/file.cpp
In file included from /usr/include/fmt/format.h:41,
                 from /build/reproducible-path/yuzu-0-1734+ds/src/./common/common_precompiled_headers.h:11,
                 from /build/reproducible-path/yuzu-0-1734+ds/src/common/precompiled_headers.h:6,
                 from /build/reproducible-path/yuzu-0-1734+ds/obj-x86_64-linux-gnu/src/common/CMakeFiles/common.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/fmt/base.h: In instantiation of ‘static void fmt::v11::detail::value<Context>::format_custom(void*, fmt::v11::parse_context<typename Context::char_type>&, Context&) [with T = Common::FS::SeekOrigin; Formatter = fmt::v11::formatter<Common::FS::SeekOrigin, char, void>; Context = fmt::v11::context; typename Context::char_type = char]’:
/usr/include/fmt/base.h:2220:19:   required from ‘constexpr fmt::v11::detail::value<Context>::value(T&, fmt::v11::detail::custom_tag) [with T = const Common::FS::SeekOrigin; typename std::enable_if<has_formatter<T, typename Context::char_type>(), int>::type <anonymous> = 0; Context = fmt::v11::context]’
 2220 |     custom.format = format_custom<value_type, formatter<value_type, char_type>>;
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/fmt/base.h:2200:65:   required from ‘constexpr fmt::v11::detail::value<Context>::value(T&) [with T = const Common::FS::SeekOrigin; typename std::enable_if<(fmt::v11::detail::use_formatter<T>::value || (!1)), int>::type <anonymous> = 0; Context = fmt::v11::context]’
 2200 |   FMT_CONSTEXPR20 FMT_INLINE value(T& x) : value(x, custom_tag()) {}
      |                                                                 ^
/usr/include/fmt/base.h:2773:20:   required from ‘constexpr fmt::v11::detail::format_arg_store<Context, NUM_ARGS, NUM_NAMED_ARGS, DESC> fmt::v11::make_format_args(T& ...) [with Context = context; T = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, const long int, const Common::FS::SeekOrigin, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >}; int NUM_ARGS = 4; int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 57149]’
 2773 |   return {{args...}};
      |                    ^
/build/reproducible-path/yuzu-0-1734+ds/src/./common/logging/log.h:34:44:   required from ‘void Common::Log::FmtLogMessage(Class, Level, const char*, unsigned int, const char*, const char*, const Args& ...) [with Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long int, Common::FS::SeekOrigin, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >}]’
   34 |                       fmt::make_format_args(args...));
      |                       ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/build/reproducible-path/yuzu-0-1734+ds/src/common/fs/file.cpp:437:9:   required from here
  437 |         LOG_ERROR(Common_Filesystem,
      |         ^~~~~~~~~
/usr/include/fmt/base.h:2240:29: error: passing ‘const fmt::v11::formatter<Common::FS::SeekOrigin, char, void>’ as ‘this’ argument discards qualifiers [-fpermissive]
 2240 |     ctx.advance_to(cf.format(*static_cast<qualified_type*>(arg), ctx));
      |                    ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /build/reproducible-path/yuzu-0-1734+ds/src/./common/logging/log.h:11,
                 from /build/reproducible-path/yuzu-0-1734+ds/src/./common/assert.h:7,
                 from /build/reproducible-path/yuzu-0-1734+ds/src/./common/common_precompiled_headers.h:13:
/build/reproducible-path/yuzu-0-1734+ds/src/./common/logging/formatter.h:17:10: note:   in call to ‘decltype (ctx.out()) fmt::v11::formatter<T, typename std::enable_if<is_enum_v<T>, char>::type>::format(const T&, FormatContext&) [with FormatContext = fmt::v11::context; T = Common::FS::SeekOrigin; typename std::enable_if<is_enum_v<T>, char>::type = char; decltype (ctx.out()) = fmt::v11::basic_appender<char>]’
   17 |     auto format(const T& value, FormatContext& ctx) -> decltype(ctx.out()) {
      |          ^~~~~~

See
https://buildd.debian.org/status/fetch.php?pkg=yuzu&arch=amd64&ver=0-1734%2Bds-10%2Bb1&stamp=1791381825&raw=0
for details.

Cheers

#1150270#10
Date:
2026-10-13 07:03:49 UTC
From:
To:
I have prepared a patch fixing the ftbfs, also an additional one-liner
to deal with a  GCC 16 issue.

Regards,
Aron

#1150270#17
Date:
2026-10-15 16:24:59 UTC
From:
To:
Dear maintainer,

I've prepared an NMU for yuzu (versioned as 0-1734+ds-10.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should cancel it.

Regards.

Aron

#1150270#24
Date:
2026-10-17 16:53:16 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
yuzu, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1150270@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aron Xu <aron@debian.org> (supplier of updated yuzu package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Thu, 15 Oct 2026 23:46:15 +0800
Source: yuzu
Architecture: source
Version: 0-1734+ds-10.1
Distribution: unstable
Urgency: medium
Maintainer: Andrea Pappacoda <tachi@debian.org>
Changed-By: Aron Xu <aron@debian.org>
Closes: 1150270
Changes:
 yuzu (0-1734+ds-10.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * Fix build with fmtlib 11 by making custom formatters' format methods
     const and including fmt/ranges.h for fmt::join (Closes: #1150270).
   * Initialize the const dummy control-flow block to fix a GCC 16 build error.
Checksums-Sha1:
 7915240769098f9c7bfb892e1a61915fd3b5bc72 2505 yuzu_0-1734+ds-10.1.dsc
 97182465390233b28eb7e49b634bf1e5182e3380 1774188 yuzu_0-1734+ds-10.1.debian.tar.xz
 ebb72dfb2d46f8fe872a9ecdd848c804cfa403af 5896 yuzu_0-1734+ds-10.1_source.buildinfo
Checksums-Sha256:
 ecc76eb1b54572c0da5776e7888e2dfc383841ee25ccfc6f43a04dbb53c6726b 2505 yuzu_0-1734+ds-10.1.dsc
 dcb2dae11f4d38106018ceccc63f408b52c5707855cfac48e1eabd1413717afd 1774188 yuzu_0-1734+ds-10.1.debian.tar.xz
 bd28a47a07231b15505d2ed8ee747ae2d425937e35ff340b3e5d6cb77d8d5f37 5896 yuzu_0-1734+ds-10.1_source.buildinfo
Files:
 b5804e40f50aa987d3be73e35e0fa0fe 2505 games optional yuzu_0-1734+ds-10.1.dsc
 838248ed4dca29e80facf6d4fa7681ca 1774188 games optional yuzu_0-1734+ds-10.1.debian.tar.xz
 cbe2b9565719725b1460ff024981bcbe 5896 games optional yuzu_0-1734+ds-10.1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEExq6D0hxncEPaPayX+GQ1dHE8m64FAmrQ+kcACgkQ+GQ1dHE8
m67DLggAzUHj/uJGT0Zlkzr2/YaagXbHpLTf5Fj/JRL7LN1D/IOF+o5KOimH7d0A
niz0uKUIQU7r97OH9wxqmNP/9LgGSIlTCRSnP5JIMwL6fgdRYP/6NonmOXK9T3R1
jScD4l8Y0guxVpZLCZMjBn1cg5aKZk2WoFkm52eJHhAKjTnmw4oxaFOwA2u9L3vY
2Jg/hdK777NQ93m5WIhNcmMOXDQNTstcOmE+rO/fYIOZySNDrxJxMFSYzDyX/QgH
YrHlMKSWWJkjjMU9N+Z56xbQDC5VgHEkI5qX3hjc8nDyQZMQoaOCWy/cc498Z0Hj
i7LakHgbKw3VheWyfRgWUxe5+Bi8Kg==
=mr1W
-----END PGP SIGNATURE-----