Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation of Kodi fails with fmt 6.2.0 #1620

Closed
candrews opened this issue Apr 8, 2020 · 1 comment
Closed

Compilation of Kodi fails with fmt 6.2.0 #1620

candrews opened this issue Apr 8, 2020 · 1 comment

Comments

@candrews
Copy link

candrews commented Apr 8, 2020

Kodi builds fine with fmt 6.1.2, but fails with 6.2.0. Operating under the assumption that 6.2.0 should be backwards compatible with 6.1.2, I believe that there a bug with 6.2.0.

Here's the build failure:

In file included from /var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/utils/StringUtils.h:34,
                 from /var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/addons/addoninfo/AddonExtensions.h:11,
                 from /var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/addons/addoninfo/AddonType.h:11,
                 from /var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/addons/addoninfo/AddonInfo.h:13,
                 from /var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/addons/IAddon.h:11,
                 from /var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/addons/Addon.h:11,
                 from /var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/addons/AddonManager.h:11,
                 from /var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/addons/binary-addons/BinaryAddonManager.h:11,
                 from /var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/addons/binary-addons/AddonDll.h:11,
                 from /var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/addons/binary-addons/AddonInstanceHandler.h:11,
                 from /var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.h:13,
                 from /var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.cpp:9:
/usr/include/fmt/format.h: In instantiation of ‘decltype (ctx.out()) fmt::v6::formatter<T, Char, typename std::enable_if<(fmt::v6::internal::type_constant<T, Char>::value != fmt::v6::internal::type::custom_type), void>::type>::format(cons
t T&, FormatContext&) [with FormatContext = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; T = fmt::v6::basic_string_view<char>; Char = char; typename std::enable_if<(fmt::v6::internal::t
ype_constant<T, Char>::value != fmt::v6::internal::type::custom_type), void>::type = void; decltype (ctx.out()) = std::back_insert_iterator<fmt::v6::internal::buffer<char> >]’:
/usr/include/fmt/ostream.h:113:60:   required from ‘decltype (ctx.out()) fmt::v6::internal::fallback_formatter<T, Char, typename std::enable_if<fmt::v6::internal::is_streamable<T, Char>::value, void>::type>::format(const T&, Context&) [wi
th Context = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; T = unsigned char*; Char = char; typename std::enable_if<fmt::v6::internal::is_streamable<T, Char>::value, void>::type = void; decltype (ctx.out()) = std::back_insert_iterator<fmt::v6::internal::buffer<char> >]’
/usr/include/fmt/core.h:898:5:   required from ‘static void fmt::v6::internal::value<Context>::format_custom_arg(const void*, fmt::v6::basic_format_parse_context<typename Context::char_type>&, Context&) [with T = unsigned char*; Formatter = fmt::v6::internal::fallback_formatter<unsigned char*, char, void>; Context = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; typename Context::char_type = char]’
/usr/include/fmt/core.h:882:19:   required from ‘fmt::v6::internal::value<Context>::value(const T&) [with T = unsigned char*; Context = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>]’
/usr/include/fmt/core.h:1206:14:   required from ‘constexpr fmt::v6::basic_format_arg<Context> fmt::v6::internal::make_arg(const T&) [with Context = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; T = unsigned char*]’
/usr/include/fmt/core.h:1219:27:   required from ‘fmt::v6::basic_format_arg<Context> fmt::v6::internal::make_arg(const T&) [with bool IS_PACKED = false; Context = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; T = unsigned char*; typename std::enable_if<(! IS_PACKED), int>::type <anonymous> = 0]’
/usr/include/fmt/core.h:1349:53:   required from ‘fmt::v6::format_arg_store<Context, Args>::format_arg_store(const Args& ...) [with Context = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; Args = {long int, unsigned int, unsigned int, unsigned int, unsigned int, float, unsigned char*, long unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int}]’
/usr/include/fmt/core.h:1364:18:   required from ‘fmt::v6::format_arg_store<Context, Args ...> fmt::v6::make_format_args(const Args& ...) [with Context = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; Args = {long int, unsigned int, unsigned int, unsigned int, unsigned int, float, unsigned char*, long unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int}]’
/usr/include/fmt/printf.h:625:68:   required from ‘std::__cxx11::basic_string<Char> fmt::v6::sprintf(const S&, const Args& ...) [with S = std::__cxx11::basic_string<char>; Args = {long int, unsigned int, unsigned int, unsigned int, unsigned int, float, unsigned char*, long unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int}; Char = char]’
/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/utils/StringUtils.h:90:30:   required from ‘static std::string StringUtils::Format(const string&, Args&& ...) [with Args = {long int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, float&, unsigned char*&, long unsigned int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&}; std::string = std::__cxx11::basic_string<char>]’
/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/utils/log.h:50:57:   required from ‘static void CLog::Log(int, int, const char*, Args&& ...) [with Args = {long int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, float&, unsigned char*&, long unsigned int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&}]’
/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.cpp:261:187:   required from here
/usr/include/fmt/format.h:3012:29: error: no matching function for call to ‘fmt::v6::arg_formatter<fmt::v6::internal::output_range<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char> >::arg_formatter(fmt::v6::basic_printf_c
ontext<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>&, std::nullptr_t, fmt::v6::internal::dynamic_format_specs<char>*)’
 3012 |     return visit_format_arg(arg_formatter<range_type>(ctx, nullptr, &specs_),
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/fmt/format.h:2764:12: note: candidate: ‘fmt::v6::arg_formatter<Range>::arg_formatter(fmt::v6::arg_formatter<Range>::context_type&, fmt::v6::basic_format_parse_context<typename Range::value_type>*, fmt::v6::arg_formatter<Range
>::format_specs*) [with Range = fmt::v6::internal::output_range<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; fmt::v6::arg_formatter<Range>::context_type = fmt::v6::basic_format_context<std::back_insert_iterator<fmt:
:v6::internal::buffer<char> >, char>; typename Range::value_type = char; typename fmt::v6::internal::arg_formatter_base<Range>::iterator = std::back_insert_iterator<fmt::v6::internal::buffer<char> >; fmt::v6::arg_formatter<Range>::format_
specs = fmt::v6::basic_format_specs<char>]’
 2764 |   explicit arg_formatter(
      |            ^~~~~~~~~~~~~
/usr/include/fmt/format.h:2765:21: note:   no known conversion for argument 1 from ‘fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>’ to ‘fmt::v6::arg_formatter<fmt::v6::internal::output_ran
ge<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char> >::context_type&’ {aka ‘fmt::v6::basic_format_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>&’}
 2765 |       context_type& ctx,
      |       ~~~~~~~~~~~~~~^~~
/usr/include/fmt/format.h:2743:7: note: candidate: ‘constexpr fmt::v6::arg_formatter<fmt::v6::internal::output_range<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char> >::arg_formatter(const fmt::v6::arg_formatter<fmt::v6::internal::output_range<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char> >&)’
 2743 | class arg_formatter : public internal::arg_formatter_base<Range> {
      |       ^~~~~~~~~~~~~
/usr/include/fmt/format.h:2743:7: note:   candidate expects 1 argument, 3 provided
/usr/include/fmt/format.h:2743:7: note: candidate: ‘constexpr fmt::v6::arg_formatter<fmt::v6::internal::output_range<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char> >::arg_formatter(fmt::v6::arg_formatter<fmt::v6::internal::output_range<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char> >&&)’
/usr/include/fmt/format.h:2743:7: note:   candidate expects 1 argument, 3 provided
/usr/include/fmt/format.h: In instantiation of ‘void fmt::v6::internal::handle_dynamic_spec(int&, fmt::v6::internal::arg_ref<typename Context::char_type>, Context&) [with Handler = fmt::v6::internal::width_checker; Context = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; typename Context::char_type = char]’:
/usr/include/fmt/format.h:3005:59:   required from ‘decltype (ctx.out()) fmt::v6::formatter<T, Char, typename std::enable_if<(fmt::v6::internal::type_constant<T, Char>::value != fmt::v6::internal::type::custom_type), void>::type>::format(const T&, FormatContext&) [with FormatContext = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; T = fmt::v6::basic_string_view<char>; Char = char; typename std::enable_if<(fmt::v6::internal::type_constant<T, Char>::value != fmt::v6::internal::type::custom_type), void>::type = void; decltype (ctx.out()) = std::back_insert_iterator<fmt::v6::internal::buffer<char> >]’
/usr/include/fmt/ostream.h:113:60:   required from ‘decltype (ctx.out()) fmt::v6::internal::fallback_formatter<T, Char, typename std::enable_if<fmt::v6::internal::is_streamable<T, Char>::value, void>::type>::format(const T&, Context&) [with Context = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; T = unsigned char*; Char = char; typename std::enable_if<fmt::v6::internal::is_streamable<T, Char>::value, void>::type = void; decltype (ctx.out()) = std::back_insert_iterator<fmt::v6::internal::buffer<char> >]’
/usr/include/fmt/core.h:898:5:   required from ‘static void fmt::v6::internal::value<Context>::format_custom_arg(const void*, fmt::v6::basic_format_parse_context<typename Context::char_type>&, Context&) [with T = unsigned char*; Formatter = fmt::v6::internal::fallback_formatter<unsigned char*, char, void>; Context = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; typename Context::char_type = char]’
/usr/include/fmt/core.h:882:19:   required from ‘fmt::v6::internal::value<Context>::value(const T&) [with T = unsigned char*; Context = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>]’
/usr/include/fmt/core.h:1206:14:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/fmt/core.h:1349:53:   required from ‘fmt::v6::format_arg_store<Context, Args>::format_arg_store(const Args& ...) [with Context = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; Args = {long int, unsigned int, unsigned int, unsigned int, unsigned int, float, unsigned char*, long unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int}]’
/usr/include/fmt/core.h:1364:18:   required from ‘fmt::v6::format_arg_store<Context, Args ...> fmt::v6::make_format_args(const Args& ...) [with Context = fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>; Args = {long int, unsigned int, unsigned int, unsigned int, unsigned int, float, unsigned char*, long unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int}]’
/usr/include/fmt/printf.h:625:68:   required from ‘std::__cxx11::basic_string<Char> fmt::v6::sprintf(const S&, const Args& ...) [with S = std::__cxx11::basic_string<char>; Args = {long int, unsigned int, unsigned int, unsigned int, unsigned int, float, unsigned char*, long unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int}; Char = char]’
/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/utils/StringUtils.h:90:30:   required from ‘static std::string StringUtils::Format(const string&, Args&& ...) [with Args = {long int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, float&, unsigned char*&, long unsigned int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&}; std::string = std::__cxx11::basic_string<char>]’
/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/utils/log.h:50:57:   required from ‘static void CLog::Log(int, int, const char*, Args&& ...) [with Args = {long int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, float&, unsigned char*&, long unsigned int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&}]’
/var/tmp/portage/media-tv/kodi-9999/work/kodi-9999/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.cpp:261:187:   required from here
/usr/include/fmt/format.h:2717:53: error: ‘class fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>’ has no member named ‘error_handler’
 2717 |                                                 ctx.error_handler());
      |                                                 ~~~~^~~~~~~~~~~~~
/usr/include/fmt/format.h:2720:65: error: cannot convert ‘fmt::v6::basic_string_view<char>’ to ‘int’
 2720 |     value = internal::get_dynamic_spec<Handler>(ctx.arg(ref.val.name),
      |                                                         ~~~~~~~~^~~~
      |                                                                 |
      |                                                                 fmt::v6::basic_string_view<char>

Here's the full log:
build.log

I've also reported this issue in Kodi's issue tracker at xbmc/xbmc#17629

@vitaut
Copy link
Contributor

vitaut commented Apr 8, 2020

Fixed in 7d01859. Thanks for reporting!

@vitaut vitaut closed this as completed Apr 8, 2020
gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Apr 8, 2020
See: fmtlib/fmt#1620
Package-Manager: Portage-2.3.97, Repoman-2.3.22
Signed-off-by: Craig Andrews <[email protected]>
nickersk added a commit to oe-alliance/oe-alliance-core that referenced this issue Apr 11, 2020
bmwiedemann added a commit to bmwiedemann/openSUSE that referenced this issue Apr 19, 2020
https://build.opensuse.org/request/show/793945
by user alois + dimstar_suse
- Apply 7d01859ef16e6b65bc023ad8bebfedecb088bf81.patch
  to fix kodi compilation and probably others:
  fmtlib/fmt#1620
algitbot pushed a commit to alpinelinux/aports that referenced this issue Apr 21, 2020
This patch is needed because with fmt 6.2.0 kodi
fails to build.
Ref: fmtlib/fmt#1620
bmwiedemann added a commit to bmwiedemann/openSUSE that referenced this issue Jul 10, 2024
https://build.opensuse.org/request/show/793945
by user alois + dimstar_suse
- Apply 7d01859ef16e6b65bc023ad8bebfedecb088bf81.patch
  to fix kodi compilation and probably others:
  fmtlib/fmt#1620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants