Bug 447908

Summary: abstractrunner.h can't find KConfigGroup, KPluginInfo or QIcon
Product: [Frameworks and Libraries] frameworks-krunner Reporter: Duncan <1i5t5.duncan>
Component: generalAssignee: Alexander Lohnau <alexander.lohnau>
Status: RESOLVED FIXED    
Severity: normal CC: a.samirh78
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Duncan 2022-01-04 01:09:54 UTC
This is against krunner framework live-git at c6cb0dfa9fd01875d85d0fcf2f6dc88939f47821 (pulled and built today, using the gentoo/kde live-git packages), but there's no master version to file against, nor 5.90, which is what about says frameworks is, either.  Should I file a separate bug for that?

I'm not entirely sure this is a krunner framework bug, but the build failures, plasma-workspace, kdeplasma-addons and plasma-desktop, all point to the same file owned by the krunner framework, and I can't see a plasma-workspace or plasma-desktop product to file against in any case, so...

All the failures are include/KF5/KRunner/krunner/abstractrunner.h not finding something (KConfigGroup, KPluginInfo and QIcon, at least).

plasma-workspace:

FAILED: runners/sessions/CMakeFiles/krunner_sessions.dir/sessionrunner.cpp.o 
/usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -DKCOREADDONS_LIB -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055800 -DKITEMMODELS_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054F00 -DKPLUGINFACTORY_PLUGIN_CLASS_INTERNAL_NAME=krunner_sessions_factory -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0x050f00 -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_NO_URL_CAST_FROM_STRING -DQT_WIDGETS_LIB -DTRANSLATION_DOMAIN=\"plasma_runner_sessions\" -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -Dkrunner_sessions_EXPORTS -I/tmp/portage/kde-plasma/plasma-workspace-9999/work/plasma-workspace-9999_build/runners/sessions -I/tmp/portage/kde-plasma/plasma-workspace-9999/work/plasma-workspace-9999/runners/sessions -I/tmp/portage/kde-plasma/plasma-workspace-9999/work/plasma-workspace-9999_build/runners/sessions/krunner_sessions_autogen/include -I/tmp/portage/kde-plasma/plasma-workspace-9999/work/plasma-workspace-9999_build -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtDBus -isystem /usr/include/KF5/KRunner -isystem /usr/include/KF5 -isystem /usr/include/KF5/KI18n -isystem /usr/include/kworkspace5 -isystem /usr/include/KF5/KCoreAddons  -DQT_NO_DEBUG -march=native -O2 -fgcse-sm -fgcse-las -fgcse-after-reload -ftree-vectorize -fdiagnostics-color -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 -Werror=init-self -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -fdiagnostics-color=always -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -std=gnu++17 -MD -MT runners/sessions/CMakeFiles/krunner_sessions.dir/sessionrunner.cpp.o -MF runners/sessions/CMakeFiles/krunner_sessions.dir/sessionrunner.cpp.o.d -o runners/sessions/CMakeFiles/krunner_sessions.dir/sessionrunner.cpp.o -c /tmp/portage/kde-plasma/plasma-workspace-9999/work/plasma-workspace-9999/runners/sessions/sessionrunner.cpp
In file included from /tmp/portage/kde-plasma/plasma-workspace-9999/work/plasma-workspace-9999/runners/sessions/sessionrunner.h:10,
from /tmp/portage/kde-plasma/plasma-workspace-9999/work/plasma-workspace-9999/runners/sessions/sessionrunner.cpp:7:
/include/KF5/KRunner/krunner/abstractrunner.h:14:10: fatal error: KConfigGroup: No such file or directory
14 | #include <KConfigGroup>

There's a similar error for KPluginInfo (line 15)

Skipping the actual command, here's kdeplasma-addons:

FAILED: runners/converter/CMakeFiles/unitconverter.dir/unitconverter_autogen/mocs_compilation.cpp.o 

In file included from /include/KF5/KRunner/KRunner/AbstractRunner:1,
from /tmp/portage/kde-plasma/kdeplasma-addons-9999/work/kdeplasma-addons-9999_build/runners/converter/unitconverter_autogen/EWIEGA46WW/../../../../../kdeplasma-addons-9999/runners/converter/converterrunner.h:11,
from /tmp/portage/kde-plasma/kdeplasma-addons-9999/work/kdeplasma-addons-9999_build/runners/converter/unitconverter_autogen/EWIEGA46WW/moc_converterrunner.cpp:10,
from /tmp/portage/kde-plasma/kdeplasma-addons-9999/work/kdeplasma-addons-9999_build/runners/converter/unitconverter_autogen/mocs_compilation.cpp:2:
/include/KF5/KRunner/krunner/abstractrunner.h:14:10: fatal error: KConfigGroup: No such file or directory
14 | #include <KConfigGroup>

And plasma-desktop:

FAILED: runners/kwin/CMakeFiles/krunner_kwin.dir/kwin-runner.cpp.o 

In file included from /tmp/portage/kde-plasma/plasma-desktop-9999/work/plasma-desktop-9999/runners/kwin/kwin-runner.h:11,
from /tmp/portage/kde-plasma/plasma-desktop-9999/work/plasma-desktop-9999/runners/kwin/kwin-runner.cpp:8:
/include/KF5/KRunner/krunner/abstractrunner.h:10:10: fatal error: QIcon: No such file or directory
10 | #include <QIcon>
Comment 1 Duncan 2022-01-04 04:59:31 UTC
Please fix fast!

Without the plasma-workspace rebuild krunner runs and lets me enter stuff, but most runners, including the executable runner, are broken.  So I can't run anything by typing it into krunner or kicker!
Comment 2 Duncan 2022-01-04 08:00:10 UTC
Seems to be downstream.  From gentoo/kde's git:

commit 1cc0d3e34
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: Mon Jan 3 15:39:54 2022 +0100
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: Mon Jan 3 15:40:03 2022 +0100

kde-frameworks/krunner: Set EXCLUDE_DEPRECATED_BEFORE_AND_AT=5.73.0

Fixes build. See also upstream commit
1b1e11882d1733165450554f3e3cf1688a88d636

A manual revert of that to the previous 5.65.0 and plasma-workspace (haven't tried the others yet but they should too) builds fine again! =:^)

Now to pull again and see if it's updated since I pulled, and file a bug there if not.
Comment 4 Alexander Lohnau 2022-01-04 15:39:15 UTC
Git commit fcc5502d2b71714c6ce823341b176d5e5da5f029 by Alexander Lohnau.
Committed on 04/01/2022 at 09:31.
Pushed by alex into branch 'master'.

Fixups for building without including KService/KIO/Plasma-Frameworks

- Add deprecation wrappers to guard the includes
- Add explicit public linkage to parts of the API we implicitly depended upon
- Bump version of plasma-frameworks linking checks to 5.91, because some changes in the headers were needed

M  +3    -3    CMakeLists.txt
M  +4    -4    autotests/CMakeLists.txt
M  +5    -1    autotests/dbusrunnertest.cpp
M  +8    -7    src/CMakeLists.txt
M  +5    -0    src/abstractrunner.cpp
M  +7    -2    src/abstractrunner.h
M  +1    -0    src/querymatch.cpp
M  +4    -1    src/runnercontext.cpp
M  +6    -2    src/runnermanager.cpp
M  +4    -1    src/runnermanager.h

https://invent.kde.org/frameworks/krunner/commit/fcc5502d2b71714c6ce823341b176d5e5da5f029