Incompatible with fmt >= 10
Hi! We're currently attempting rebuilds against fmt 10 on Arch Linux (https://archlinux.org/todo/fmt-1000/).
Unfortunately, jami-daemon is not yet compatible and building it I run into:
[22/157] Compiling C++ object src/libjami.so.13.7.0.p/connectivity_security_tls_session.cpp.o
FAILED: src/libjami.so.13.7.0.p/connectivity_security_tls_session.cpp.o
c++ -Isrc/libjami.so.13.7.0.p -Isrc -I../jami-daemon/src -I. -I../jami-daemon -I../jami-daemon/src/jami -I../jami-daemon/src/media -I../jami-daemon/src/jamidht/eth -I/usr/include/p11-kit-1 -I/build/jami-daemon/src/jami-daemon/contrib/x86_64-pc-linux-gnu/include -I/usr/include/upnp -I/usr/include/webrtc_audio_processin
g -flto=auto -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu++17 -DHAVE_CONFIG_H -DLIBJAMI_BUILD -Djami_EXPORTS -DASIO_STANDALONE -DMSGPACK_NO_BOOST -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protect
ion -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/jami-daemon/src=/usr/src/debug/jami-daemon -flto=auto -fpermissive -fPIC -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DWEBRTC_POSIX -D_REENTRANT -DPJ_AUTOCONF=1 -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1 -pthread -MD -MQ src/libjami.so.13.7.0.p/conne
ctivity_security_tls_session.cpp.o -MF src/libjami.so.13.7.0.p/connectivity_security_tls_session.cpp.o.d -o src/libjami.so.13.7.0.p/connectivity_security_tls_session.cpp.o -c ../jami-daemon/src/connectivity/security/tls_session.cpp
In file included from ../jami-daemon/src/manager.h:38,
from ../jami-daemon/src/connectivity/security/tls_session.cpp:32:
../jami-daemon/src/scheduled_executor.h:108: warning: ignoring ‘#pragma GCC pop’ [-Wunknown-pragmas]
108 | #pragma GCC pop
|
../jami-daemon/src/scheduled_executor.h:158: warning: ignoring ‘#pragma GCC pop’ [-Wunknown-pragmas]
158 | #pragma GCC pop
|
In file included from ../jami-daemon/src/logger.h:27,
from ../jami-daemon/src/connectivity/security/tls_session.cpp:29:
/usr/include/fmt/core.h: In instantiation of ‘constexpr decltype (ctx.begin()) fmt::v10::detail::parse_format_specs(ParseContext&) [with T = gnutls_credentials_type_t; ParseContext = compile_parse_context<char>; decltype (ctx.begin()) = const char*]’:
/usr/include/fmt/core.h:2620:22: required from ‘constexpr fmt::v10::detail::format_string_checker<Char, Args>::format_string_checker(fmt::v10::basic_string_view<Char>) [with Char = char; Args = {gnutls_credentials_type_t}]’
/usr/include/fmt/core.h:2670:56: required from ‘void fmt::v10::detail::check_format_string(S) [with Args = {gnutls_credentials_type_t&}; S = jami::tls::TlsSession::TlsSessionImpl::handleStateHandshake(jami::tls::TlsSessionState)::<lambda()>::FMT_COMPILE_STRING; typename std::enable_if<is_compile_string<S>::value, in
t>::type <anonymous> = 0]’
/usr/include/fmt/core.h:2772:41: required from ‘fmt::v10::basic_format_string<Char, Args>::basic_format_string(const S&) [with S = jami::tls::TlsSession::TlsSessionImpl::handleStateHandshake(jami::tls::TlsSessionState)::<lambda()>::FMT_COMPILE_STRING; typename std::enable_if<std::is_convertible<const S&, fmt::v10::b
asic_string_view<Char> >::value, int>::type <anonymous> = 0; Char = char; Args = {gnutls_credentials_type_t&}]’
../jami-daemon/src/logger.h:173:51: required from ‘void jami::log::error(const char*, int, S&&, Args&& ...) [with S = jami::tls::TlsSession::TlsSessionImpl::handleStateHandshake(jami::tls::TlsSessionState)::<lambda()>::FMT_COMPILE_STRING; Args = {gnutls_credentials_type_t&}]’
../jami-daemon/src/connectivity/security/tls_session.cpp:1226:9: required from here
/usr/include/fmt/core.h:2561:10: error: use of deleted function ‘fmt::v10::formatter<T, Char, Enable>::formatter() [with T = gnutls_credentials_type_t; Char = char; Enable = void]’
2561 | return formatter<mapped_type, char_type>().parse(ctx);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/fmt/core.h:792:3: note: declared here
792 | formatter() = delete;
| ^~~~~~~~~
/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 = gnutls_credentials_type_t&]’:
/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 = gnutls_credentials_type_t&; 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 = {gnutls_credentials_type_t&}; Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; Args = {gnutls_credentials_type_t}]’
/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 = {gnutls_credentials_type_t&}]’
/usr/include/fmt/core.h:2817:44: required from ‘std::string fmt::v10::format(format_string<T ...>, T&& ...) [with T = {gnutls_credentials_type_t&}; std::string = std::__cxx11::basic_string<char>; format_string<T ...> = basic_format_string<char, gnutls_credentials_type_t&>]’
../jami-daemon/src/logger.h:173:51: required from ‘void jami::log::error(const char*, int, S&&, Args&& ...) [with S = jami::tls::TlsSession::TlsSessionImpl::handleStateHandshake(jami::tls::TlsSessionState)::<lambda()>::FMT_COMPILE_STRING; Args = {gnutls_credentials_type_t&}]’
../jami-daemon/src/connectivity/security/tls_session.cpp:1226:9: 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
An update to current fmt would be much appreciated. Thanks!