On Wed, May 23, 2018 at 05:14:06PM +0200, Helmut Grohne wrote: > qtmultimedia-opensource-src fails to cross build from source, because it > fails finding gstreamer and pulseaudio. Looking at its configure.json, I > see that the ones that are failing are discovered using a "type": > "pkgConfig" check. This one is implemented in the function > qtConfLibrary_pkgConfig in > /usr/lib/<triplet>/qt5/mkspecs/features/qt_configure.prf. It discovers > the pkg-config to use from the function qtConfPkgConfig in the same > file. This function does not look at the PKG_CONFIG variable, but > insists on using the PKG_CONFIG_EXECUTABLE variable. Thus the qmake > cross wrapper should also supply PKG_CONFIG_EXECUTABLE in addition to > PKG_CONFIG with the same value.
Thiago Macieira suggested an alternative approach to solving this. Rather than telling qmake to use the "right" pkg-config at runtime, we can tell it at build time. To that end we should build qtbase with a triplet-prefixed pkg-config. That actually works fairly well as the Debian packaging of pkg-config ensures that <nativetriplet>-pkg-config is a symlink to pkg-config. So just using the triplet-prefixed pkg-config always works (native and cross). Where should we reassign this bug to? I think Thiago's approach is strictly better than mine, because it ensures that qmake will always use the right pkg-config even without passing PKG_CONFIG or PKG_CONFIG_EXECUTABLE to qmake. That should be useful to people cross building with qmake without our cross wrapper. Helmut