【研究Qt webengine 模块编译】linux 交叉编译qt5.12的webengine模块成功的条件

简介: 【研究Qt webengine 模块编译】linux 交叉编译qt5.12的webengine模块成功的条件

前言

需要对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”

目录
相关文章
|
6天前
|
Linux 开发工具 C语言
Linux 安装 gcc 编译运行 C程序
Linux 安装 gcc 编译运行 C程序
26 0
|
7天前
|
Linux 编译器 Android开发
FFmpeg开发笔记(九)Linux交叉编译Android的x265库
在Linux环境下,本文指导如何交叉编译x265的so库以适应Android。首先,需安装cmake和下载android-ndk-r21e。接着,下载x265源码,修改crosscompile.cmake的编译器设置。配置x265源码,使用指定的NDK路径,并在配置界面修改相关选项。随后,修改编译规则,编译并安装x265,调整pc描述文件并更新PKG_CONFIG_PATH。最后,修改FFmpeg配置脚本启用x265支持,编译安装FFmpeg,将生成的so文件导入Android工程,调整gradle配置以确保顺利运行。
25 1
FFmpeg开发笔记(九)Linux交叉编译Android的x265库
|
1月前
|
开发框架 Unix Linux
深度探索:Qt CMake工程编译后的自动打包策略
深度探索:Qt CMake工程编译后的自动打包策略
33 0
|
1月前
|
存储 Linux 编译器
Linux 交叉编译第三方库需要设置的环境变量
Linux 交叉编译第三方库需要设置的环境变量
27 0
|
5天前
|
Linux 开发工具 Android开发
Docker系列(1)安装Linux系统编译Android源码
Docker系列(1)安装Linux系统编译Android源码
7 0
|
20天前
|
Linux 计算机视觉
Linux交叉编译opencv并移植ARM端
通过以上步骤,你可以在Linux上交叉编译OpenCV,并将生成的库文件和头文件移植到ARM平台上,从而在ARM上使用OpenCV。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
37 0
|
27天前
|
编译器
正点原子IMX6ULL-安装交叉编译器、编译tslib触摸屏库、编译arm环境qt源代码
正点原子IMX6ULL-安装交叉编译器、编译tslib触摸屏库、编译arm环境qt源代码
|
1月前
|
开发框架 算法 Linux
【知识点回顾 】Qt信号槽与Linux信号处理 的处理机制 深入探讨
【知识点回顾 】Qt信号槽与Linux信号处理 的处理机制 深入探讨
36 0
|
1月前
|
监控 C++
C++ Qt开发:QProcess进程管理模块
Qt是一个跨平台的C++图形库,简化了窗体应用开发,支持通过拖放组件提升效率。本章节关注`QProcess`组件,它用于控制和管理进程,例如执行命令、运行可执行文件及与外部进程通信。`QProcess`提供多种方法如`start`、`waitForStarted`和`waitForFinished`等,实现启动、监控和交互。示例展示了如何使用`QProcess`获取系统进程和信息,通过`tasklist`和`systeminfo`命令,并将结果展示在`QTreeWidget`中。
30 0
C++ Qt开发:QProcess进程管理模块
|
1月前
|
SQL XML API
Qt C++ 模块 描述列表【从Qt 官网 6.5 版本翻译】
Qt C++ 模块 描述列表【从Qt 官网 6.5 版本翻译】
13 0