[Slackbuilds-users] coeurl fails to build with new spdlog

Matteo Bernardini matteo.bernardini at gmail.com
Fri Mar 15 14:22:25 UTC 2024


Il giorno ven 15 mar 2024 alle ore 15:09 Vladimir Nikishkin <
for_slackbuilds-users_mlist_2023-04-21 at lockywolf.net> ha scritto:

> Hello, everyone.
>
> spdlog has been recently updated, and now my coeurl build fails to build
>
> Does anybody know how to overcome this?
>
> [1/2] ccache c++ -Ilibcoeurl.so.0.3.p -I. -I.. -I../include
> -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
> -Wnon-virtual-dtor -Wextra -Wpedantic -std=c++17 -g -fPIC -pthread
> -DSPDLOG_SHARED_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -MD -MQ
> libcoeurl.so.0.3.p/lib_client.cpp.o -MF
> libcoeurl.so.0.3.p/lib_client.cpp.o.d -o
> libcoeurl.so.0.3.p/lib_client.cpp.o -c ../lib/client.cpp
> FAILED: libcoeurl.so.0.3.p/lib_client.cpp.o
> ccache c++ -Ilibcoeurl.so.0.3.p -I. -I.. -I../include
> -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
> -Wnon-virtual-dtor -Wextra -Wpedantic -std=c++17 -g -fPIC -pthread
> -DSPDLOG_SHARED_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -MD -MQ
> libcoeurl.so.0.3.p/lib_client.cpp.o -MF
> libcoeurl.so.0.3.p/lib_client.cpp.o.d -o
> libcoeurl.so.0.3.p/lib_client.cpp.o -c ../lib/client.cpp
> In file included from /usr/include/fmt/format.h:49,
>                  from /usr/include/fmt/ostream.h:21,
>                  from /usr/include/spdlog/fmt/ostr.h:20,
>                  from ../lib/client.cpp:1:
> /usr/include/fmt/core.h: In instantiation of ‘constexpr
> fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&) [with bool
> PACKED = true; Context = fmt::v10::basic_format_context<fmt::v10::appender,
> char>; T = CURLcode; typename std::enable_if<PACKED, int>::type <anonymous>
> = 0]’:
> /usr/include/fmt/core.h:1842:51:   required from ‘constexpr
> fmt::v10::format_arg_store<Context, Args>::format_arg_store(T& ...) [with T
> = {std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >, CURLcode, char [256], long int}; Context =
> fmt::v10::basic_format_context<fmt::v10::appender, char>; Args =
> {std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >, CURLcode, char [256], long int}]’
> /usr/include/fmt/core.h:1860:18:   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 = fmt::v10::basic_format_context<fmt::v10::appender,
> char>; T = {std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >, CURLcode, char [256], long int}]’
> /usr/include/spdlog/logger.h:374:75:   required from ‘void
> spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum,
> spdlog::string_view_t, Args&& ...) [with Args =
> {std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >&, CURLcode&, char (&)[256], long int&};
> spdlog::string_view_t = fmt::v10::basic_string_view<char>]’
> /usr/include/spdlog/logger.h:90:13:   required from ‘void
> spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum,
> fmt::v10::format_string<T ...>, Args&& ...) [with Args =
> {std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >&, CURLcode&, char (&)[256], long int&};
> fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char,
> std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >&, CURLcode&, char (&)[256], long int&>]’
> /usr/include/spdlog/logger.h:96:12:   required from ‘void
> spdlog::logger::log(spdlog::level::level_enum, fmt::v10::format_string<T
> ...>, Args&& ...) [with Args = {std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> >&, CURLcode&, char (&)[256],
> long int&}; fmt::v10::format_string<T ...> =
> fmt::v10::basic_format_string<char, std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> >&, CURLcode&, char (&)[256],
> long int&>]’
> /usr/include/spdlog/logger.h:146:12:   required from ‘void
> spdlog::logger::trace(fmt::v10::format_string<T ...>, Args&& ...) [with
> Args = {std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >&, CURLcode&, char (&)[256], long int&};
> fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char,
> std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >&, CURLcode&, char (&)[256], long int&>]’
> ../lib/client.cpp:358:27:   required from here
> /usr/include/fmt/core.h:1600:63: error:
> ‘fmt::v10::detail::type_is_unformattable_for<CURLcode, char> _’ has
> incomplete type
>  1600 |     type_is_unformattable_for<T, typename Context::char_type> _;
>       |                                                               ^
> /usr/include/fmt/core.h:1604: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
>  1604 |       formattable,
>       |       ^~~~~~~~~~~
> /usr/include/fmt/core.h:1604:7: note: ‘formattable’ evaluates to false
> ninja: build stopped: subcommand failed.
>
> --
> Your sincerely,
> Vladimir Nikishkin (MiEr, lockywolf)
> (Laptop)
>
>
Hi Vladimir,

that happens because spdlog has been build against fmt >= 10.x: I found
this patch in the archlinux repo that let coeurl build also in this
situation

https://nheko.im/nheko-reborn/coeurl/-/commit/831e2ee8e9cf08ea1ee9736cde8370f9d0312abc.patch

Matteo

P.S. please use sane email addresses when you write to the mailing list,
thanks in advance! ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20240315/823d70c9/attachment.htm>


More information about the SlackBuilds-users mailing list