我尝试在不构建完整的QtPDF的情况下构建QtWebEngine。根据wiki页面(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添加到菜谱中,但没有效果。
有什么办法纠正这个错误吗?
发布于 2022-05-05 11:32:04
我将转到meta-qt5的meta-qt5分支,因为它提供了qtpdf (https://github.com/meta-qt5/meta-qt5/tree/kirkstone/recipes-qt/qt5)的特殊配方。
https://stackoverflow.com/questions/71985931
复制相似问题