Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 787179 - kde-apps/konsole-21.04.0 w/ gcc-11: src/terminalDisplay/TerminalPainter.cpp:381:10: error: ‘optional’ in namespace ‘std’ does not name a template type
Summary: kde-apps/konsole-21.04.0 w/ gcc-11: src/terminalDisplay/TerminalPainter.cpp:3...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL: https://invent.kde.org/utilities/kons...
Whiteboard: fixed in 21.04.1
Keywords: PATCH, UPSTREAM
Depends on:
Blocks: gcc-11
  Show dependency tree
 
Reported: 2021-04-30 17:57 UTC by jospezial
Modified: 2021-05-01 21:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jospezial 2021-04-30 17:57:16 UTC
FAILED: src/CMakeFiles/konsoleprivate.dir/terminalDisplay/TerminalPainter.cpp.o 
/usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -DKCOREADDONS_LIB -DKF_DEPRECATED_WARNINGS_SINCE=0x060000 -DKGUIADDONS_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -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_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING -DQT_PRINTSUPPORT_LIB -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DQT_XML_LIB -DTRANSLATION_DOMAIN=\"konsole\" -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -Dkonsoleprivate_EXPORTS -Isrc -I/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src -Isrc/konsoleprivate_autogen/include -I/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999 -I. -Isrc/colorscheme -I/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/colorscheme -Isrc/keyboardtranslator -I/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/keyboardtranslator -Isrc/session -Isrc/profile -Isrc/characters -I/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/characters -Isrc/decoders -I/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/decoders -isystem /usr/include/KF5/KXmlGui -isystem /usr/include/KF5 -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/KF5/KConfigCore -isystem /usr/include/KF5/KConfigWidgets -isystem /usr/include/KF5/KCodecs -isystem /usr/include/KF5/KWidgetsAddons -isystem /usr/include/KF5/KConfigGui -isystem /usr/include/KF5/KAuth -isystem /usr/include/KF5/KCoreAddons -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtPrintSupport -isystem /usr/include/KF5/KNotifications -isystem /usr/include/KF5/KWindowSystem -isystem /usr/include/KF5/KTextWidgets -isystem /usr/include/KF5/SonnetUi -isystem /usr/include/KF5/KI18n -isystem /usr/include/KF5/KGuiAddons -isystem /usr/include/KF5/KIconThemes -isystem /usr/include/KF5/KBookmarks -isystem /usr/include/KF5/KPty -isystem /usr/include/KF5/KIOWidgets -isystem /usr/include/KF5/KIOGui -isystem /usr/include/KF5/KIOCore -isystem /usr/include/KF5/KService -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/KF5/KJobWidgets -isystem /usr/include/KF5/KCompletion -isystem /usr/include/KF5/KDBusAddons -isystem /usr/include/KF5/KGlobalAccel -isystem /usr/include/KF5/KNewStuff3 -isystem /usr/include/KF5/KNewStuff3/KNS3 -isystem /usr/include/KF5/KNewStuff3/knscore -isystem /usr/include/KF5/KNewStuff3/kns3 -isystem /usr/include/KF5/KNewStuff3/KNSCore -isystem /usr/include/KF5/Attica  -DQT_NO_DEBUG -march=native -mtune=native -O2 -pipe -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -fdiagnostics-color=always -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -fdiagnostics-color=always -pedantic -Wzero-as-null-pointer-constant -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -std=c++17 -MD -MT src/CMakeFiles/konsoleprivate.dir/terminalDisplay/TerminalPainter.cpp.o -MF src/CMakeFiles/konsoleprivate.dir/terminalDisplay/TerminalPainter.cpp.o.d -o src/CMakeFiles/konsoleprivate.dir/terminalDisplay/TerminalPainter.cpp.o -c /var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/terminalDisplay/TerminalPainter.cpp
/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/terminalDisplay/TerminalPainter.cpp:381:10: error: ‘optional’ in namespace ‘std’ does not name a template type
  381 |     std::optional<QColor> calculateBackgroundColor(const Character* style, const QColor *colorTable)
      |          ^~~~~~~~
/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/terminalDisplay/TerminalPainter.cpp:32:1: note: ‘std::optional’ is defined in header ‘<optional>’; did you forget to ‘#include <optional>’?
   31 | #include <QtMath>
  +++ |+#include <optional>
   32 | 
/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/terminalDisplay/TerminalPainter.cpp: In member function ‘void Konsole::TerminalPainter::drawTextFragment(QPainter&, const QRect&, const QString&, const Konsole::Character*, const QColor*, Konsole::LineProperty)’:
/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/terminalDisplay/TerminalPainter.cpp:413:40: error: ‘calculateBackgroundColor’ was not declared in this scope
  413 |         const QColor backgroundColor = calculateBackgroundColor(style, colorTable).value_or(foregroundColor);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~
[157/191] /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -DKCOREADDONS_LIB -DKF_DEPRECATED_WARNINGS_SINCE=0x060000 -DKGUIADDONS_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -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_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING -DQT_PRINTSUPPORT_LIB -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DQT_XML_LIB -DTRANSLATION_DOMAIN=\"konsole\" -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -Dkonsoleprivate_EXPORTS -Isrc -I/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src -Isrc/konsoleprivate_autogen/include -I/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999 -I. -Isrc/colorscheme -I/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/colorscheme -Isrc/keyboardtranslator -I/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/keyboardtranslator -Isrc/session -Isrc/profile -Isrc/characters -I/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/characters -Isrc/decoders -I/var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/decoders -isystem /usr/include/KF5/KXmlGui -isystem /usr/include/KF5 -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/KF5/KConfigCore -isystem /usr/include/KF5/KConfigWidgets -isystem /usr/include/KF5/KCodecs -isystem /usr/include/KF5/KWidgetsAddons -isystem /usr/include/KF5/KConfigGui -isystem /usr/include/KF5/KAuth -isystem /usr/include/KF5/KCoreAddons -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtPrintSupport -isystem /usr/include/KF5/KNotifications -isystem /usr/include/KF5/KWindowSystem -isystem /usr/include/KF5/KTextWidgets -isystem /usr/include/KF5/SonnetUi -isystem /usr/include/KF5/KI18n -isystem /usr/include/KF5/KGuiAddons -isystem /usr/include/KF5/KIconThemes -isystem /usr/include/KF5/KBookmarks -isystem /usr/include/KF5/KPty -isystem /usr/include/KF5/KIOWidgets -isystem /usr/include/KF5/KIOGui -isystem /usr/include/KF5/KIOCore -isystem /usr/include/KF5/KService -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/KF5/KJobWidgets -isystem /usr/include/KF5/KCompletion -isystem /usr/include/KF5/KDBusAddons -isystem /usr/include/KF5/KGlobalAccel -isystem /usr/include/KF5/KNewStuff3 -isystem /usr/include/KF5/KNewStuff3/KNS3 -isystem /usr/include/KF5/KNewStuff3/knscore -isystem /usr/include/KF5/KNewStuff3/kns3 -isystem /usr/include/KF5/KNewStuff3/KNSCore -isystem /usr/include/KF5/Attica  -DQT_NO_DEBUG -march=native -mtune=native -O2 -pipe -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -fdiagnostics-color=always -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -fdiagnostics-color=always -pedantic -Wzero-as-null-pointer-constant -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -std=c++17 -MD -MT src/CMakeFiles/konsoleprivate.dir/terminalDisplay/TerminalDisplay.cpp.o -MF src/CMakeFiles/konsoleprivate.dir/terminalDisplay/TerminalDisplay.cpp.o.d -o src/CMakeFiles/konsoleprivate.dir/terminalDisplay/TerminalDisplay.cpp.o -c /var/tmp/portage/kde-apps/konsole-9999/work/konsole-9999/src/terminalDisplay/TerminalDisplay.cpp
ninja: build stopped: subcommand failed.
 * ERROR: kde-apps/konsole-9999::kde failed (compile phase):
 *   ninja -v -j2 -l0 failed
Comment 1 Sam James archtester gentoo-dev Security 2021-04-30 19:46:10 UTC
Remember, please full build.log and emerge —-info
Comment 2 Andreas Sturmlechner gentoo-dev 2021-05-01 14:24:02 UTC
I'm not sure filing bugs for live ebuilds makes sense.

Can you test the patch with 21.04.0?
Comment 3 Larry the Git Cow gentoo-dev 2021-05-01 21:23:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fdb5052e0cf4726eb141fd92a0ca83c2785ca35

commit 2fdb5052e0cf4726eb141fd92a0ca83c2785ca35
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-05-01 18:39:38 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-05-01 21:21:55 +0000

    kde-apps/konsole: Fix build with GCC-11
    
    Closes: https://bugs.gentoo.org/787179
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 kde-apps/konsole/files/konsole-21.04.0-gcc11.patch | 25 ++++++++++++++++++++++
 kde-apps/konsole/konsole-21.04.0.ebuild            |  2 ++
 2 files changed, 27 insertions(+)