qtqt5yoctobitbakeqtwebengine

How to build QtPDF Build with bitbake (w/o qtwebengine-core)


I try to build QtPDF without building the full QtWebEngine. According to the wiki page (https://wiki.qt.io/QtPDF_Build_Instructions) a simple -no-build-qtwebengine-core can be used to no build the core library. For my yocto build I added a new recipe recipes-qt/qt5/qtwebengine_%.bbappend with just the configuration option:

EXTRA_QMAKEVARS_CONFIGURE += " \
    -no-build-qtwebengine-core \
"

Unfortunately I ended with a strange error:

/image/usr/lib/pkgconfig/Qt5WebEngineCore.pc: No such file or directory

with context:

| cd pdf/ && ( test -e Makefile || xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/recipe-sysroot-native/usr/bin/qmake -o Makefile xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/git/src/plugins/imageformats/pdf/pdf.pro CONFIG+=force_debug_info QT_BUILD_PARTS-=examples QT_BUILD_PARTS-=tests 'QMAKE_CXX=arm-poky-linux-gnueabi-g++  -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -fstack-protector-strong  -D_FORTIFY_SOURCE=2  --sysroot=xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/recipe-sysroot' 'QMAKE_CC=arm-poky-linux-gnueabi-gcc  -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -fstack-protector-strong  -D_FORTIFY_SOURCE=2  --sysroot=xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/recipe-sysroot' 'QMAKE_LINK=arm-poky-linux-gnueabi-g++  -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -fstack-protector-strong  -D_FORTIFY_SOURCE=2  --sysroot=xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/recipe-sysroot' 'QMAKE_CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0=/usr/src/debug/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0                      -fdebug-prefix-map=xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0=/usr/src/debug/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0                      -fdebug-prefix-map=xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/recipe-sysroot=                      -fdebug-prefix-map=xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/recipe-sysroot-native= ' 'QMAKE_CXXFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0=/usr/src/debug/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0                      -fdebug-prefix-map=xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0=/usr/src/debug/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0                      -fdebug-prefix-map=xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/recipe-sysroot=                      -fdebug-prefix-map=xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/recipe-sysroot-native=  -fvisibility-inlines-hidden' -after ) && make -f Makefile install
| make[4]: Entering directory 'xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/build/src/plugins/imageformats/pdf'
| xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/recipe-sysroot-native/usr/bin/qmake -install qinstall -exe ../../../../plugins/imageformats/libqpdf.so xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/image/usr/lib/plugins/imageformats/libqpdf.so
| xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/recipe-sysroot-native/usr/bin/qmake -install qinstall xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/build/lib/cmake/Qt5Gui/Qt5Gui_QPdfPlugin.cmake xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/image/usr/lib/cmake/Qt5Gui/Qt5Gui_QPdfPlugin.cmake
| make[4]: Leaving directory 'xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/build/src/plugins/imageformats/pdf'
| make[3]: Leaving directory 'xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/build/src/plugins/imageformats'
| make[2]: Leaving directory 'xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/build/src/plugins'
| make[1]: Leaving directory 'xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/build/src'
| sed: can't read xxx/build/poky/build/tmp/work/armv7at2hf-neon-imx-poky-linux-gnueabi/qtwebengine/5.15.0+gitAUTOINC+f526855509_7b2f027ea8-r0/image/usr/lib/pkgconfig/Qt5WebEngineCore.pc: No such file or directory
| WARNING: exit code 2 from a shell command.

I also tried to add inherit pkgconfig to the recipe but with no effect.

Any ideas to fix the error?


Solution

  • I will move to the kirkstone branch of meta-qt5 as it provides a special recipe for qtpdf (https://github.com/meta-qt5/meta-qt5/tree/kirkstone/recipes-qt/qt5)