After update to 23.11 pyside2 in buildFHSEnv broke

i had a FHS setup for python development, it used PySide2 installed in a venv,
everything worked find, but with swtich to 23.11 pyside2 does not work any more, giving me

qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

i’ve tried recreating venv, but same problem
Anyone has any idea what change in 23.11 might have caused it?

running with QT_DEBUG_PLUGINS=1 i got some more info:

QFactoryLoader::QFactoryLoader() checking directory path "/nix/store/50kabpj0s79040a42b7jj2dxn85wmbfd-python3-3.10.13/bin/platforms" ...
Cannot load library /nix/store/c4y7sclfd3pckciwn69v5w7srviix05g-qtwayland-5.15.11-bin/lib/qt-5.15.11/plugins/platforms/libqwayland-generic.so: (/nix/store/nhf6kxj75m9bwq2xc6bwixn9pjj1qqvg-qtwayland-5.15.11/lib/l
ibQt5WaylandClient.so.5: undefined symbol: _ZTI27QPlatformServiceColorPicker, version Qt_5_PRIVATE_API)
QLibraryPrivate::loadPlugin failed on "/nix/store/c4y7sclfd3pckciwn69v5w7srviix05g-qtwayland-5.15.11-bin/lib/qt-5.15.11/plugins/platforms/libqwayland-generic.so" : "Cannot load library /nix/store/c4y7sclfd3pckci
wn69v5w7srviix05g-qtwayland-5.15.11-bin/lib/qt-5.15.11/plugins/platforms/libqwayland-generic.so: (/nix/store/nhf6kxj75m9bwq2xc6bwixn9pjj1qqvg-qtwayland-5.15.11/lib/libQt5WaylandClient.so.5: undefined symbol: _ZT
I27QPlatformServiceColorPicker, version Qt_5_PRIVATE_API)"
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
Cannot load library /nix/store/p15zcalsmqmay3vqq3dd6n7a8pxs78nv-qtbase-5.15.11-bin/lib/qt-5.15.11/plugins/platforms/libqxcb.so: (/nix/store/p15zcalsmqmay3vqq3dd6n7a8pxs78nv-qtbase-5.15.11-bin/lib/qt-5.15.11/plug
ins/platforms/../../../../../0acd4cnpgm06lhq4v95lw5qy4bipnha1-qtbase-5.15.11/lib/libQt5XcbQpa.so.5: undefined symbol: _ZTI27QPlatformServiceColorPicker, version Qt_5_PRIVATE_API)
QLibraryPrivate::loadPlugin failed on "/nix/store/p15zcalsmqmay3vqq3dd6n7a8pxs78nv-qtbase-5.15.11-bin/lib/qt-5.15.11/plugins/platforms/libqxcb.so" : "Cannot load library /nix/store/p15zcalsmqmay3vqq3dd6n7a8pxs78
nv-qtbase-5.15.11-bin/lib/qt-5.15.11/plugins/platforms/libqxcb.so: (/nix/store/p15zcalsmqmay3vqq3dd6n7a8pxs78nv-qtbase-5.15.11-bin/lib/qt-5.15.11/plugins/platforms/../../../../../0acd4cnpgm06lhq4v95lw5qy4bipnha1
-qtbase-5.15.11/lib/libQt5XcbQpa.so.5: undefined symbol: _ZTI27QPlatformServiceColorPicker, version Qt_5_PRIVATE_API)"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

i guess, the reason is that paths in QT_PLUGIN_PATH lead to some linking errors, because without that variable pyside seem to work fine

not sure if there is something new in this variable in 23.11, or it just so happened it was not conflicting in 23.05 - have not investigated that yet

if anyone has any more insight - it is very welcomed

1 Like

:wave: Heya @sirphobos!

Just a quick headup following your thread, I’m not an Nixos user but I got a similar issue with a QT based app with my OpenMandriva box. :sweat:

If your QT5 and xcb / wayland packages were properly installed,
adjusting one or multiple environment variables should help :sunglasses:

  • QT_PLUGIN_PATH
  • QT_QPA_PLATFORM
  • QT_QPA_PLATFORM_PLUGIN_PATH
  • etc…

As you suggested modifying the QT_PLUGIN_PATH was the solution that works for me. :100:
I appreciate a lot, thank you so much for the hint.

Here are a few other posts that might be helpful in your case:

Have a wonderful day, and wish you best of luck for your debug :crossed_fingers:

Regards,

Pierre-Henri aka Peter :surfing_man: