Qt Cross Raspi - How to add support for libinput and fontconfig?
-
I'm trying to cross compile Qt for Raspberry Pi.
I'm in the step of running
./configureto prepare the files for build:./configure -release -opengl es2 -device linux-rasp-pi3-g++ \ -device-option CROSS_COMPILE=~/qt-cross-raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- \ -sysroot ~/qt-cross-raspi/sysroot -opensource -confirm-license -make libs \ -prefix /usr/local/qt5 -extprefix ~/qt-cross-raspi/qt5raspi \ -hostprefix ~/qt-cross-raspi/qt5 -v -no-use-gold-linkerBut, as you can see in the excerpt of
configure.summarybelow,libinputandfontconfigare disabled.Build options: Qt Gui: ... FreeType ............................... yes Using system FreeType ................ no ... Fontconfig ............................. no Features used by QPA backends: ... libinput ............................... no ...If I add the options
-fontconfig -libinputtoconfigure, then it adds the following to the summary:ERROR: Feature 'fontconfig' was enabled, but the pre-condition '!config.win32 && features.system-freetype && libs.fontconfig' failed. ERROR: Feature 'libinput' was enabled, but the pre-condition 'features.libudev && libs.libinput' failed.Rasbian already have the following freetype, fontconfig and libinput packages installed:
libfreetype6-dev is already the newest version (2.9.1-3). fontconfig is already the newest version (2.13.1-2). libinput-bin is already the newest version (1.12.6-2). libinput-dev is already the newest version (1.12.6-2). libinput10 is already the newest version (1.12.6-2).So, I don't know what I'm doing wrong. Are there dependencies I'm missing? I misconfigured something?
-
The option
-force-pkg-configsolved my problem.First I've needed to
unset PKG_CONFIG_PATH, as described in this page.Then just ran:
./configure -release -opengl es2 -device linux-rasp-pi3-g++ \ -device-option CROSS_COMPILE=~/qt-cross-raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- \ -sysroot ~/qt-cross-raspi/sysroot -opensource -confirm-license -make libs \ -prefix /usr/local/qt5 -extprefix ~/qt-cross-raspi/qt5raspi \ -hostprefix ~/qt-cross-raspi/qt5 -v -no-use-gold-linker -force-pkg-configAnd
configure.summarynow showsfontconfigandlibinputenabled:Build options: Qt Gui: ... FreeType ............................... yes Using system FreeType ................ yes ... Fontconfig ............................. yes Features used by QPA backends: ... libinput ............................... yes ...