【问题标题】:Cross compile QtWebEngine for Raspberry Pi 4为 Raspberry Pi 4 交叉编译 QtWebEngine
【发布时间】: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


    【解决方案1】:

    如果似乎唯一缺少的库是 xtst、xcomposite、xi 等。这些库位于 /usr/share 中的 Pi 上。所以你的 sysroot 也必须同步那个文件夹。

    【讨论】:

    • 是的,你是对的。如果我将 /usr/share 文件夹同步到我的 sysroot,则配置运行良好,并且应该包含 QtWebEngine。但是如果我继续'make',最后我得到了错误,我在日志中发现了以下错误:“arm-> linux-gnueabihf-g++: internal compiler error: Killed (program cc1plus)”
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-08
    • 1970-01-01
    • 2012-07-19
    相关资源
    最近更新 更多