Centos源码安装QT5.9

xingyun86 2023-9-14 905

Centos源码安装QT5.9

yum install -y \
	libXinerama-devel \
	libXrandr-devel \
	libXrender-devel \
	libXt-devel \
	libXv-devel \
	libmng \
	libpng-devel \
	pciutils-devel \
	libuuid-devel \
	nss-devel \
	mesa-libGLU \
	libXtst-devel \
	mesa-libGLU-devel \
	pulseaudio-libs-devel \
	systemd-devel \
	libcap-devel \
	alsa-lib-devel \
	flex \
	bison \
	ruby \
	expat-devel \
	fontconfig-devel \
	freetype-devel \
	kde-filesystem \
	libICE-devel \
	libSM-devel \
	libXcursor-devel \
	libXft-devel \
	libXi-devel \
	unixODBC \
	unixODBC-devel \
	zlib-devel \
	gperf \
	libXcomposite-devel \
	dbus-devel \
	ninja-build \
	snappy-devel \
	mesa-libEGL-devel \
	libvpx-devel \
	libgcrypt-devel \
	libgcrypt
mkdir build && cd build 
../configure \
	--prefix=$PWD/out \
	-opensource \
	-confirm-license \
	-release \
	-nomake examples
make -j
make install

Debian源码安装

1、在Ubuntu系统中编译安装QtWebEngine 5.13.0需要安装的依赖包
sudo apt-get -y install bison build-essential gperf flex ruby python libasound2-dev libbz2-dev libcap-dev libcups2-dev libdrm-dev libegl1-mesa-dev libgcrypt11-dev libnss3-dev libpci-dev libpulse-dev lilibudev-dev libxtst-dev gyp ninja-build
2、在Ubuntu 16.04系统中编译安装QtWebEngine 5.13.0需要安装的附加依赖包
sudo apt-get -y install libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libfontconfig1-dev libxss-dev libsrtp0-dev libwebp-dev libjsoncpp-dev libopus-dev libminizip-dev libavutil-dev libavformat-dev libavcodec-dev libevent-dev
3、在Fedroa系统中编译安装QtWebEngine 5.13.0需要安装的依赖包
sudo yum -y install "qt5-*" mesa-libEGL-devel libgcrypt-devel libgcrypt pciutils-devel nss-devel libXtst-devel gperf cups-devel pulseaudio-libs-devel libgudev1-devel systemd-devel libcap-devel alsa-lib-devel flex bison ruby
4、在Ubuntu 18.04系统中编译安装QtWebEngine 5.13.0需要安装的依赖包
apt-get -y install gcc* xcb* libxcb* mesa* gperf flex bison libnss3-dev ruby dbus* qt5-default libclang* libx11* libxext* libxtst* libxkbcommon* libXrender* libgcrypt* pciutils* nss* cups* libgudev1* system* libcap* ruby dbus libXrandr* libXcomposite* libXcursor* dbus* fontconfig* pulseaudio* alsa* *opengl* freeglut* libglew* d-bus* at-spi2* libdbus* libqt5multimedia5* libclipper* perl*
5、在CentOS 7.*系统中编译安装QtWebEngine 5.13.0需要安装的依赖包
yum -y install qt5-* gcc gcc-c++ mesa* libglvnd-opengl freeglut libGLEW xcb* libxcb* libX11-devel libXext-devel libXtst-devel libxkbcommon-devel libXrender libXrender-devel libgcrypt-devel libgcrypt pciutils-devel nss-devel cups-devel pulseaudio-libs-devel libgudev1-devel systemd-devel libcap-devel alsa-lib-devel ruby dbus libXrandr-devel libXcomposite-devel libXcursor-devel dbus-devel fontconfig-devel
sudo yum install mesa-libGL-devel mesa-libGLU-devel freeglut-devel
sudo yum install libxcb libxcb-devel libXrender libXrender-devel xcb-util-wm xcb-util-wm-devel xcb-util xcb-util-devel xcb-util-image xcb-util-image-devel xcb-util-keysyms xcb-util-keysyms-devel
sudo yum install -y libglvnd-opengl freeglut libGLEW libX11-devel libXext-devel libXtst-devel libxkbcommon-devel libXrender libXrender-devel libgcrypt-devel libgcrypt pciutils-devel nss-devel cups-devel pulseaudio-libs-devel libgudev1-devel systemd-devel libcap-devel alsa-lib-devel ruby dbus libXrandr-devel libXcomposite-devel libXcursor-devel dbus-devel fontconfig-devel	
sudo yum install -y \
mesa-demos \
mesa-dri-drivers \
mesa-dri-drivers \
mesa-filesystem \
mesa-filesystem \
mesa-khr-devel \
mesa-khr-devel \
mesa-libEGL \
mesa-libEGL \
mesa-libEGL-devel \
mesa-libEGL-devel \
mesa-libGL \
mesa-libGL \
mesa-libGL-devel \
mesa-libGL-devel \
mesa-libGLES \
mesa-libGLES \
mesa-libGLES-devel \
mesa-libGLES-devel \
mesa-libGLU \
mesa-libGLU \
mesa-libGLU-devel \
mesa-libGLU-devel \
mesa-libGLw-devel \
mesa-libGLw-devel \
mesa-libOSMesa \
mesa-libOSMesa \
mesa-libOSMesa-devel \
mesa-libOSMesa-devel \
mesa-libgbm \
mesa-libgbm \
mesa-libgbm-devel \
mesa-libgbm-devel \
mesa-libglapi \
mesa-libglapi \
mesa-libxatracker \
mesa-libxatracker \
mesa-libxatracker-devel \
mesa-libxatracker-devel \
mesa-private-llvm \
mesa-private-llvm \
mesa-vdpau-drivers \
mesa-vdpau-drivers \
mesa-vulkan-drivers \
mesa-vulkan-drivers \
llvm-private \
llvm-private \
mesa-libGLw \
mesa-libGLw \
mesa-private-llvm-devel \
mesa-private-llvm-devel
sudo yum install -y dbus-glib dbus-glib-devel dbus-devel glib-networking \
libXcomposite-devel \
libXcomposite \
libXcursor-devel \
libXcursor \
xcb-util-image \
libXrandr \
libXrandr-devel \
libXtst \
libXtst-devel \
bison-devel \
bison-devel bison bison-runtime
yum install -y \
	libXinerama-devel \
	libXrandr-devel \
	libXrender-devel \
	libXt-devel \
	libXv-devel \
	libmng \
	libpng-devel \
	pciutils-devel \
	libuuid-devel \
	nss-devel \
	mesa-libGLU \
	libXtst-devel \
	mesa-libGLU-devel \
	pulseaudio-libs-devel \
	systemd-devel \
	libcap-devel \
	alsa-lib-devel \
	flex \
	bison \
	ruby \
	expat-devel \
	fontconfig-devel \
	freetype-devel \
	kde-filesystem \
	libICE-devel \
	libSM-devel \
	libXcursor-devel \
	libXft-devel \
	libXi-devel \
	unixODBC \
	unixODBC-devel \
	zlib-devel \
	gperf \
	libXcomposite-devel \
	dbus-devel \
	ninja-build \
	snappy-devel \
	mesa-libEGL-devel \
	libvpx-devel \
	libgcrypt-devel \
	libgcrypt
mkdir build && cd build 
../configure \
	-static \
	--prefix=$PWD/out \
	-opensource \
	-confirm-license \
	-release \
	-nomake examples
	
//ARM
../configure \
	-xplatform linux-aarch64-gnu-g++ \
	--prefix=$PWD/out \
	-opensource \
	-confirm-license \
	-release \
	-no-opengl \
	-nomake examples \	
	-sysroot /home/user/sysroot-glibc-linaro-2.25-2019.12-aarch64-linux-gnu \
	-pkg-config
make -j
make install 
必备条件
首先看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


×
打赏作者
最新回复 (0)
只看楼主
全部楼主
返回