Bug 456655

Summary: plasma-workspace bf4dd6353 broke building without kpipewire, fed29855f didn't fix
Product: [Plasma] plasmashell Reporter: Duncan <1i5t5.duncan>
Component: Task Manager and Icons-Only Task Manager widgetsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, nate
Priority: NOR Keywords: regression
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Duncan 2022-07-12 20:56:28 UTC
This is for plasma-workspace from git master using the gentoo/kde overlay ebuilds.  Unfortunately there's no "plasma-workspace" product so I had to choose the closest fit I could find.  (FWIW frameworks and the rest of plasma are git-master as well, tho I don't believe it matters for this bug.)

The first following plasma-workspace commit broke building without kpipewire (the previous commit 2a7a7fd14 builds fine), and the second one didn't fix it:

* commit bf4dd6353
Author:     Aleix Pol <aleixpol@kde.org>
AuthorDate: Wed Jun 29 16:27:01 2022 +0200
Commit:     Aleix Pol <aleixpol@kde.org>
CommitDate: Tue Jul 5 12:47:56 2022 +0200

libtaskmanager: Use KPipeWire

* commit fed29855f
| Author:     Aleix Pol <aleixpol@kde.org>
| AuthorDate: Fri Jul 8 20:10:10 2022 +0200
| Commit:     Aleix Pol Gonzalez <aleixpol@kde.org>
| CommitDate: Sun Jul 10 15:48:23 2022 +0000
|
|     KPipeWire isn't actually required
|
|     Just some features will be missing

Doing the build, I get this during the configure step:

-- The following features have been disabled:

* PipeWire, Required for Wayland screencasting

But the following screencasting-related errors (plus many more of the same) never-the-less occur:
/x86_64-pc-linux-gnu/gcc-bin/12.1.1/../../../lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: libtaskmanager/declarative/CMakeFiles/taskmanagerplugin.dir/taskmanagerplugin.cpp.o: in function `int qmlRegisterUncreatableType<Screencasting>(char const*, int, int, char const*, QString const&) [clone .isra.0]':
taskmanagerplugin.cpp:(.text+0x2a): undefined reference to `Screencasting::staticMetaObject'
/x86_64-pc-linux-gnu/gcc-bin/12.1.1/../../../lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: taskmanagerplugin.cpp:(.text+0x167): undefinedreference to `Screencasting::staticMetaObject'
/x86_64-pc-linux-gnu/gcc-bin/12.1.1/../../../lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: taskmanagerplugin.cpp:(.text+0x195): undefinedreference to `Screencasting::staticMetaObject'

Why is it still trying to reference screencasting despite it being specifically disabled?
Comment 1 Duncan 2022-07-12 21:00:27 UTC
CCing aleixpol@ as the author/committer of both commits.
Comment 2 Duncan 2022-07-12 21:46:32 UTC
See also downstream gentoo: https://bugs.gentoo.org/848771#c11

 (I tried to put it in the see also field as well, but kdebugs says it's the wrong format and doesn't seem to have/list a gentoo exception like it does for debian.  That bug is about a related gentoo plasma-desktop problem, but the linked comment mentions this plasma-workspace issue as a followup and has more complete error output.)
Comment 3 Bug Janitor Service 2022-07-15 00:39:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1923
Comment 4 Duncan 2022-07-15 06:00:58 UTC
(In reply to Bug Janitor Service from comment #3)
> A possibly relevant merge request was started @
> https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1923

That fixes it, here.  Built fine with the patch and rebooted so I'm running it.
Comment 5 Aleix Pol 2022-07-18 23:04:59 UTC
Git commit 92c08071b6df6afcbfbd230d815f87809985f34f by Aleix Pol Gonzalez, on behalf of Michael Pyne.
Committed on 18/07/2022 at 22:57.
Pushed by apol into branch 'master'.

libtaskmanager: Fix build when PipeWire is not installed.

The CMake code is careful not to include PipeWire when it is not
installed, however what it *does* include (taskmanagerplugin) still has
a dependency on Screencasting classes, which prior to this are gated
under the PipeWire check.

Since these classes only require Wayland, not PipeWire, I fix the build
error by reducing the CMake check for PipeWire to only add the
PipeWire-specific bits when PipeWire is present, and to build the
screencasting stuff unconditionally.

The ECM logging code is named after PipeWire but doesn't depend on it
either so that is also built unconditionally to avoid build failures
about a missing "logging.h".

M  +36   -35   libtaskmanager/declarative/CMakeLists.txt

https://invent.kde.org/plasma/plasma-workspace/commit/92c08071b6df6afcbfbd230d815f87809985f34f