Summary: | kcm_kwin4_genericscripted.so not found because it's in the wrong location | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Fabian Homborg <FHomborg> |
Component: | scripting | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | andydecleyre, bugs.kde.org, FHomborg, hrvoje.senjan, kde, marc.collin |
Priority: | NOR | ||
Version: | 5.3.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
URL: | https://github.com/faho/kwin-tiling/tree/plasma5 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | image screen |
not completely unlikely given that my system (default build) doesn't have any script with a config button, so quite likely this broke during porting without noticing. Do you have an example of a script with config module? Yes, check the URL - my tiling script thingy. :-) got it to work: X-KDE-Library=kwin/effects/configs/kcm_kwin4_genericscripted The genericscripted is changed to be used with KPluginTrader which looks in a specified directory (e.g. kwin/effects/configs). The KPluginSelector doesn't set this, thus it needs to be specified in the metadata file. same problem if i set with this value. Do you have /usr/lib/qt/plugins/kwin/effects/configs/kcm_kwin4_genericscripted.so or maybe "only" /usr/lib/plugins/kwin/effects/configs/kcm_kwin4_genericscripted.so and how does that correlate with the output of "kf5-config --path qtplugins"? no mine is in lib64 /usr/lib64/qt5/plugins/kwin/effects/configs/kcm_kwin4_genericscripted.so kf5-config --path qtplugins return /usr/lib64/plugins/:/usr/lib64/qt5/plugins/plugins/ See the doubled plugins/plugins ? That's a distro bug (and I think it was already reported) - basically they added "plugins" to the plugins path when compiling KF5 (what's likely undesired), but use the proper path on installing kwin (or similar, but whatever happened, the lib does not end up in a plugins path and the default plugins path in KF5 is likely the wrong one) Check whether you don't have accidentally set "echo $QT_PLUGIN_PATH" and try QT_PLUGIN_PATH=/usr/lib64/plugins/:/usr/lib64/qt5/plugins/plugins/:/usr/lib64/qt5/plugins/ kwin_x11 --replace & In console, echo $QT_PLUGIN_PATH return nothing. Then it the path set at compile time. As mentioned, I think we had this (fedora? I'm really not sure) but you may still want to report to your distro. ... -DKDE_INSTALL_QTPLUGINDIR=%{_lib}/qt5/plugins \\\ -DKDE_INSTALL_PLUGINDIR=%{_lib}/qt5/plugins \\\ ... https://projects.kde.org/projects/kdesupport/extra-cmake-modules/repository/revisions/master/entry/kde-modules/KDEInstallDirs.cmake#L37 doesn't show we're doing anything wrong here. I won't claim any expertise here - all I know that I get: % kf5-config --path qtplugins /usr/lib/plugins/:/usr/lib/qt/plugins/plugins/ % kde4-config --path qtplugins $HOME/.kde/lib/kde4/plugins/:/usr/lib/kde4/plugins/:/usr/lib/plugins/ And those are the paths all my plugins end up *shrug* The kcm only asks for KServiceTypeTrader offers, KPluginInfo::fromServices(offers) and adds them to a KPluginSelector. So I assume this would affect pretty much everything (at least we should not build specific paths here) @Marc, do you have (other) plugins installed in /usr/lib64/qt5/plugins/plugins/ and/or in /usr/lib64/qt5/plugins/ ? Well, this works for me here. Did git clone https://github.com/faho/kwin-tiling.git cd kwin-tiling/ plasmapkg2 --type kwinscript -i . and enabled script succesfully... Marcs problem is for sure that the plugin lib doesn't end up in a plugin path - we don't know the cause yet. Assuming he's on SuSE: Hrvoje, what do the kf5 default paths ("kf5-config --path qtplugins") report on your side? And where is the lib installed (well, ok - likely in one of those paths ;-) It's installed to /usr/lib64/qt5/plugins/kwin/effects/configs/kcm_kwin4_genericscripted.so kf5-config --path qtplugins /usr/lib64/plugins/:/usr/lib64/qt5/plugins/plugins/ qtpaths --plugin-dir /usr/lib64/qt5/plugins sounds as if the doubled plugins output would indeed be just a bug (just noticed that I have it as well ;-) in kf5-config, but then i'm really out of ideas. @Marc, run strace kcmshell5 kwinscripts 2>&1 | grep kcm_kwin4_genericscripted.so and try to open a config dialog for a script. => That will tell us which paths are considered (and whether or not they succeed) Created attachment 96388 [details]
image screen
if i run you command
strace kcmshell5 kwinscripts 2>&1 | grep kcm_kwin4_genericscripted.so
stat(".//kcm_kwin4_genericscripted.so", {st_mode=S_IFREG|0755, st_size=547544, ...}) = 0
open(".//kcm_kwin4_genericscripted.so", O_RDONLY|O_CLOEXEC) = 12
open(".//kcm_kwin4_genericscripted.so", O_RDONLY|O_CLOEXEC) = 12
stat(".//kcm_kwin4_genericscripted.so", {st_mode=S_IFREG|0755, st_size=547544, ...}) = 0
stat(".//kcm_kwin4_genericscripted.so", {st_mode=S_IFREG|0755, st_size=547544, ...}) = 0
stat(".//kcm_kwin4_genericscripted.so", {st_mode=S_IFREG|0755, st_size=547544, ...}) = 0
when i click on the tiling extension to setup it i get this screen...
but if i pass by KDE Systemsettings, windows management,. kwin script i click on the same button, i get a message specifiing sharing library is not found....
In the file: /home/collinm/.local/share/kwin/scripts/kwin-script-tiling/metadata.desktop, for key
X-KDE-Library i tried to put: kwin/effects/configs/kcm_kwin4_genericscripted
same result
tried also
/usr/lib64/qt5/plugins/kwin/effects/configs/kcm_kwin4_genericscripted
same result
This finds the library in the working directory? Is that a regular distro installation or some self-compiled setup? And why is kcm_kwin4_genericscripted.so in $PWD? Did you try to run the command from /usr/lib64/qt5/plugins/kwin/effects/configs/ ? In case, please don't. Try again from eg. your $HOME dir. I use suse. Ok I tried from my home dir and get collinm@linux-ja2a:~> strace kcmshell5 kwinscripts 2>&1 | grep kcm_kwin4_genericscripted.so stat(".//kcm_kwin4_genericscripted.so", 0x7ffca69507e0) = -1 ENOENT (No such file or directory) stat(".//libkcm_kwin4_genericscripted.so", 0x7ffca69507e0) = -1 ENOENT (No such file or directory) stat("/usr/lib64/qt5/plugins/kcm_kwin4_genericscripted.so", 0x7ffca69507e0) = -1 ENOENT (No such file or directory) stat("/usr/lib64/qt5/plugins/libkcm_kwin4_genericscripted.so", 0x7ffca69507e0) = -1 ENOENT (No such file or directory) stat("/usr/bin/kcm_kwin4_genericscripted.so", 0x7ffca69507e0) = -1 ENOENT (No such file or directory) stat("/usr/bin/libkcm_kwin4_genericscripted.so", 0x7ffca69507e0) = -1 ENOENT (No such file or directory) stat(".//kcms/kcm_kwin4_genericscripted.so", 0x7ffca6950870) = -1 ENOENT (No such file or directory) stat(".//kcms/libkcm_kwin4_genericscripted.so", 0x7ffca6950870) = -1 ENOENT (No such file or directory) stat("/usr/lib64/qt5/plugins/kcms/kcm_kwin4_genericscripted.so", 0x7ffca6950870) = -1 ENOENT (No such file or directory) stat("/usr/lib64/qt5/plugins/kcms/libkcm_kwin4_genericscripted.so", 0x7ffca6950870) = -1 ENOENT (No such file or directory) stat("/usr/bin/kcms/kcm_kwin4_genericscripted.so", 0x7ffca6950870) = -1 ENOENT (No such file or directory) stat("/usr/bin/kcms/libkcm_kwin4_genericscripted.so", 0x7ffca6950870) = -1 ENOENT (No such file or directory) stat(".//kcm_kwin4_genericscripted.so", 0x7ffca6950870) = -1 ENOENT (No such file or directory) stat(".//libkcm_kwin4_genericscripted.so", 0x7ffca6950870) = -1 ENOENT (No such file or directory) stat("/usr/lib64/qt5/plugins/kcm_kwin4_genericscripted.so", 0x7ffca6950870) = -1 ENOENT (No such file or directory) stat("/usr/lib64/qt5/plugins/libkcm_kwin4_genericscripted.so", 0x7ffca6950870) = -1 ENOENT (No such file or directory) stat("/usr/bin/kcm_kwin4_genericscripted.so", 0x7ffca6950870) = -1 ENOENT (No such file or directory) stat("/usr/bin/libkcm_kwin4_genericscripted.so", 0x7ffca6950870) = -1 ENOENT (No such file or directory) stat(".//kcm_kwin4_genericscripted.so", 0x7ffca6950af0) = -1 ENOENT (No such file or directory) stat(".//libkcm_kwin4_genericscripted.so", 0x7ffca6950af0) = -1 ENOENT (No such file or directory) stat("/usr/lib64/qt5/plugins/kcm_kwin4_genericscripted.so", 0x7ffca6950af0) = -1 ENOENT (No such file or directory) stat("/usr/lib64/qt5/plugins/libkcm_kwin4_genericscripted.so", 0x7ffca6950af0) = -1 ENOENT (No such file or directory) stat("/usr/bin/kcm_kwin4_genericscripted.so", 0x7ffca6950af0) = -1 ENOENT (No such file or directory) stat("/usr/bin/libkcm_kwin4_genericscripted.so", 0x7ffca6950af0) = -1 ENOENT (No such file or directory) so it don't search in /usr/lib64/qt5/plugins/kwin/effects/configs/ That would be the original bug. Sure the altered service file is considered? (grep the strace for "metadata") I'm having trouble reading a solution if it's here. I'm still experiencing this on Arch Linux. $ locate kcm_kwin4_genericscripted.so >> /usr/lib/qt/plugins/kwin/effects/configs/kcm_kwin4_genericscripted.so $ kf5-config --path qtplugins >> /usr/lib/plugins/:/usr/lib/qt/plugins/plugins/ $ qtpaths --plugin-dir >> /usr/lib/qt/plugins $ strace kcmshell5 kwinscripts 2>&1 | egrep "kcm_kwin4_genericscripted.so|metadata" >> stat("./kcm_kwin4_genericscripted.so", 0x7ffc8f5f33b0) = -1 ENOENT (No such file or directory) >> stat("./libkcm_kwin4_genericscripted.so", 0x7ffc8f5f33b0) = -1 ENOENT (No such file or directory) >> stat("/usr/lib/qt/plugins/kcm_kwin4_genericscripted.so", 0x7ffc8f5f33b0) = -1 ENOENT (No such file or directory) >> stat("/usr/lib/qt/plugins/libkcm_kwin4_genericscripted.so", 0x7ffc8f5f33b0) = -1 ENOENT (No such file or directory) >> stat("/usr/bin/kcm_kwin4_genericscripted.so", 0x7ffc8f5f33b0) = -1 ENOENT (No such file or directory) >> stat("/usr/bin/libkcm_kwin4_genericscripted.so", 0x7ffc8f5f33b0) = -1 ENOENT (No such file or directory) >> stat("./kcms/kcm_kwin4_genericscripted.so", 0x7ffc8f5f3440) = -1 ENOENT (No such file or directory) >> stat("./kcms/libkcm_kwin4_genericscripted.so", 0x7ffc8f5f3440) = -1 ENOENT (No such file or directory) >> stat("/usr/lib/qt/plugins/kcms/kcm_kwin4_genericscripted.so", 0x7ffc8f5f3440) = -1 ENOENT (No such file or directory) >> stat("/usr/lib/qt/plugins/kcms/libkcm_kwin4_genericscripted.so", 0x7ffc8f5f3440) = -1 ENOENT (No such file or directory) >> stat("/usr/bin/kcms/kcm_kwin4_genericscripted.so", 0x7ffc8f5f3440) = -1 ENOENT (No such file or directory) >> stat("/usr/bin/kcms/libkcm_kwin4_genericscripted.so", 0x7ffc8f5f3440) = -1 ENOENT (No such file or directory) >> stat("./kcm_kwin4_genericscripted.so", 0x7ffc8f5f3440) = -1 ENOENT (No such file or directory) >> stat("./libkcm_kwin4_genericscripted.so", 0x7ffc8f5f3440) = -1 ENOENT (No such file or directory) >> stat("/usr/lib/qt/plugins/kcm_kwin4_genericscripted.so", 0x7ffc8f5f3440) = -1 ENOENT (No such file or directory) >> stat("/usr/lib/qt/plugins/libkcm_kwin4_genericscripted.so", 0x7ffc8f5f3440) = -1 ENOENT (No such file or directory) >> stat("/usr/bin/kcm_kwin4_genericscripted.so", 0x7ffc8f5f3440) = -1 ENOENT (No such file or directory) >> stat("/usr/bin/libkcm_kwin4_genericscripted.so", 0x7ffc8f5f3440) = -1 ENOENT (No such file or directory) If you're trying to fix this in an already-installed script, what I discovered is that there was a second .desktop file corresponding to the installed KWin script, inside: ~/.local/share/kservices5/ In Marc's comment #17 he implied that he was only editing the path for kcm_kwin4_genericscripted in his metadata.desktop file inside ~/.local/share/kwin/scripts/XXX/ After updating the path to "kwin/effects/configs/kcm_kwin4_genericscripted" in both locations, things work fine for me. |
Script configuration menus error out because kcm_kwin4_genericscripted.so is installed in /usr/lib/qt/plugins/kwin/effects/configs/kcm_kwin4_genericscripted.so and then not found. The error message in the terminal is >Error loading plugin "kcm_kwin4_genericscripted" "The shared library was not found." >Plugin search paths are ("/usr/lib/qt/plugins", "/usr/bin") >The environment variable QT_PLUGIN_PATH might be not correctly set >Error loading plugin: "The shared library was not found." Creating a symlink (and presumably copying) in /usr/lib/qt/plugins/ works. Reproducible: Always Steps to Reproduce: 1. Install a script with a configuration menu 2. Open it in the kcm Actual Results: Show the error Expected Results: Show the configuration menu I don't quite like that it's still called kcm_kwin**4** - is this expected to change?