Solved Building qt4.8.7 on Arch Linux with ALSA, D-Bus, etc.
-
On my last Arch Linux, static building qt4.8.7 missed support for ALSA, D-Bus and other necessary components, even if correctly installed/configured.
Build type: linux-g++ Architecture: x86_64 qmake vars .......... cat: .qmake.vars: No such file or directory qmake switches ......... Build .................. libs docs translations [...] Multimedia module ...... yes [...] Alsa support ........... no [...]
This was due to the preliminary tests that the configure script performs in order to decide what support can or cannot be included., by trying to compile the qt projects in the config.tests/unix directory.
After patching a few of this projects and re-running configure with some additional arguments the missing support was restored.
Here are a couple of patches for ALSA and D-Bus support, the rest being very similar:
- config.tests/unix/alsa/alsa.cpp (replaced line 43)
[...] // old: #if(!(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 10)) #if(!(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR >= 1 || SND_LIB_SUBMINOR >= 10))) [...]
- config.tests/unix/dbus/dbus.pro (added bottom lines)
[...] INCLUDEPATH += /usr/include/dbus-1.0 /usr/lib/dbus-1.0/include LIBS += -l:libdbus-1.so [...]
And here are the corresponding configure extra arguments:
[./configure -platform linux-g++ -static -release -multimedia -audio-backend -dbus-linked ...] -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -l:libdbus-1.so [...]
Shared in the hope can be useful.