如何使用 bitbake (w/o qtwebengine-core) 构建 QtPDF Build

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

我尝试在不构建完整 QtWebEngine 的情况下构建 QtPDF。根据维基页面 (https://wiki.qt.io/QtPDF_Build_Instructions),一个简单的 -no-build-qtwebengine-core 可用于不构建核心库。 对于我的 yocto 构建,我添加了一个新配方 recipes-qt/qt5/qtwebengine_%.bbappend,只有配置选项:

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

不幸的是,我以一个奇怪的错误结束:

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

有上下文:

| 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.

我也试过在食谱中添加 inherit pkgconfig 但没有效果。

有任何解决错误的想法吗?

我将转到 meta-qt5kirkstone 分支,因为它提供了 qtpdf 的特殊配方 (https://github.com/meta-qt5/meta-qt5/tree/kirkstone/recipes-qt/qt5)