Problems with deps, snap core22 and qt6

Update, some interesting things.

Now it runs from a fresh installation of Ubuntu 22.04 LTS server minimal.

Xorg + budgie-desktop minimal it runs, mir + egmde it runs. But it won’t run wayland + weston.

The problem of the path QT_QPA_PLATFORM_PLUGIN_PATH remains. I found a solution from Falkon KDE’s snapcraft. Without the environment variable it doesn’t run.

In a similar way:

environment:
  QT_PLUGIN_PATH: "$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/qt6/plugins"

Note: wayland + weston it runs when is normally compiled, but not as snap build.

In the log there is also an error concerning swrast_dri.so, and the usual canberra-gtk-module soft error when it starts.

libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast

I also have this problem with icons in file dialog, without icons it crashes abruptly. I’m reading this post: Freedesktop icons missing