Bug 2218180 - dnf5-5.0.14-2.fc39 FTBFS with fmt-10: /usr/include/fmt/core.h:1691:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization
Summary: dnf5-5.0.14-2.fc39 FTBFS with fmt-10: /usr/include/fmt/core.h:1691:7: error: ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jan Kolarik
QA Contact:
URL: https://koji.fedoraproject.org/koji/b...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-28 11:25 UTC by Petr Pisar
Modified: 2023-06-28 17:59 UTC (History)
5 users (show)

Fixed In Version: dnf5-5.0.14-2.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-28 17:59:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2023-06-28 11:25:31 UTC
dnf5-5.0.14-2.fc39 fails to build after upgrading fmt from 9.1.0-2.fc38 to 10.0.0-1.fc39:

[ 13%] Building CXX object libdnf/CMakeFiles/libdnf.dir/base/transaction.cpp.o
cd /builddir/build/BUILD/dnf5-5.0.14/redhat-linux-build/libdnf && /usr/bin/g++ -DGETTEXT_DOMAIN=\"libdnf5\" -DLIBSOLV_SOLVABLE_PREPEND_DEP -DPROJECT_BINARY_DIR=\"/builddir/build/BUILD/dnf5-5.0.14/redhat-linux-build\" -DPROJECT_SOURCE_DIR=\"/builddir/build/BUILD/dnf5-5.0.14\" -DPROJECT_VERSION_MAJOR=5 -DPROJECT_VERSION_MINOR=0 -DPROJECT_VERSION_PATCH=14 -DWITH_ZCHUNK -Dlibdnf_EXPORTS -I/builddir/build/BUILD/dnf5-5.0.14/include -I/builddir/build/BUILD/dnf5-5.0.14/common -I/builddir/build/BUILD/dnf5-5.0.14/libdnf/. -I/usr/include/json-c -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -std=gnu++20 -fPIC -fmacro-prefix-map=/builddir/build/BUILD/dnf5-5.0.14/= -Wall -Wextra -Werror -Wcast-align -Wformat-nonliteral -Wmissing-format-attribute -Wredundant-decls -Wsign-compare -Wtype-limits -Wuninitialized -Wwrite-strings -Werror=unused-result -Wodr -Wconversion -Wl,--as-needed -MD -MT libdnf/CMakeFiles/libdnf.dir/base/transaction.cpp.o -MF CMakeFiles/libdnf.dir/base/transaction.cpp.o.d -o CMakeFiles/libdnf.dir/base/transaction.cpp.o -c /builddir/build/BUILD/dnf5-5.0.14/libdnf/base/transaction.cpp
[...]
In file included from /usr/include/fmt/format.h:49,
                 from /builddir/build/BUILD/dnf5-5.0.14/include/libdnf/utils/format.hpp:23,
                 from /builddir/build/BUILD/dnf5-5.0.14/include/libdnf/common/exception.hpp:25,
                 from /builddir/build/BUILD/dnf5-5.0.14/include/libdnf/common/weak_ptr.hpp:23,
                 from /builddir/build/BUILD/dnf5-5.0.14/include/libdnf/base/base_weak.hpp:23,
                 from /builddir/build/BUILD/dnf5-5.0.14/include/libdnf/base/base.hpp:23,
                 from /builddir/build/BUILD/dnf5-5.0.14/libdnf/rpm/rpm_log_guard.hpp:23,
                 from /builddir/build/BUILD/dnf5-5.0.14/libdnf/rpm/transaction.hpp:24,
                 from /builddir/build/BUILD/dnf5-5.0.14/libdnf/rpm/transaction.cpp:21:
/usr/include/fmt/core.h: In instantiation of 'constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_value(T&&) [with Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; T = const rpmCallbackType_e&]':
/usr/include/fmt/core.h:1711:29:   required from 'constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&&) [with bool IS_PACKED = true; Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; type <anonymous> = fmt::v10::detail::type::custom_type; T = const rpmCallbackType_e&; typename std::enable_if<IS_PACKED, int>::type <anonymous> = 0]'
/usr/include/fmt/core.h:1827:77:   required from 'constexpr fmt::v10::format_arg_store<Context, Args>::format_arg_store(T&& ...) [with T = {const rpmCallbackType_e&}; Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; Args = {rpmCallbackType_e}]'
/usr/include/fmt/core.h:1844:31:   required from 'constexpr fmt::v10::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<T>::type>::type ...> fmt::v10::make_format_args(T&& ...) [with Context = basic_format_context<appender, char>; T = {const rpmCallbackType_e&}]'
/builddir/build/BUILD/dnf5-5.0.14/include/libdnf/utils/format.hpp:33:69:   required from 'std::string libdnf::utils::sformat(std::string_view, Args&& ...) [with Args = {const rpmCallbackType_e&}; std::string = std::__cxx11::basic_string<char>; std::string_view = std::basic_string_view<char>]'
/builddir/build/BUILD/dnf5-5.0.14/include/libdnf/logger/logger.hpp:89:47:   required from 'void libdnf::Logger::log(Level, std::string_view, Ss&& ...) [with Ss = {const rpmCallbackType_e&}; std::string_view = std::basic_string_view<char>]'
/builddir/build/BUILD/dnf5-5.0.14/include/libdnf/logger/logger.hpp:64:12:   required from 'void libdnf::Logger::warning(std::string_view, Ss&& ...) [with Ss = {const rpmCallbackType_e&}; std::string_view = std::basic_string_view<char>]'
/builddir/build/BUILD/dnf5-5.0.14/libdnf/rpm/transaction.cpp:665:27:   required from here
/usr/include/fmt/core.h:1691:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
 1691 |       formattable,
      |       ^~~~~~~~~~~
/usr/include/fmt/core.h:1691:7: note: 'formattable' evaluates to false
gmake[2]: *** [libdnf/CMakeFiles/libdnf.dir/build.make:1255: libdnf/CMakeFiles/libdnf.dir/rpm/transaction.cpp.o] Error 1

A fmt maintainers attemps to rebase fmt to an incompatible version in a side tag <https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/TWBPTZ67RSH7L2OSLFIWWOKFKH2U6LQX/>.

Reproducible: Always

Comment 1 Jan Kolarik 2023-06-28 11:49:22 UTC
Also tracked in a upstream issue here: https://github.com/rpm-software-management/dnf5/issues/675.

Comment 2 Jan Kolarik 2023-06-28 11:52:03 UTC
I've created a pull request to fix this: https://github.com/rpm-software-management/dnf5/pull/677.

Comment 3 Vitaly 2023-06-28 12:03:24 UTC
Great. Please build dnf5 package in a f39-build-side-69394 side tag.

Comment 4 Vitaly 2023-06-28 17:59:11 UTC
Backported patch and built in a side tag as dnf5-5.0.14-2.fc39.


Note You need to log in before you can comment on or make changes to this bug.