8000 Build error with libfmt 11: `error: passing 'const fmt::v11::formatter<Snowflake>' as 'this' argument discards qualifiers [-fpermissive]` · Issue #360 · uowuo/abaddon · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Build error with libfmt 11: error: passing 'const fmt::v11::formatter<Snowflake>' as 'this' argument discards qualifiers [-fpermissive] #360

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

Open
barracuda156 opened this issue May 14, 2025 · 0 comments

Comments

@barracuda156
Copy link
Contributor

Build error with libfmt11:

[ 10%] Building CXX object CMakeFiles/abaddon.dir/src/components/channellist/channellisttree.cpp.o
/opt/local/bin/g++-mp-14 -DABADDON_IS_BIG_ENDIAN -DENABLE_NOTIFICATION_SOUNDS -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -DWITH_LIBHANDY -DWITH_MINIAUDIO -DWITH_RNNOISE -DWITH_VOICE -I/opt/local/var/macports/build/_opt_local_ppcports_net_abaddon/abaddon/work/abaddon-0.2.1/src -I/opt/local/var/macports/build/_opt_local_ppcports_net_abaddon/abaddon/work/build -I/opt/local/include/gtkmm-3.0 -I/opt/local/lib/gtkmm-3.0/include -I/opt/local/include/gdkmm-3.0 -I/opt/local/lib/gdkmm-3.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/glibmm-2.4 -I/opt/local/lib/glibmm-2.4/include -I/opt/local/include/giomm-2.4 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/lib/giomm-2.4/include -I/opt/local/include/pangomm-1.4 -I/opt/local/lib/pangomm-1.4/include -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/cairo -I/opt/local/include/freetype2 -I/opt/local/include/cairomm-1.0 -I/opt/local/lib/cairomm-1.0/include -I/opt/local/include/atkmm-1.6 -I/opt/local/lib/atkmm-1.6/include -I/opt/local/include/atk-1.0 -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include/libhandy-1 -I/opt/local/var/macports/build/_opt_local_ppcports_net_abaddon/abaddon/work/abaddon-0.2.1/subprojects/miniaudio -isystem /opt/local/include -isystem /opt/local/include/libfmt11 -isystem /opt/local/include/opus -pipe -I/opt/local/libexec/openssl3/include -Os -DNDEBUG -I/opt/local/libexec/openssl3/include -isystem/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=gnu++17 -arch ppc -mmacosx-version-min=10.6 -MD -MT CMakeFiles/abaddon.dir/src/components/channellist/channellisttree.cpp.o -MF CMakeFiles/abaddon.dir/src/components/channellist/channellisttree.cpp.o.d -o CMakeFiles/abaddon.dir/src/components/channellist/channellisttree.cpp.o -c /opt/local/var/macports/build/_opt_local_ppcports_net_abaddon/abaddon/work/abaddon-0.2.1/src/components/channellist/channellisttree.cpp
In file included from /opt/local/include/spdlog/fmt/fmt.h:28,
                 from /opt/local/var/macports/build/_opt_local_ppcports_net_abaddon/abaddon/work/abaddon-0.2.1/src/discord/snowflake.hpp:5,
                 from /opt/local/var/macports/build/_opt_local_ppcports_net_abaddon/abaddon/work/abaddon-0.2.1/src/discord/chatsubmitparams.hpp:7,
                 from /opt/local/var/macports/build/_opt_local_ppcports_net_abaddon/abaddon/work/abaddon-0.2.1/src/discord/discord.hpp:2,
                 from /opt/local/var/macports/build/_opt_local_ppcports_net_abaddon/abaddon/work/abaddon-0.2.1/src/abaddon.hpp:9,
                 from /opt/local/var/macports/build/_opt_local_ppcports_net_abaddon/abaddon/work/abaddon-0.2.1/src/abaddon.cpp:1:
/opt/local/include/libfmt11/fmt/base.h: In instantiation of 'static void fmt::v11::detail::value<Context>::format_custom(void*, fmt::v11::parse_context<typename Context::char_type>&, Context&) [with T = Snowflake; Formatter = fmt::v11::formatter<Snowflake>; Context = fmt::v11::context; typename Context::char_type = char]':
/opt/local/include/libfmt11/fmt/base.h:2255:19:   required from 'constexpr fmt::v11::detail::value<Context>::value(T&, fmt::v11::detail::custom_tag) [with T = const Snowflake; typename std::enable_if<has_formatter<T, typename Context::char_type>(), int>::type <anonymous> = 0; Context = fmt::v11::context]'
 2255 |     custom.format = format_custom<value_type, formatter<value_type, char_type>>;
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/libfmt11/fmt/base.h:2235:65:   required from 'fmt::v11::detail::value<Context>::value(T&) [with T = const Snowflake; typename std::enable_if<(std::integral_constant<bool, (((((((std::is_class<T>::value || std::is_enum<T>::value) || std::is_union<T>::value) || std::is_array<_Up>::value) && (! fmt::v11::detail::has_to_string_view<T, void>::value)) && (! fmt::v11::detail::is_named_arg<T>::value)) && (! fmt::v11::detail::use_format_as<T>::value)) && (! fmt::v11::detail::use_format_as_member<typename std::remove_const<T>::type, std::integral_constant<bool, true> >::value))>::value || (!1)), int>::type <anonymous> = 0; Context = fmt::v11::context]'
 2235 |   FMT_CONSTEXPR20 FMT_INLINE value(T& x) : value(x, custom_tag()) {}
      |                                                                 ^
/opt/local/include/libfmt11/fmt/base.h:2808:20:   required from 'constexpr fmt::v11::detail::format_arg_store<Context, NUM_ARGS, NUM_NAMED_ARGS, DESC> fmt::v11::make_format_args(T& ...) [with Context = context; T = {const Snowflake, const unsigned int}; int NUM_ARGS = 2; int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 47]'
 2808 |   return {{args...}};
      |                    ^
/opt/local/include/spdlog/logger.h:328:75:   required from 'void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {const Snowflake&, const unsigned int&}; spdlog::string_view_t = fmt::v11::basic_string_view<char>]'
  328 |             fmt::vformat_to(fmt::appender(buf), fmt, fmt::make_format_args(args...));
      |                                                      ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/opt/local/include/spdlog/logger.h:80:13:   required from 'void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, fmt::v11::format_string<T ...>, Args&& ...) [with Args = {const Snowflake&, const unsigned int&}; fmt::v11::format_string<T ...> = fmt::v11::fstring<const Snowflake&, const unsigned int&>]'
   80 |         log_(loc, lvl, details::to_string_view(fmt), std::forward<Args>(args)...);
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/spdlog/logger.h:85:12:   required from 'void spdlog::logger::log(spdlog::level::level_enum, fmt::v11::format_string<T ...>, Args&& ...) [with Args = {const Snowflake&, const unsigned int&}; fmt::v11::format_string<T ...> = fmt::v11::fstring<const Snowflake&, const unsigned int&>]'
   85 |         log(source_loc{}, lvl, fmt, std::forward<Args>(args)...);
      |         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/spdlog/logger.h:135:12:   required from 'void spdlog::logger::debug(fmt::v11::format_string<T ...>, Args&& ...) [with Args = {const Snowflake&, const unsigned int&}; fmt::v11::format_string<T ...> = fmt::v11::fstring<const Snowflake&, const unsigned int&>]'
  135 |         log(level::debug, fmt, std::forward<Args>(args)...);
      |         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_ppcports_net_abaddon/abaddon/work/abaddon-0.2.1/src/abaddon.cpp:85:36:   required from here
   85 |         spdlog::get("voice")->debug("{} SSRC: {}", m.UserID, m.SSRC);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/libfmt11/fmt/base.h:2275:29: error: passing 'const fmt::v11::formatter<Snowflake>' as 'this' argument discards qualifiers [-fpermissive]
 2275 |     ctx.advance_to(cf.format(*static_cast<qualified_type*>(arg), ctx));
      |                    ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_ppcports_net_abaddon/abaddon/work/abaddon-0.2.1/src/discord/snowflake.hpp:47:10: note:   in call to 'fmt::v11::context::iterator fmt::v11::formatter<Snowflake>::format(Snowflake, fmt::v11::format_context&)'
   47 |     auto format(Snowflake id, format_context &ctx) -> decltype(ctx.out()) {
      |          ^~~~~~
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

1 participant
0