-
-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Description
(Using blank github template since not sure how it classifies).
I am trying to run kcc ( https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/kc/kcc/package.nix ) under a wayland exclusive setup (it works using xwayland, more precisely https://github.com/Supreeeme/xwayland-satellite).
Usually adding qt6.qtwayland to buildInputs and exporting QT_QPA_PLATFORM=wayland before starting the program fixes it (organicmaps, another qt app works just fine).
Does not seem to be the case for kcc.
I wanted to see why it couldn't find the library and it is possible with QT_DEBUG_PLUGINS=1
➜ export QT_DEBUG_PLUGINS=1
➜ echo $QT_PLUGIN_PATH
/nix/store/yh2qvhf0vfr14mgyslalng7disl79cgq-fcitx5-with-addons-5.1.12/lib/qt-6/plugins:/etc/profiles/per-user/teto/lib/qt-5.15.17/plugins:/etc/profiles/per-user/teto/lib/qt-6/plugins:/home/teto/.nix-profile/lib/qt-5.15.17/plugins:/home/teto/.nix-profile/lib/qt-6/plugins:/nix/profile/lib/qt-5.15.17/plugins:/nix/profile/lib/qt-6/plugins:/home/teto/.local/state/nix/profile/lib/qt-5.15.17/plugins:/home/teto/.local/state/nix/profile/lib/qt-6/plugins:/etc/profiles/per-user/teto/lib/qt-5.15.17/plugins:/etc/profiles/per-user/teto/lib/qt-6/plugins:/nix/var/nix/profiles/default/lib/qt-5.15.17/plugins:/nix/var/nix/profiles/default/lib/qt-6/plugins:/run/current-system/sw/lib/qt-5.15.17/plugins:/run/current-system/sw/lib/qt-6/plugins
➜ kcc
qt.core.plugin.factoryloader: checking directory path "/nix/store/yh2qvhf0vfr14mgyslalng7disl79cgq-fcitx5-with-addons-5.1.12/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/yh2qvhf0vfr14mgyslalng7disl79cgq-fcitx5-with-addons-5.1.12/lib/qt-5.15.17/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/fk65jyizpvjjnlmk9171x2y04slg9j5d-home-manager-path/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/a7vlrrzdya0qsnsbwddmgpw873xj5mdb-qtbase-6.9.1/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: looking at "libqxcb.so"
qt.core.plugin.loader: Found metadata in lib /nix/store/a7vlrrzdya0qsnsbwddmgpw873xj5mdb-qtbase-6.9.1/lib/qt-6/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"archlevel": 1,
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 395520
}
qt.core.plugin.factoryloader: Got keys from plugin meta data QList("xcb")
qt.core.plugin.factoryloader: looking at "libqvnc.so"
qt.core.plugin.loader: Found metadata in lib /nix/store/a7vlrrzdya0qsnsbwddmgpw873xj5mdb-qtbase-6.9.1/lib/qt-6/plugins/platforms/libqvnc.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"vnc"
]
},
"archlevel": 1,
"className": "QVncIntegrationPlugin",
"debug": false,
"version": 395520
}
qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vnc")
qt.core.plugin.factoryloader: looking at "libqvkkhrdisplay.so"
qt.core.plugin.loader: Found metadata in lib /nix/store/a7vlrrzdya0qsnsbwddmgpw873xj5mdb-qtbase-6.9.1/lib/qt-6/plugins/platforms/libqvkkhrdisplay.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"vkkhrdisplay"
]
},
"archlevel": 1,
"className": "QVkKhrDisplayIntegrationPlugin",
"debug": false,
"version": 395520
}
qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vkkhrdisplay")
qt.core.plugin.factoryloader: looking at "libqminimalegl.so"
qt.core.plugin.loader: Found metadata in lib /nix/store/a7vlrrzdya0qsnsbwddmgpw873xj5mdb-qtbase-6.9.1/lib/qt-6/plugins/platforms/libqminimalegl.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimalegl"
]
},
"archlevel": 1,
"className": "QMinimalEglIntegrationPlugin",
"debug": false,
"version": 395520
}
qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimalegl")
qt.core.plugin.factoryloader: looking at "libqlinuxfb.so"
qt.core.plugin.loader: Found metadata in lib /nix/store/a7vlrrzdya0qsnsbwddmgpw873xj5mdb-qtbase-6.9.1/lib/qt-6/plugins/platforms/libqlinuxfb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"linuxfb"
]
},
"archlevel": 1,
"className": "QLinuxFbIntegrationPlugin",
"debug": false,
"version": 395520
}
qt.core.plugin.factoryloader: Got keys from plugin meta data QList("linuxfb")
qt.core.plugin.factoryloader: looking at "libqminimal.so"
qt.core.plugin.loader: Found metadata in lib /nix/store/a7vlrrzdya0qsnsbwddmgpw873xj5mdb-qtbase-6.9.1/lib/qt-6/plugins/platforms/libqminimal.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimal"
]
},
"archlevel": 1,
"className": "QMinimalIntegrationPlugin",
"debug": false,
"version": 395520
}
qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal")
qt.core.plugin.factoryloader: looking at "libqeglfs.so"
qt.core.plugin.loader: Found metadata in lib /nix/store/a7vlrrzdya0qsnsbwddmgpw873xj5mdb-qtbase-6.9.1/lib/qt-6/plugins/platforms/libqeglfs.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"eglfs"
]
},
"archlevel": 1,
"className": "QEglFSIntegrationPlugin",
"debug": false,
"version": 395520
}
qt.core.plugin.factoryloader: Got keys from plugin meta data QList("eglfs")
qt.core.plugin.factoryloader: looking at "libqoffscreen.so"
qt.core.plugin.loader: Found metadata in lib /nix/store/a7vlrrzdya0qsnsbwddmgpw873xj5mdb-qtbase-6.9.1/lib/qt-6/plugins/platforms/libqoffscreen.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"offscreen"
]
},
"archlevel": 1,
"className": "QOffscreenIntegrationPlugin",
"debug": false,
"version": 395520
}
qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")
qt.core.plugin.factoryloader: checking directory path "/nix/store/9yh9ak97gn659bk4d3n411fx6c0ng7s2-python3-3.13.5/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/kcjh7w71mmhig1r419pb9i2x6li18pfx-kcc-7.5.1/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/rrbi1vsnf0ganr1mvc5366f9wq7kn682-python3.13-python-slugify-8.0.4/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/skm24agnqxgjd04nak90ckn7gr238knb-python3.13-raven-6.10.0/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/a8q0v6bk4251zk2q8aa8ydkhlp58dkxl-python3.13-charset-normalizer-3.4.2/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/bljhl5bvcka0van4f3ls99sm20719skp-python3.13-natsort-8.4.0/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/4vavm93vya3i63wmrhgfsql8mla0yqka-python3.13-distro-1.9.0/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/spa0nl1nnvmwnzrim7f7accy02jx98fw-shiboken6-6.9.1/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/y6r8p8dc030rqxxjjp676p1ix2vv3nk0-python3.13-numpy-2.3.1/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/home/teto/.cargo/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/home/teto/.cache/npm-packages/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/home/teto/.local/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/home/teto/home/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/run/wrappers/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/home/teto/.nix-profile/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/profile/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/home/teto/.local/state/nix/profile/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/etc/profiles/per-user/teto/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/var/nix/profiles/default/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/run/current-system/sw/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/k75dxigqjiqbg7i9rfkmx4m9q4fpv6h5-kitty-0.42.2/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/71zmb5blvs1w6fkiwayidzx8mbmqiyl7-imagemagick-7.1.2-0/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/z1l05nn4xyaxv25f9pvi7bkmw6jmb48c-ncurses-6.5-dev/lib/qt-6/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/nix/store/9yh9ak97gn659bk4d3n411fx6c0ng7s2-python3-3.13.5/bin/platforms" ...
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb, vnc, vkkhrdisplay, minimalegl, linuxfb, minimal, eglfs, offscreen.
zsh: abort (core dumped) kcc
Seems like programs find the libraries in qtbase:
➜ ls /nix/store/a7vlrrzdya0qsnsbwddmgpw873xj5mdb-qtbase-6.9.1/lib/qt-6/plugins/platforms/
libqeglfs.so libqlinuxfb.so libqminimal.so libqminimalegl.so libqoffscreen.so libqvkkhrdisplay.so libqvnc.so libqxcb.so
Seems like i should be looking for libqwayland.so but I couldnot find it.
Running nix-locate to find libqwayland instead showed
➜ nix-locate libqwayland
libsForQt5.qt5.qtwayland.bin 110,000 x /nix/store/pvapgkdcfifmkqz66c66chxkh5g5gizq-qtwayland-5.15.17-bin/lib/qt-5.15.17/plugins/platforms/libqwayland-egl.so
libsForQt5.qt5.qtwayland.bin 22,984 x /nix/store/pvapgkdcfifmkqz66c66chxkh5g5gizq-qtwayland-5.15.17-bin/lib/qt-5.15.17/plugins/platforms/libqwayland-generic.so
libsForQt5.qt5.qtwayland.bin 117,312 x /nix/store/pvapgkdcfifmkqz66c66chxkh5g5gizq-qtwayland-5.15.17-bin/lib/qt-5.15.17/plugins/platforms/libqwayland-xcomposite-egl.so
libsForQt5.qt5.qtwayland.bin 94,896 x /nix/store/pvapgkdcfifmkqz66c66chxkh5g5gizq-qtwayland-5.15.17-bin/lib/qt-5.15.17/plugins/platforms/libqwayland-xcomposite-glx.so
libsForQt5.qt5.qtwayland.bin 79,144 x /nix/store/pvapgkdcfifmkqz66c66chxkh5g5gizq-qtwayland-5.15.17-bin/lib/qt-5.15.17/qml/QtWayland/Client/TextureSharing/libqwaylandtexturesharing.so
libsForQt5.qt5.qtwayland.bin 37,840 x /nix/store/pvapgkdcfifmkqz66c66chxkh5g5gizq-qtwayland-5.15.17-bin/lib/qt-5.15.17/qml/QtWayland/Compositor/TextureSharingExtension/libqwaylandtexturesharingextension.so
libsForQt5.qt5.qtwayland.bin 350,408 x /nix/store/pvapgkdcfifmkqz66c66chxkh5g5gizq-qtwayland-5.15.17-bin/lib/qt-5.15.17/qml/QtWayland/Compositor/libqwaylandcompositorplugin.so
kdePackages.qtwayland.out 34,112 x /nix/store/53d22iacdvx0whdbg4qb88bbhlm6lw2f-qtwayland-6.9.0/lib/qt-6/plugins/platforms/libqwayland-egl.so
kdePackages.qtwayland.out 24,432 x /nix/store/53d22iacdvx0whdbg4qb88bbhlm6lw2f-qtwayland-6.9.0/lib/qt-6/plugins/platforms/libqwayland-generic.so
kdePackages.qtwayland.out 24,000 x /nix/store/53d22iacdvx0whdbg4qb88bbhlm6lw2f-qtwayland-6.9.0/lib/qt-6/qml/QtWayland/Compositor/libqwaylandcompositorplugin.so
kdePackages.qtwayland.debug 0 s /nix/store/008znd0fpw9apxk2yy0cgfajb8hkwibm-qtwayland-6.9.0-debug/lib/debug/libqwayland-egl.so
kdePackages.qtwayland.debug 0 s /nix/store/008znd0fpw9apxk2yy0cgfajb8hkwibm-qtwayland-6.9.0-debug/lib/debug/libqwayland-generic.so
kdePackages.qtwayland.debug 0 s /nix/store/008znd0fpw9apxk2yy0cgfajb8hkwibm-qtwayland-6.9.0-debug/lib/debug/libqwaylandcompositorplugin.so
kdePackages.full.out 0 s /nix/store/pc7cg2a3axnn7764wdrycamslk98p3z0-qt-full-6.9.0/lib/qt-6/plugins/platforms/libqwayland-egl.so
kdePackages.full.out 0 s /nix/store/pc7cg2a3axnn7764wdrycamslk98p3z0-qt-full-6.9.0/lib/qt-6/plugins/platforms/libqwayland-generic.so
libsForQt5.full.out 0 s /nix/store/83acwlc1mk76kazz6vhc91mnq2rkyjd5-qt-full-5.15.17/lib/qt-5.15.17/plugins/platforms/libqwayland-egl.so
libsForQt5.full.out 0 s /nix/store/83acwlc1mk76kazz6vhc91mnq2rkyjd5-qt-full-5.15.17/lib/qt-5.15.17/plugins/platforms/libqwayland-generic.so
libsForQt5.full.out 0 s /nix/store/83acwlc1mk76kazz6vhc91mnq2rkyjd5-qt-full-5.15.17/lib/qt-5.15.17/plugins/platforms/libqwayland-xcomposite-egl.so
libsForQt5.full.out 0 s /nix/store/83acwlc1mk76kazz6vhc91mnq2rkyjd5-qt-full-5.15.17/lib/qt-5.15.17/plugins/platforms/libqwayland-xcomposite-glx.so
My understanding is that kdePackages.qtwayland should appear in QT_PLUGIN_PATH , and opening the organicmap wrapper it does add qtwayland to it.
As I was trying to debug this, I applied my patch on master with this kcc bump #432998 and now it works. I've decided to still post this for posterity (aka future me). I will add wayland support for nixpkgs (which should be the default imo)