snes9xgit / snes9x

Snes9x - Portable Super Nintendo Entertainment System (TM) emulator
http://www.snes9x.com
Other
2.66k stars 460 forks source link

Trying to compile for Linux GTK and QT gives error #961

Open Link4Electronics opened 1 day ago

Link4Electronics commented 1 day ago

Hello,

I'm trying to compile the code on Linux PowerPC Big Endian, but it's giving me errors when it reaches the time to compile fmt

snes9x-qt

/snes9x/qt/../external/fmt/include/fmt/format-inl.h: In instantiation of ‘int fmt::v8::detail::format_float(T, int, float_specs, buffer<char>&) [with T = long double]’:
/snes9x/external/fmt/src/format.cc:92:64:   required from here
   92 |                                           detail::buffer<char>&);
      |                                                                ^
/snes9x/qt/../external/fmt/include/fmt/format-inl.h:2216:20: error: invalid use of incomplete type ‘struct fmt::v8::detail::dragonbox::float_info<long double, void>’
 2216 |     const auto f = basic_fp<typename info::carrier_uint>(converted_value);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /snes9x/qt/../external/fmt/include/fmt/format-inl.h:29:
/snes9x/qt/../external/fmt/include/fmt/format.h:1267:54: note: declaration of ‘struct fmt::v8::detail::dragonbox::float_info<long double, void>’
 1267 | template <typename T, typename Enable = void> struct float_info;
      |                                                      ^~~~~~~~~~

snes9x-gtk

                 from /snes9x/gtk/../external/fmt/include/fmt/format-inl.h:29,
                 from /snes9x/external/fmt/src/format.cc:8:
/snes9x/gtk/../external/fmt/include/fmt/core.h: In instantiation of ‘constexpr fmt::v8::detail::value<Context> fmt::v8::detail::make_value(T&&) [with Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; T = fmt::v8::basic_string_view<char>&]’:
/snes9x/gtk/../external/fmt/include/fmt/core.h:1745:29:   required from ‘constexpr fmt::v8::detail::value<Context> fmt::v8::detail::make_arg(T&&) [with bool IS_PACKED = true; Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; type <anonymous> = fmt::v8::detail::type::string_type; T = fmt::v8::basic_string_view<char>&; typename std::enable_if<IS_PACKED, int>::type <anonymous> = 0]’
 1745 |   return make_value<Context>(val);
      |          ~~~~~~~~~~~~~~~~~~~^~~~~
/snes9x/gtk/../external/fmt/include/fmt/core.h:1869:77:   required from ‘constexpr fmt::v8::format_arg_store<Context, Args>::format_arg_store(T&& ...) [with T = {fmt::v8::basic_string_view<char>&, const char (&)[3]}; Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; Args = {fmt::v8::basic_string_view<char>, char [3]}]’
 1867 |         data_{detail::make_arg<
      |               ~~~~~~~~~~~~~~~~~
 1868 |             is_packed, Context,
      |             ~~~~~~~~~~~~~~~~~~~
 1869 |             detail::mapped_type_constant<remove_cvref_t<T>, Context>::value>(
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 1870 |             std::forward<T>(args))...} {
      |             ~~~~~~~~~~~~~~~~~~~~~~
/snes9x/gtk/../external/fmt/include/fmt/core.h:1886:38:   required from ‘OutputIt fmt::v8::format_to(OutputIt, format_string<T ...>, T&& ...) [with OutputIt = appender; T = {basic_string_view<char>&, const char (&)[3]}; typename std::enable_if<detail::is_output_iterator<OutputIt, char>::value, int>::type <anonymous> = 0; format_string<T ...> = basic_format_string<char, basic_string_view<char>&, const char (&)[3]>]’
 1886 |   return {std::forward<Args>(args)...};
      |                                      ^
/snes9x/gtk/../external/fmt/include/fmt/format-inl.h:65:14:   required from here
   65 |     format_to(it, FMT_STRING("{}{}"), message, SEP);
      |     ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/snes9x/gtk/../external/fmt/include/fmt/core.h:3197:52:   in ‘constexpr’ expansion of ‘fmt::v8::make_format_args<>(args#0, args#1)’
/snes9x/gtk/../external/fmt/include/fmt/core.h:1703:15: warning: possibly dangling reference to a temporary [-Wdangling-reference]
 1703 |   const auto& arg = arg_mapper<Context>().map(std::forward<T>(val));
      |               ^~~
/snes9x/gtk/../external/fmt/include/fmt/core.h:1703:46: note: the temporary was destroyed at the end of the full expression ‘fmt::v8::detail::arg_mapper<fmt::v8::basic_format_context<fmt::v8::appender, char> >().fmt::v8::detail::arg_mapper<fmt::v8::basic_format_context<fmt::v8::appender, char> >::map<fmt::v8::basic_string_view<char> >((*(const fmt::v8::basic_string_view<char>*)(& std::forward<fmt::v8::basic_string_view<char>&>((* & val)))))’
 1703 |   const auto& arg = arg_mapper<Context>().map(std::forward<T>(val));
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/snes9x/gtk/../external/fmt/include/fmt/format-inl.h: In instantiation of ‘int fmt::v8::detail::format_float(T, int, float_specs, buffer<char>&) [with T = long double]’:
/snes9x/external/fmt/src/format.cc:92:64:   required from here
   92 |                                           detail::buffer<char>&);
      |                                                                ^
/snes9x/gtk/../external/fmt/include/fmt/format-inl.h:2216:20: error: invalid use of incomplete type ‘struct fmt::v8::detail::dragonbox::float_info<long double, void>’
 2216 |     const auto f = basic_fp<typename info::carrier_uint>(converted_value);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/snes9x/gtk/../external/fmt/include/fmt/format.h:1267:54: note: declaration of ‘struct fmt::v8::detail::dragonbox::float_info<long double, void>’
 1267 | template <typename T, typename Enable = void> struct float_info;
      |                                                      ^~~~~~~~~~

Best regards, Link.

bearoso commented 15 hours ago

I've noticed this with C++20 and above. I just need to update to the latest fmtlib.