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

Build fails with fmt 11 #520

Closed
krop opened this issue Jul 22, 2024 · 0 comments
Closed

Build fails with fmt 11 #520

krop opened this issue Jul 22, 2024 · 0 comments
Assignees

Comments

@krop
Copy link

krop commented Jul 22, 2024

Related: gabime/spdlog#3130

[   18s] FAILED: src/CMakeFiles/kddockwidgets.dir/LayoutSaver.cpp.o 
[   18s] /usr/bin/c++ -DBUILDING_DOCKS_LIBRARY -DFMT_SHARED -DKDDW_FRONTEND_QT -DKDDW_FRONTEND_QTQUICK -DKDDW_FRONTEND_QTWIDGETS -DKDDW_HAS_SPDLOG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_KEYWORDS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING -DQT_OPENGL_LIB -DQT_QMLBUILTINS_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -Dkddockwidgets_EXPORTS -I/home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/build/src/kddockwidgets_autogen/include -I/home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/src/fwd_headers -I/home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/src -I/home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/src/fwd_headers/qtwidgets_pretty -I/home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/src/fwd_headers/qtquick -isystem /usr/include/qt6/QtWidgets -isystem /usr/include/qt6 -isystem /usr/include/qt6/QtCore -isystem /usr/lib64/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtGui -isystem /usr/include/qt6/QtWidgets/6.7.2 -isystem /usr/include/qt6/QtWidgets/6.7.2/QtWidgets -isystem /usr/include/qt6/QtCore/6.7.2 -isystem /usr/include/qt6/QtCore/6.7.2/QtCore -isystem /usr/include/qt6/QtGui/6.7.2 -isystem /usr/include/qt6/QtGui/6.7.2/QtGui -isystem /usr/include/libxkbcommon -isystem /usr/include/qt6/QtQuick -isystem /usr/include/qt6/QtQml -isystem /usr/include/qt6/QtQmlIntegration -isystem /usr/include/qt6/QtQmlBuiltins -isystem /usr/include/qt6/QtNetwork -isystem /usr/include/qt6/QtQmlModels -isystem /usr/include/qt6/QtOpenGL -isystem /usr/include/qt6/QtQuickControls2 -isystem /usr/include/qt6/QtQuick/6.7.2 -isystem /usr/include/qt6/QtQuick/6.7.2/QtQuick -isystem /usr/include/qt6/QtQmlModels/6.7.2 -isystem /usr/include/qt6/QtQmlModels/6.7.2/QtQmlModels -isystem /usr/include/qt6/QtQml/6.7.2 -isystem /usr/include/qt6/QtQml/6.7.2/QtQml -isystem /usr/include/qt6/QtQmlBuiltins/6.7.2 -isystem /usr/include/qt6/QtQmlBuiltins/6.7.2/QtQmlBuiltins -isystem /home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/src/3rdparty -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -O2 -g -DNDEBUG -std=gnu++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wshadow -fvisibility=hidden -MD -MT src/CMakeFiles/kddockwidgets.dir/LayoutSaver.cpp.o -MF src/CMakeFiles/kddockwidgets.dir/LayoutSaver.cpp.o.d -o src/CMakeFiles/kddockwidgets.dir/LayoutSaver.cpp.o -c /home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/src/LayoutSaver.cpp
[   18s] In file included from /usr/include/fmt/format.h:41,
[   18s]                  from /usr/include/fmt/core.h:5,
[   18s]                  from /usr/include/spdlog/fmt/fmt.h:28,
[   18s]                  from /usr/include/spdlog/common.h:50,
[   18s]                  from /usr/include/spdlog/spdlog.h:12,
[   18s]                  from /home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/src/core/spdlog_formatters_p.h:17,
[   18s]                  from /home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/src/core/Logging_p.h:26,
[   18s]                  from /home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/src/core/nlohmann_helpers_p.h:14,
[   18s]                  from /home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/src/core/LayoutSaver_p.h:19,
[   18s]                  from /home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/src/LayoutSaver.cpp:22:
[   18s] /usr/include/fmt/base.h: In instantiation of ‘static void fmt::v11::detail::value<Context>::format_custom_arg(void*, typename Context::parse_context_type&, Context&) [with T = QString; Formatter = fmt::v11::formatter<QString>; Context = fmt::v11::context; typename Context::parse_context_type = fmt::v11::basic_format_parse_context<char>]’:
[   18s] /usr/include/fmt/base.h:1373:19:   required from ‘fmt::v11::detail::value<Context>::value(T&) [with T = const QString; Context = fmt::v11::context]’
[   18s] /usr/include/fmt/base.h:1631:41:   required from ‘constexpr fmt::v11::detail::value<Context> fmt::v11::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v11::context; T = const QString; typename std::enable_if<PACKED, int>::type <anonymous> = 0]’
[   18s] /usr/include/fmt/base.h:2002:74:   required from ‘constexpr fmt::v11::detail::format_arg_store<Context, NUM_ARGS, 0, DESC> fmt::v11::make_format_args(T& ...) [with Context = context; T = {const QString}; long unsigned int NUM_ARGS = 1; long unsigned int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 15; typename std::enable_if<(NUM_NAMED_ARGS == 0), int>::type <anonymous> = 0]’
[   18s] /usr/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 QString&}; spdlog::string_view_t = fmt::v11::basic_string_view<char>]’
[   18s] /usr/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 QString&}; fmt::v11::format_string<T ...> = fmt::v11::basic_format_string<char, const QString&>]’
[   18s] /usr/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 QString&}; fmt::v11::format_string<T ...> = fmt::v11::basic_format_string<char, const QString&>]’
[   18s] /home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/src/LayoutSaver.cpp:392:9:   required from here
[   18s] /usr/include/fmt/base.h:1392:29: error: passing ‘const fmt::v11::formatter<QString>’ as ‘this’ argument discards qualifiers [-fpermissive]
[   18s]  1392 |     ctx.advance_to(cf.format(*static_cast<qualified_type*>(arg), ctx));
[   18s]       |                    ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[   18s] /home/abuild/rpmbuild/BUILD/kddockwidgets-2.1.0/src/core/spdlog_formatters_p.h:74:10: note:   in call to ‘auto fmt::v11::formatter<QString>::format(const QString&, FormatContext&) [with FormatContext = fmt::v11::context]’
[   18s]    74 |     auto format(const QString &str, FormatContext &ctx)
[   18s]       |          ^~~~~~
@iamsergio iamsergio self-assigned this Jul 28, 2024
iamsergio added a commit that referenced this issue Jul 28, 2024
For now, by disabling spdlog. Which is only required for a developer
build anyway.

To be looked at again once fmt 11 reaches Archlinux.
For issue #520
iamsergio added a commit to iamsergio/KDDockWidgets that referenced this issue Sep 16, 2024
format() method needs to be const.
For issue KDAB#520
iamsergio added a commit that referenced this issue Sep 16, 2024
format() method needs to be const.
For issue #520
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