【发布时间】:2020-11-16 10:55:28
【问题描述】:
我使用 qt-everywhere-src-5.15.0.tar.xz 和 gcc-linaro-7.4.1-2019.02-x86_64_arm- Ubuntu 18 上的 linux-gnueabihf 工具链,用于交叉编译 Qt,尤其是 QtWebEngine。
我使用以下配置:
../qt-everywhere-src-5.15.0/configure \
-opengl es2 -device linux-rasp-pi4-v3d-g++ \
-device-option CROSS_COMPILE=~/raspi/tools/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- \
-sysroot ~/raspi/sysroot \
-prefix /usr/local/qt5pi \
-opensource -confirm-license -no-gbm \
-skip qtscript -skip qtandroidextras -skip qtcanvas3d \
-skip qtgamepad -skip qtmacextras -skip qtpurchasing \
-skip qtwinextras -skip qtx11extras \
-nomake tests -nomake examples -make libs \
-pkg-config -no-use-gold-linker -v
如果我在配置命令中包含“-skip qtwebengine”,则所有编译都可以正常运行,但是当我包含 qtwebengine 时,配置失败并出现以下警告:
WARNING: Could not find all necessary libraries for qpa-xcb support in QtWebEngine.
WARNING: QtWebEngine will not be built.
搜索了一段时间后,我知道了这个警告的原因。 QtWebEngine 使用 pkg-config,获取所需的库(例如 xtst、xcomposite、...)并获取 我的主机系统上的库,而不是使用从树莓中复制的包。
如何配置它,以使用从树莓 sysroot 复制的文件?
【问题讨论】:
标签: qt cross-compiling qtwebengine raspberry-pi4