I have a Qt 6 application. Amongst others, it also uses Qt multimedia (for audio output).
I’ve tried to keep things simple and rely upon the kde-neon-6 extension in order to incorporate Qt. But it seems that doesn’t necessarily imply many of the extension libraries, and there’s no other easy way to include them.
If I declare only:
base: core22
...
extensions:
- kde-neon-6
… and nothing else specific in build-packages or stage-packages then my snap builds. If I run objdump -T on the resulting binary then I see, amongst other things:
0000000000000000 DO *UND* 0000000000000000 (Qt_6.8) qt_version_tag
Clearly that’s the version of Qt being implied by kde-neon-6. But trying to run the snap gives:
/snap/[X]/x19/usr/local/bin/[X]: error while loading shared libraries: libQt6OpenGLWidgets.so.6: cannot open shared object file: No such file or directory
And if I hence throw a quick ldd at it then the full list of ‘not found’ dependencies is:
libQt6OpenGLWidgets.so.6 => not found
libQt6Multimedia.so.6 => not found
libQt6Widgets.so.6 => not found
libQt6Gui.so.6 => not found
libQt6Core.so.6 => not found
If I just add those additional packages to my snap, e.g.
stage-packages:
- libqt6core6
- libqt6gui6
- libqt6widgets6
- libqt6openglwidgets6
- libqt6multimedia6
… then that’s where the qt_version_tag becomes problematic. All of those packages are of Qt version 6.2. So now when I attempt to launch my snap I proceed only as far as:
/snap/[x]/x20/usr/local/bin/[x]: /snap/[x]/x20/usr/lib/aarch64-linux-gnu/libQt6Core.so.6: version `Qt_6.8' not found (required by /snap/[x]/x20/usr/local/bin/[x])
Or similar for whatever subset of the additional Qt libraries I stage with.
I’m not confident enough to say that my manner of investigation or my diagnosis is correct, but as above it seems like kde-neon-6 includes Qt 6.8 but not the OpenGL widgets, amongst others. Furthermore those don’t currently seem to be packaged for immediate use as a dependency, as the apt versions are still only of Qt 6.2.
So I think I’ve hit a wall. Am I right?