Closed Ashark closed 10 months ago
Heyho, I have a local KF6 port. I will look into making the project compile/work with both Plasma5 and Plasma6
it was more work to get it done properly, but I have pushed a first version. I will need to look at some test failures and check some Qt6 deprecation messages.
to try it out, run cmake with the -DBUILD_WITH_QT6=ON option set. I have updated the install script to better search for the plugin path so that it should be picked up. I will resume tomorrow :)
I tried with -DBUILD_WITH_QT6=ON
, but there is no runner in lists of available search plugins.
Have you started with a clean build? Maybe you can attach the cmake log (I have build it with self compiled Qt and KDE Frameworks)
Yeah, I have built from scratch, with the PKGBUILD that I did not yet published: this one. I am currently using Plasma 6 beta 2 from kde-unstable repo in Arch Linux.
After installing a built package, I run kcmshell6 kcm_plasmasearch
to open search settings (in Arch the QML in system settings is currently broken, so I use this workaround). But there is no JetBrains Runner there.
Also, in .install file I guess it should be kquitapp6
instead of kquitapp5
.
Maybe you can attach the cmake log
What exact file should I search for?
-DKDE_INSTALL_QTPLUGINDIR=kf5-config
That looks incorrect
Can you please suggest what is should be? I do not have the kf6-config
or kf-config
.
Or should I remove this option entirely?
Thanks. I now used this line for cmake command (edited the gist at the link above):
cmake -DCMAKE_INSTALL_PREFIX=/usr -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_WITH_QT6=ON ..
Then I did killall krunner
. Still, cannot see the jetbrains runner in the available plasma search plugins.
Can you try enabling debug logs for krunner and the kcoreaddons core lib? You could utilize the kdebugsettings utility. The install manifest would be useful too.
Pa: killall fails afaik when there is no process running. Might that cause issues?
killall fails afaik when there is no process running. Might that cause issues?
No. I did it manually, and before that, I checked that pgrep -x krunner
actually output some pid.
try enabling debug logs for krunner and the kcoreaddons core lib? You could utilize the kdebugsettings utility.
First of all, thanks for your support! There are three items found by "krunner" term: "krunner bookmarks", "krunner services", "krunner appstream". I have enabled "Full debug information" for "krunner services". Also, enabled for "kcoreaddons (kcoreaddons lib)".
After I hit Ok button, the KDebugSettings closes (I see the exit status 1 in the terminal), and the next time I open it, it still has previous values. I guess that is not normal?
The install manifest would be useful too.
The contents of plasma6-runners-jetbrains-runner-git/src/JetBrainsRunner/build/install_manifest.txt
(this is after building a PKGBUILD):
/usr/share/qlogging-categories6/jetbrains-api.categories
/usr/lib/qt/plugins/kcm_krunner_jetbrainsrunner.so
/usr/lib/qt/plugins/kf6/krunner/krunner_jetbrainsrunner.so
/usr/share/pixmaps/jetbrainsrunner.png
What would be interesting is if The paths from the install manifest show up in the kcoreaddons debug logs. Usually they say in which dirs were searched for plugins. Maybe an ls in /usr/lib/qt/plugins/kf6/krunner/ can help too? Just to verify that this is where the other kde plugins are installed too
ls /usr/lib/qt/plugins/kf6/krunner/
krunner_jetbrainsrunner.so
There is only that file that is installed with package that I built. I did not installed any other runners manually.
I have both krunner5
and krunner
packages installed. May this be a problem? They are not conflicting.
But the packages's file structure is a bit different.
May I somehow know if my runner invoked by Alt + F2 is actually krunner from KF6? Anyway, if that was kf5, the jetbrains runner is not shown.
I have both krunner5 and krunner packages installed. May this be a problem? They are not conflicting.
No, when plasmashell and the krunner executable come from Plasma6, that should be fine.
May I somehow know if my runner invoked by Alt + F2 is actually krunner from KF6? Anyway
qdbus org.kde.krunner /MainApplication org.qtproject.Qt.QApplication.aboutQt
When I enable the mentioned logging categories, I get output like
kf.coreaddons: Checking for plugins in QList("/home/user/kde/usr/bin/kf6/krunner", "/home/user/kde/usr/plugins/kf6/krunner") kf.runner: Loaded: "krunner_recentdocuments" kf.runner: Loading runner: "krunner_jetbrainsrunner" kf.runner: Loaded: "krunner_jetbrainsrunner"
Maybe you can try getting the logs using the ENV var:
QT_LOGGING_RULES="kf.runner*=true;kf.coreaddons*=true" krunner --replace pro
And what does qtpaths6 --query QT_INSTALL_PLUGINS
give you? That is ehat ECM should internally utilize when KDE_INSTALL_USE_QT_SYS_PATHS is set
qdbus org.kde.krunner /MainApplication org.qtproject.Qt.QApplication.aboutQt
Thanks. Yes, in that window I see it is written "This program uses Qt version 6.7.0".
Maybe you can try getting the logs using the ENV var
Yes, I was able to see logs that way. I also added ";default=false" to the QT_LOGGING_RULES. In the logs I see:
kf.coreaddons: Checking for plugins in QList("/usr/bin/kf6/krunner", "/usr/lib/qt6/plugins/kf6/krunner")
But the package have them in different path:
$ yay -Ql plasma6-runners-jetbrains-runner-git | grep so
plasma6-runners-jetbrains-runner-git /usr/lib/qt/plugins/kcm_krunner_jetbrainsrunner.so
plasma6-runners-jetbrains-runner-git /usr/lib/qt/plugins/kf6/krunner/krunner_jetbrainsrunner.so
Note there the path is not /usr/lib/qt6.
what does
qtpaths6 --query QT_INSTALL_PLUGINS
give you?
❯ qtpaths6 --query QT_INSTALL_PLUGINS
zsh: command not found: qtpaths6
❯ qtpaths <tab>
qtpaths qtpaths-qt5
❯ qtpaths --query QT_INSTALL_PLUGINS
qtpaths: Unknown option 'query'.
❯ qtpaths-qt5 --query QT_INSTALL_PLUGINS
qtpaths-qt5: Unknown option 'query'.
if(KDE_INSTALL_USE_QT_SYS_PATHS)
# Qt-specific vars
ecm_query_qt(qt_plugins_dir QT_INSTALL_PLUGINS)
if(_qt_prefix_is_cmake_install_prefix)
file(RELATIVE_PATH qt_plugins_dir ${qt_install_prefix_dir} ${qt_plugins_dir})
endif()
_define_absolute(QTPLUGINDIR ${qt_plugins_dir} "Qt plugins")
ecm_query_qt(qt_qml_dir QT_INSTALL_QML)
if(_qt_prefix_is_cmake_install_prefix)
file(RELATIVE_PATH qt_qml_dir ${qt_install_prefix_dir} ${qt_qml_dir})
endif()
_define_absolute(QMLDIR ${qt_qml_dir} "QtQuick2 imports")
else()
Maybe we run into issues because of this behavior in ECM. Can you try without the /usr install prefix?
And please check if you have the qtpaths file somewhere else on disk. Or maybe a package is missing, though I'd not expect such issues from Arch where they are not mentally split into pices.
Can you try without the /usr install prefix?
Removing -DCMAKE_INSTALL_PREFIX=/usr
from the cmake command did not help. The built package still has path /usr/lib/qt (without 6).
And please check if you have the qtpaths file somewhere else on disk.
❯ pkgfile qtpaths
extra/qt5-tools
extra/qt6-base
❯ yay -Ql qt5-tools | grep qtpaths
qt5-tools /usr/bin/qtpaths
qt5-tools /usr/bin/qtpaths-qt5
❯ yay -Ql qt6-base | grep qtpaths
qt6-base /usr/lib/qt6/bin/qtpaths
qt6-base /usr/lib/qt6/bin/qtpaths6
And what does the /usr/lib/qt6/bin/qtpaths6 executable give you for the plugin path? And you have that installed, or was it only a search for the package manager?
And what does the
/usr/lib/qt6/bin/qtpaths6
executable give you for the plugin path?
How can I check that?
And you have that installed, or was it only a search for the package manager?
The first command (pkgfile) searches in the official packages (that may not be installed). But I have those installed.
/usr/lib/qt6/bin/qtpaths6 --query QT_INSTALL_PLUGINS
Your normal qtpaths is a Qt5 bases one? That should output a Qt5 specific dir when qtpaths --plugin-dir
is used
if(NOT QUERY_EXECUTABLE)
if(ARGS_TRY)
set(${result_variable} "" PARENT_SCOPE)
message(STATUS "No ${_exec_name_text} executable found. Can't check ${qt_variable}")
return()
else()
message(FATAL_ERROR "No ${_exec_name_text} executable found. Can't check ${qt_variable} as required")
endif()
endif()
Maybe the QUERYEXECUTABLE is not found and thus it silently fails --
Can you try editing /usr/share/ECM/modules/ECMQueryQt.cmake and add a warning before the check I posted?
Like message(WARNING "the query executable is: ${QUERY_EXECUTABLE}")
❯ /usr/lib/qt6/bin/qtpaths6 --query QT_INSTALL_PLUGINS
/usr/lib/qt6/plugins
❯ qtpaths --plugin-dir
/usr/lib/qt/plugins
And the ECM stuff I mentioned in my second comment?
It gives the following message:
CMake Warning at /usr/share/ECM/modules/ECMQueryQt.cmake:78 (message):
the query executable is: /usr/lib/qt6/bin/qtpaths
Hmm, but that looks like the correct executable which previously yielded the correct path. Or do you somehow get the message multiple times?
Maybe you could add log statements to /usr/share/ECM/kde-modules/KDEInstallDirs6.cmake:219 and print what is done in CMake here
Yeah, I am getting those messages several times. The full output of the cmake command:
Maybe you could add log statements to
/usr/share/ECM/kde-modules/KDEInstallDirs6.cmake:219
Something like adding --trace
to cmake command?
Yeah, trace sounds good. Or adding more warnings ;)
PS: Happy new Year!
This is the cmake line in PKGBUILD (# -DCMAKE_INSTALL_PREFIX=/usr
is commented):
cmake -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_WITH_QT6=ON .. --trace # -DCMAKE_INSTALL_PREFIX=/usr
Here is the output: makepkg with traced cmake 20240101.txt
Happy New Year!
Oh man, this is such a confusing topic...
Try changing the few lines from 222 onward (KDEInstallDirs6)
message(WARNING "qt_plugins_dir: ${qt_plugins_dir}, prefix dir of Qt ${qt_install_prefix_dir}")
if(_qt_prefix_is_cmake_install_prefix)
file(RELATIVE_PATH qt_plugins_dir ${qt_install_prefix_dir} ${qt_plugins_dir})
endif()
_define_absolute(QTPLUGINDIR ${qt_plugins_dir} "Qt plugins")
message(WARNING "qtpluginsdir is now: ${qt_plugins_dir} after resolving relative KDE_INSTALL_QTPLUGINDIR: ${KDE_INSTALL_QTPLUGINDIR}")
/usr/share/ECM/modules/ECMQueryQt.cmake(96): set(${result_variable} ${output_path} PARENT_SCOPE ) /usr/share/ECM/kde-modules/KDEInstallDirs6.cmake(222): if(_qt_prefix_is_cmake_install_prefix ) /usr/share/ECM/kde-modules/KDEInstallDirs6.cmake(223): file(RELATIVE_PATH qt_plugins_dir ${qt_install_prefix_dir} ${qt_plugins_dir} ) /usr/share/ECM/kde-modules/KDEInstallDirs6.cmake(225): _define_absolute(QTPLUGINDIR ${qt_plugins_dir} Qt plugins ) /usr/share/ECM/kde-modules/KDEInstallDirsCommon.cmake(200): _define_relative(QTPLUGINDIR lib/qt6/plugins Qt plugins )
The "QTPLUGINDIR lib/qt6/plugins Qt plugins" line looks suspicious, the qt_plugins_dir variable we got shouldn't contain a space.
I added the warnings to lines 222 and 227 in KDEInstallDirs6, and the output is:
I also uncommented -DCMAKE_INSTALL_PREFIX=/usr
and removed --trace
.
But qtpluginsdir is now
should also appear in the log?
Oh, sorry, looks like I accidently did not saved the KDEInstallDirs6.cmake
after adding the second warning line. I was using gedit
, because for some reason kate
could not save the system file after even I write the correct password. And I used to that kate is configured to automatically save the file, so I forget to press Ctrl + S in gedit.
I have updated my previous comment, there actually are messages with "qtpluginsdir is now".
This is super weird, I can't find anything wrong in the cmake logs. My suggestion would be to use qtpaths to pass in the plugin dir explicitly.
Please also file a bug on bugs.kde.org and link to this issue. Maybe someone with arch system packages has more luck hunting down this bug. What also seems off to me is that according to the trace, we run the first time in the if-block for the cache.
I wish I could come up with a more proper solutions :(
I have filed a bug 479941.
I have tried to manually move the .so
files to the correct path with mv -v "$pkgdir"/usr/lib/qt{,6}
, and it worked.
I have uploaded the aur package plasma6-runners-jetbrains-runner-git, you can now mention it in the Readme.
Have you started with a clean build?
I now tried to remove both pkg and src directories (actually, build with makepkg after cloning the aur pkgbuild), and it seems it helped. It now have built with the correct path.
I now tried to remove both pkg and src directories (actually, build with makepkg after cloning the aur pkgbuild), and it seems it helped. It now have built with the correct path.
Great! So we may consider this issue resolved?
Yes. Just add the new aur package to readme.
Done!
I've managed to install the plugin on kde6 with fedora 39 (nobara) downloading the install.sh and modifying the cmake line:
cmake -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_WITH_QT6=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. --trace
Also is needed to have the qt dependencies installed:
sudo dnf install kf6-kdoctools-debuginfo-6.0.0-1.fc39.x86_64 kf6-ki18n-debuginfo-6.0.0-1.fc39.x86_64 kf6-kservice-devel-6.0.0-1.fc39.x86_64 kf6-krunner-devel-6.0.0-1.fc39.x86_64 kf6-ktextwidgets-devel-6.0.0-1.fc39.x86_64 kf6-kio-devel-6.0.0-1.fc39.x86_64 kf6-kcmutils-devel-6.0.0-1.fc39.x86_64
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
This is a GCC issue. I fixed it in the jetbrains-api submodule
@Ashark I have made some changes and published a 2.0.0 release. Old manual mappings will be discarded, but it is more reliable/performant/simple now :)
@alex1701c Thanks for notification. I have updated it.
Is this part still correct in the install script?
# KRunner needs to be restarted for the changes to be applied
if pgrep -x krunner > /dev/null
then
kquitapp5 krunner
fi
I just updated my package, and it did not (currently) have any post-install scripts with such instruction.
Also, in readme in this line:
Option B: Get it from the AUR for [Plasma5](https://aur.archlinux.org/packages/plasma5-runners-jetbrains-runner-git/) or [Plasma6](https://aur.archlinux.org/packages/plasma6-runners-jetbrains-runner-git)
you can remove Plasma 5, as it is no longer exists.
Hello. Can I use these plugins in Plasma 6? I tried installing with "Get New Stuff", but it gave error. If that can be used in Plasma 6, can you please update the building instructions? Then I will upload a
plasma6-runners-jetbrains-runner-git
to aur.