前言

需要对qt进行交叉编译同时也要依赖web模块,尝试编译了几次编程过程总体没报错但是webengine模块都没有被成功构建,于是在源码包搜了下编译条件.

必备条件

首先看webengine的构建条件

首先检测
***QtGui 这个都有吧就不解释了
报错信息:QtWebEngine requires QtGui


src/3rdparty/chromium,这个都源码包里也有
报错信息:Submodule qtwebengine-chromium does not exist. Run ‘git submodule update --init’.


然后检测构建路径的合法性
报错信息:QtWebEngine cannot be built in a path that contains whitespace characters.


检查平台是否支持(支持的平台:Windows,Linux,macOS)
报错信息:Unknow error. Platform unspported.


构建此模块需要使用pkg-config,在编译qt的时候加上参数-pkg-config,交叉编译时会必须指定-sysroot
报错信息:pkg-config is required.


官方资料:

On Linux, Clang or GCC version 5 or later is required. Supported configurations are linux-g++ and linux-clang. Qt WebEngine requires
pkg-config to detect most of its dependencies. The following
pkg-config files are required: dbus-1 fontconfig If Qt was configured
for xcb, the following pkg-config files are also required: libdrm
xcomposite xcursor xi xrandr xscrnsaver xtst Further, development
packages for khr and libcap need to be installed.

确保有32位设备的环境,否则使用-no-webengine-v8-snapshot参数编译
报错信息:“V8 snapshot cannot be built. Most likely, the 32-bit host compiler does not work.”
"Please make sure you have 32-bit devel environment installed, or "
“configure webengine with ‘-no-webengine-v8-snapshot’”


需要安装gperf,bison,flex,python2
不需要交叉编译,直接安装即可
报错信息:
“Required gperf could not be found.”
“Required bison could not be found.”
“Required flex could not be found.”
“A suitable version of python2 could not be found.”


再次检测pkg-config,确保已经安装了pkg-config
报错信息:Host pkg-config is required


需要交叉编译glibc,
报错信息:“A suitable version of libc could not be found. See:https://sourceware.org/bugzilla/show_bug.cgi?id=14898”)


需要khr,即需要mesa库
报错信息:“khronos development headers appear to be missing (mesa/libegl1-mesa-dev)”


另外,还需要以下3个库
交叉编译dbus
交叉编译fontconfig
交叉编译nss
报错信息:“A suitable version of $$package could not be found.”


最后,可能还需要xcb库

报错信息:"“Could not find all necessary libraries for qpa-xcb support”


GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:1 个月前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐