Actions
Bug #53820
closedFail to build with fmt 8.1.x
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
fmt 8.1.0 adds more formatting checks at compile time.
In file included from /usr/include/fmt/format.h:48, from /usr/include/fmt/ostream.h:13, from /<<PKGBUILDDIR>>/src/seastar/include/seastar/core/print.hh:24, from /<<PKGBUILDDIR>>/src/seastar/include/seastar/util/backtrace.hh:30, from /<<PKGBUILDDIR>>/src/seastar/include/seastar/core/task.hh:26, from /<<PKGBUILDDIR>>/src/seastar/include/seastar/core/future.hh:24, from /<<PKGBUILDDIR>>/src/seastar/include/seastar/core/timer.hh:28, from /<<PKGBUILDDIR>>/src/seastar/include/seastar/core/lowres_clock.hh:25, from /<<PKGBUILDDIR>>/src/seastar/include/seastar/util/log.hh:26, from /<<PKGBUILDDIR>>/src/crimson/common/log.h:6, from /<<PKGBUILDDIR>>/src/crimson/os/seastore/segment_manager/block.cc:7: /usr/include/fmt/core.h: In instantiation of ‘constexpr fmt::v8::detail::value<Context> fmt::v8::detail::make_arg(T&&) [with bool IS_PACKED = true; Context = fmt::v8::basi c_format_context<fmt::v8::appender, char>; fmt::v8::detail::type <anonymous> = fmt::v8::detail::type::custom_type; T = crimson::os::seastore::Segment::segment_state_t&; ty pename std::enable_if<IS_PACKED, int>::type <anonymous> = 0]’: /usr/include/fmt/core.h:1855:77: required from ‘constexpr fmt::v8::format_arg_store<Context, Args>::format_arg_store(T&& ...) [with T = {unsigned int&, crimson::os::seas tore::Segment::segment_state_t&}; Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; Args = {unsigned int, crimson::os::seastore::Segment::segment_state_t}] ’ /usr/include/fmt/core.h:1872:38: required from ‘constexpr fmt::v8::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<_Variants>::type>::ty pe ...> fmt::v8::make_format_args(Args&& ...) [with Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; Args = {unsigned int&, crimson::os::seastore::Segment ::segment_state_t&}]’ /usr/include/fmt/core.h:3148:52: required from ‘OutputIt fmt::v8::format_to(OutputIt, fmt::v8::format_string<T ...>, T&& ...) [with OutputIt = seastar::internal::log_buf ::inserter_iterator; T = {unsigned int&, crimson::os::seastore::Segment::segment_state_t}; typename std::enable_if<fmt::v8::detail::is_output_iterator<OutputIt, char>::value, int>::type <anonymous> = 0; fmt::v8::format_string<T ...> = fmt::v8::basic_format_string<char, unsigned int&, crimson::os::seastore::Segment::segment_state_t>]’ /<<PKGBUILDDIR>>/src/seastar/include/seastar/util/log.hh:180:42: required from ‘void seastar::logger::log(seastar::log_level, const char*, Args&& ...) [with Args = {unsigned int&, crimson::os::seastore::Segment::segment_state_t}]’ /<<PKGBUILDDIR>>/src/seastar/include/seastar/util/log.hh:271:12: required from ‘void seastar::logger::error(const char*, Args&& ...) [with Args = {unsigned int&, crimson::os::seastore::Segment::segment_state_t}]’ /<<PKGBUILDDIR>>/src/crimson/os/seastore/segment_manager/block.cc:328:19: required from here /usr/include/fmt/core.h:1728: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 1728 | formattable, | ^~~~~~~~~~~ /usr/include/fmt/core.h:1728:7: note: ‘formattable’ evaluates to false
I'm building with 16.2.7, so the error code is at https://github.com/ceph/ceph/blob/v16.2.7/src/crimson/os/seastore/segment_manager/block.cc#L328
It looks like segment_state_t can't be formatted directly now.
Updated by Thomas Goirand over 2 years ago
Hi,
FYI, Shengjing posted a patch in the Debian bug tracker for this bug:
https://bugs.debian.org/1003469
I've added the patch in the Debian package, and I'm rebuilding Ceph with it. So far so good...
Cheers,
Thomas Goirand (zigo)
Updated by Matan Breizman 3 months ago
- Status changed from New to Closed
Feel free to re-open if relevant
Actions