Bug 423052 - [FTBFS]: kwin on f33 / s390x
Summary: [FTBFS]: kwin on f33 / s390x
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.19.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-16 12:10 UTC by Martin Kyral
Modified: 2020-06-22 20:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Kyral 2020-06-16 12:10:39 UTC
SUMMARY
kwin 5.19 fails to build on rawhide / s390x. The reason is:

/usr/bin/ld: CMakeFiles/kwin.dir/input.cpp.o: in function `KWin::TabletInputFilter::tabletToolEvent(KWin::TabletEvent*)::{lambda(KWaylandServer::TabletCursor*)#2}::operator()(KWaylandServer::TabletCursor*) const::{lambda()#1}::operator()() const':
/builddir/build/BUILD/kwin-5.19.0/input.cpp:1672: undefined reference to `void KWin::WaylandCursorImage::loadThemeCursor<KWin::CursorShape>(KWin::CursorShape const&, KWin::WaylandCursorImage::Image*)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/kwin.dir/build.make:2339: bin/libkwin.so.5.19.0] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/kwin-5.19.0/s390x-redhat-linux-gnu'
make[1]: *** [CMakeFiles/Makefile2:4330: CMakeFiles/kwin.dir/all] Error 2
make: *** [Makefile:164: all] Error 2

full log: https://kojipkgs.fedoraproject.org//work/tasks/7168/45747168/build.log

First time I saw this issue was woth 5.18.90 (5.19 beta). Since then, it fails consistently. This problem does not happen on older kwin releases nor on other architectures.

....

 Dan Horák 2020-06-15 15:58:41 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).

...

 Jonathan Wakely 2020-06-16 09:09:43 UTC

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.

...

https://bugzilla.redhat.com/show_bug.cgi?id=1847014

STEPS TO REPRODUCE
1. see the referenced downstream bug
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Martin Kyral 2020-06-18 16:38:16 UTC
Any progress, please?
Comment 2 Bug Janitor Service 2020-06-22 15:52:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/74
Comment 3 David Edmundson 2020-06-22 19:52:40 UTC
Git commit 34c1bccdb797d72c0f0db75ef87ec25695ac6d01 by David Edmundson.
Committed on 22/06/2020 at 15:51.
Pushed by davidedmundson into branch 'Plasma/5.19'.

Fix build with loadThemeCursor templates

WaylandCursorImage::loadThemeCursor(const T &shape) uses templates.
These templates are used by input.cpp but the deifnition is in
pointer_input.cpp

On some setups this creates a compilation problem.

This patch introduces an explicit non-templated declaration with the
defintion explicitly complied into the same class.

In master this has been refactored away anyway, so this is a minimal
patch to make things working in the least invasive way.

M  +1    -1    input.cpp
M  +6    -0    pointer_input.cpp
M  +3    -0    pointer_input.h

https://invent.kde.org/plasma/kwin/commit/34c1bccdb797d72c0f0db75ef87ec25695ac6d01
Comment 4 Martin Kyral 2020-06-22 20:16:21 UTC
Thanks for the fix