librtcdcpp
librtcdcpp copied to clipboard
Build breaks with fmt-9.1.0: static_assert failed due to requirement 'formattable' "Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt"
In file included from /wrkdirs/usr/ports/www/librtcdcpp/work/librtcdcpp-2fe92c38b48b6acf1217a8a812c2408310dec437/src/NiceWrapper.cpp:32:
In file included from /wrkdirs/usr/ports/www/librtcdcpp/work/librtcdcpp-2fe92c38b48b6acf1217a8a812c2408310dec437/include/rtcdcpp/NiceWrapper.hpp:35:
In file included from /wrkdirs/usr/ports/www/librtcdcpp/work/librtcdcpp-2fe92c38b48b6acf1217a8a812c2408310dec437/include/rtcdcpp/PeerConnection.hpp:33:
In file included from /wrkdirs/usr/ports/www/librtcdcpp/work/librtcdcpp-2fe92c38b48b6acf1217a8a812c2408310dec437/include/rtcdcpp/Logging.hpp:33:
In file included from /usr/local/include/spdlog/spdlog.h:12:
In file included from /usr/local/include/spdlog/common.h:45:
In file included from /usr/local/include/spdlog/fmt/fmt.h:31:
/usr/local/include/fmt/core.h:1756:3: error: static_assert failed due to requirement 'formattable' "Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt"
static_assert(
^
/usr/local/include/fmt/core.h:1777:10: note: in instantiation of function template specialization 'fmt::detail::make_value<fmt::basic_format_context<fmt::appender, char>, rtcdcpp::RTCIceServer &>' requested here
return make_value<Context>(val);
^
/usr/local/include/fmt/core.h:1899:23: note: in instantiation of function template specialization 'fmt::detail::make_arg<true, fmt::basic_format_context<fmt::appender, char>, fmt::detail::type::custom_type, rtcdcpp::RTCIceServer &, 0>' requested here
data_{detail::make_arg<
^
/usr/local/include/fmt/core.h:1918:10: note: in instantiation of function template specialization 'fmt::format_arg_store<fmt::basic_format_context<fmt::appender, char>, rtcdcpp::RTCIceServer>::format_arg_store<rtcdcpp::RTCIceServer &>' requested here
return {FMT_FORWARD(args)...};
^
/usr/local/include/spdlog/logger.h:374:59: note: in instantiation of function template specialization 'fmt::make_format_args<fmt::basic_format_context<fmt::appender, char>, rtcdcpp::RTCIceServer &>' requested here
fmt::vformat_to(fmt::appender(buf), fmt, fmt::make_format_args(std::forward<Args>(args)...));
^
/usr/local/include/spdlog/logger.h:90:9: note: in instantiation of function template specialization 'spdlog::logger::log_<rtcdcpp::RTCIceServer &>' requested here
log_(loc, lvl, fmt, std::forward<Args>(args)...);
^
/usr/local/include/spdlog/logger.h:96:9: note: in instantiation of function template specialization 'spdlog::logger::log<rtcdcpp::RTCIceServer &>' requested here
log(source_loc{}, lvl, fmt, std::forward<Args>(args)...);
^
/usr/local/include/spdlog/logger.h:164:9: note: in instantiation of function template specialization 'spdlog::logger::log<rtcdcpp::RTCIceServer &>' requested here
log(level::warn, fmt, std::forward<Args>(args)...);
^
/wrkdirs/usr/ports/www/librtcdcpp/work/librtcdcpp-2fe92c38b48b6acf1217a8a812c2408310dec437/src/NiceWrapper.cpp:174:15: note: in instantiation of function template specialization 'spdlog::logger::warn<rtcdcpp::RTCIceServer &>' requested here
logger->warn("Failed to lookup host for server: {}", ice_server);
^
FreeBSD 13.1
i'm also encountered this issue:
[ 7%] Building CXX object CMakeFiles/rtcdcpp.dir/src/DataChannel.cpp.o [ 15%] Building CXX object CMakeFiles/rtcdcpp.dir/src/DTLSWrapper.cpp.o /Users/johnny/GithubRepo/librtcdcpp/src/DTLSWrapper.cpp:119:58: warning: 'EC_KEY_new_by_curve_name' is deprecated [-Wdeprecated-declarations] std::shared_ptr<EC_KEY> ecdh = std::shared_ptr<EC_KEY>(EC_KEY_new_by_curve_name(NID_X9_62_prime256v1), EC_KEY_free); ^ /usr/local/include/openssl/ec.h:1017:1: note: 'EC_KEY_new_by_curve_name' has been explicitly marked deprecated here OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid); ^ /usr/local/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
^
/usr/local/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
define OSSL_DEPRECATED(since) attribute((deprecated))
^
/Users/johnny/GithubRepo/librtcdcpp/src/DTLSWrapper.cpp:119:106: warning: 'EC_KEY_free' is deprecated [-Wdeprecated-declarations] std::shared_ptr<EC_KEY> ecdh = std::shared_ptr<EC_KEY>(EC_KEY_new_by_curve_name(NID_X9_62_prime256v1), EC_KEY_free); ^ /usr/local/include/openssl/ec.h:1022:1: note: 'EC_KEY_free' has been explicitly marked deprecated here OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key); ^ /usr/local/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
^
/usr/local/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
define OSSL_DEPRECATED(since) attribute((deprecated))
^
2 warnings generated. [ 23%] Building CXX object CMakeFiles/rtcdcpp.dir/src/Logging.cpp.o [ 30%] Building CXX object CMakeFiles/rtcdcpp.dir/src/NiceWrapper.cpp.o In file included from /Users/johnny/GithubRepo/librtcdcpp/src/NiceWrapper.cpp:32: In file included from /Users/johnny/GithubRepo/librtcdcpp/include/rtcdcpp/NiceWrapper.hpp:35: In file included from /Users/johnny/GithubRepo/librtcdcpp/include/rtcdcpp/PeerConnection.hpp:33: In file included from /Users/johnny/GithubRepo/librtcdcpp/include/rtcdcpp/Logging.hpp:33: In file included from /usr/local/include/spdlog/spdlog.h:12: In file included from /usr/local/include/spdlog/common.h:50: In file included from /usr/local/include/spdlog/fmt/fmt.h:32: /usr/local/include/fmt/core.h:1603:3: error: static_assert failed due to requirement 'formattable' "Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt" static_assert( ^ /usr/local/include/fmt/core.h:1842:23: note: in instantiation of function template specialization 'fmt::detail::make_arg<true, fmt::basic_format_context<fmt::appender, char>, rtcdcpp::RTCIceServer, 0>' requested here data_{detail::make_arg<is_packed, Context>(args)...} { ^ /usr/local/include/fmt/core.h:1860:10: note: in instantiation of function template specialization 'fmt::format_arg_store<fmt::basic_format_context<fmt::appender, char>, rtcdcpp::RTCIceServer>::format_arg_storertcdcpp::RTCIceServer' requested here return {args...}; ^ /usr/local/include/spdlog/logger.h:328:59: note: in instantiation of function template specialization 'fmt::make_format_args<fmt::basic_format_context<fmt::appender, char>, rtcdcpp::RTCIceServer>' requested here fmt::vformat_to(fmt::appender(buf), fmt, fmt::make_format_args(args...)); ^ /usr/local/include/spdlog/logger.h:80:9: note: in instantiation of function template specialization 'spdlog::logger::log_<rtcdcpp::RTCIceServer &>' requested here log_(loc, lvl, details::to_string_view(fmt), std::forward<Args>(args)...); ^ /usr/local/include/spdlog/logger.h:85:9: note: in instantiation of function template specialization 'spdlog::logger::log<rtcdcpp::RTCIceServer &>' requested here log(source_loc{}, lvl, fmt, std::forward<Args>(args)...); ^ /usr/local/include/spdlog/logger.h:145:9: note: in instantiation of function template specialization 'spdlog::logger::log<rtcdcpp::RTCIceServer &>' requested here log(level::warn, fmt, std::forward<Args>(args)...); ^ /Users/johnny/GithubRepo/librtcdcpp/src/NiceWrapper.cpp:174:15: note: in instantiation of function template specialization 'spdlog::logger::warn<rtcdcpp::RTCIceServer &>' requested here logger->warn("Failed to lookup host for server: {}", ice_server); ^ 1 error generated. make[2]: *** [CMakeFiles/rtcdcpp.dir/src/NiceWrapper.cpp.o] Error 1 make[1]: *** [CMakeFiles/rtcdcpp.dir/all] Error 2 make: *** [all] Error 2
If you have a fix, please tell me .