Bug 1847014
Summary: | [FTBFS]: kwin on f33 / s390x | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Martin Kyral <mkyral> | ||||||
Component: | kwin | Assignee: | Daniel Vrátil <me> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | rawhide | CC: | aoliva, dan, dmalcolm, fweimer, hannsj_uhl, jakub, jgrulich, jwakely, kde-sig, law, me, mpolacek, msebor, nickc, rdieter, than | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | s390x | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2020-06-23 09:52:31 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 467765 | ||||||||
Attachments: |
|
Description
Martin Kyral
2020-06-15 12:55:23 UTC
So either this is a code bug (some incorrect template usage) or we have a g++ bug. I have reproduced the failure on ppc64le by adding the options s390x is using for aggressive inlining (--param=inline-min-speedup=2 --param=max-inline-insns-auto=80). Created attachment 1697485 [details]
preprocessed source
command line used to compile the source file
/usr/bin/c++ -DKCOREADDONS_LIB -DLIBINPUT_HAS_TOTEM -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_NO_URL_CAST_FROM_STRING -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICK_LIB -DQT_SCRIPT_LIB -DQT_SENSORS_LIB -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_XML_LIB -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -Dkwin_EXPORTS -I/builddir/build/BUILD/kwin-5.19.0/s390x-redhat-linux-gnu -I/builddir/build/BUILD/kwin-5.19.0 -I/builddir/build/BUILD/kwin-5.19.0/s390x-redhat-linux-gnu/kwin_autogen/include -I/builddir/build/BUILD/kwin-5.19.0/platformsupport -I/builddir/build/BUILD/kwin-5.19.0/tabbox -I/builddir/build/BUILD/kwin-5.19.0/effects -I/builddir/build/BUILD/kwin-5.19.0/libkwineffects -I/builddir/build/BUILD/kwin-5.19.0/s390x-redhat-linux-gnu/libkwineffects -I/builddir/build/BUILD/kwin-5.19.0/s390x-redhat-linux-gnu/effects -I/usr/include/qt5/QtGui/5.14.2 -I/usr/include/qt5/QtGui/5.14.2/QtGui -I/usr/include/qt5/QtCore/5.14.2 -I/usr/include/qt5/QtCore/5.14.2/QtCore -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtDBus -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/qt5/QtQuick -isystem /usr/include/qt5/QtQmlModels -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/KF5/KConfigCore -isystem /usr/include/KF5 -isystem /usr/include/KF5/KCoreAddons -isystem /usr/include/KF5/KWindowSystem -isystem /usr/include/KF5/KDeclarative -isystem /usr/include/KF5/KPackage -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtSensors -isystem /usr/include/KF5/KConfigWidgets -isystem /usr/include/KF5/KCodecs -isystem /usr/include/KF5/KWidgetsAddons -isystem /usr/include/KF5/KConfigGui -isystem /usr/include/qt5/QtXml -isystem /usr/include/KF5/KAuth -isystem /usr/include/KF5/KGlobalAccel -isystem /usr/include/qt5/QtX11Extras -isystem /usr/include/KF5/KI18n -isystem /usr/include/KF5/KNotifications -isystem /usr/include/KF5/Plasma -isystem /usr/include/KF5/KService -isystem /usr/include/KDecoration2 -isystem /usr/include/KScreenLocker -isystem /usr/include/KF5/KActivities -isystem /usr/include/KF5/KWayland/Client -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -fstack-clash-protection -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 -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -std=gnu++14 -o input.cpp.o -c /builddir/build/BUILD/kwin-5.19.0/input.cpp
The build used gcc-10.1.1-1.fc33.s390x Last time we saw this it was because the function was only defined in a .cpp file not a header, and there was no explicit instantiation declaration+definition to tell the compiler it would be defined elsewhere. I suspect something similar. Perhaps with some interaction with inlining, particularly if it's only triggering on s390. But in the end, I suspect it's an template instantiation source level issue that just happened to work in the past. A note for reproducing - you will need a special mock config like this as the build needs deps from a side-tag repo [dan@talos kwin]$ cat /etc/mock/fedora-33-ppc64le-kde.cfg config_opts['target_arch'] = 'ppc64le' config_opts['legal_host_arches'] = ('ppc64le',) include('templates/fedora-rawhide.tpl') config_opts['dnf.conf'] += """ [local-kde] name=local-kde baseurl=https://kojipkgs.fedoraproject.org/repos/f33-kde/latest/$basearch/ cost=2000 enabled=1 skip_if_unavailable=False """ Confirmed as a kwin bug. pointer_input.h declares these function templates: class WaylandCursorImage : public QObject { Q_OBJECT public: void loadTheme(); struct Image { QImage image; QPoint hotspot; }; template <typename T> void loadThemeCursor(const T &shape, Image *image); template <typename T> void loadThemeCursor(const T &shape, QHash<T, Image> &cursors, Image *image); But they are only defined in pointer_input.cpp Created attachment 1697489 [details]
Move function template definitions to header
I haven't tested this, so have no idea if the definitions actually rely on something else that is only declared in the pointer_input.cpp file.
Thanks for the feedback, switching back to kwin. (In reply to Jonathan Wakely from comment #8) > Created attachment 1697489 [details] > Move function template definitions to header > > I haven't tested this, so have no idea if the definitions actually rely on > something else that is only declared in the pointer_input.cpp file. Thanks for the patch. Unforunatelly, it is breaking build: https://download.copr.fedorainfracloud.org/results/mkyral/plasma-unstable/fedora-32-x86_64/01466228-kwin/builder-live.log.gz If I see right, then it needs some headers to be included in the pointer_input.h source instead of the cpp file. Please report the issue upstream, it's a real bug. Like I said, "the definitions actually rely on something else that is only declared in the pointer_input.cpp file". If they don't want to declare KWayland in the header file then they'll need to add explicit instantiation declarations to the header for the specializations that are actually used (at least KWin::WaylandCursorImage::loadThemeCursor<KWin::CursorShape>) and then explicitly instantiate that in the .cpp file. Either way, the upstream code is not valid C++ and that's why GCC doesn't build it. Reported upstream: https://bugs.kde.org/show_bug.cgi?id=423052 |