Details
-
Bug
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
5.15, 6.2, 6.5, 6.6, dev
-
None
Description
I have quite annoying problem for all the time of using static Qt build: Linux has a lot of APIs that were replacing each other over years and there's a lot of users preferring older technologies over newer ones. For a qtbase-only (actually you have to also build qtsvg & qtwayland) build you would link the following plugins:
QXcbIntegrationPlugin QXcbEglIntegrationPlugin QXcbGlxIntegrationPlugin QWaylandIntegrationPlugin QWaylandEglPlatformIntegrationPlugin QWaylandEglClientBufferPlugin QWaylandXdgShellIntegrationPlugin QWaylandBradientDecorationPlugin QComposePlatformInputContextPlugin QIbusPlatformInputContextPlugin QJpegPlugin QGifPlugin QSvgIconPlugin QGtk3ThemePlugin QXdgDesktopPortalThemePlugin QTlsBackendOpenSSLPlugin QGlibNetworkInformationPlugin
This means your application will require both libxcb/libX11 and libwayland and the same time and you will get complains from users not having one of these libraries (e.g. not having libwayland while having libxcb/libX11).
This also means application will require gtk3 despite it can work without it.
This also requires libOpenGL, libEGL, and libGLX despite applciations might work without any of those libraries (Qt can fallback from GLX to EGL and if none is working the application can fallback to software renderer).
The modern qtmultimedia seem to no longer have alsa/pulseaudio in plugins (so apparently valid in shared build as well) yet it still has the problem that the application will require both alsa and pulseaudio when building with both to cover more systems. As a result, you will get rant from users not having pulseaudio libraries.
Qt should ensure that all plugin dependencies are optional in runtime when linking statically and should also have dependencies like alsa & pulseaudio optional. So the application developer can build Qt with maximum features and end users using one of technologies don't have to have libraries for other technologies installed so the application can work on as wide range of systems as possible. For plugins, this means that they either must use QLibrary for any dependencies or there should be some magic system making plugins' dependencies to go through QLibrary when building statically (something like https://github.com/yugr/Implib.so + checks in plugin's create function to continue fallback if couldn't load?).
I'm quite tired getting reports and then explaining to users that it's not me who requires X11/Wayland/GTK3/ALSA/PulseAudio/OpenGL/EGL/GLX but Qt and I can't do anything with that without huge Qt patching. It's also quite rude that Qt uses LoadLibrary on Windows and weak symbols on macOS to work on older systems (even in static builds!) yet requires everything on Linux.
Reporting this as a bug because I'm getting real bug reports named like 'Application doesn't launch on my system' due to this.