飞腾ARM UOS编译Qt 5.15.2源码及Qt Creator

这篇具有很好参考价值的文章主要介绍了飞腾ARM UOS编译Qt 5.15.2源码及Qt Creator。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

背景

在 ARM 架构下,UOS 系统,需要使用 Qt 5.15.2 版本环境,所以只能通过源码编译的形式进行 Qt 环境的部署。

软硬件相关信息:

  • 处理器: 飞腾 FT-2000 4 核
  • 制造商: Phytium
  • 架构: aarch 64
  • 家族: ARMv 8
  • 系统:UOS V 20 1060
  • 内核:4.19.0-arm 64-desktop

下载 Qt、Qtcreator 源码

这里选择的是国内的镜像地址进行下载源码。

Qt 5.15.2: http://mirrors.ustc.edu.cn/qtproject/archive/qt/5.15/5.15.2/single/

Qt Creator: http://mirrors.ustc.edu.cn/qtproject/archive/qtcreator/

需要注意的是,QtCreator 的版本要和 Qt 大版本对应。比如,Qtcreator 11 版本采用 Qt 6 编译,如果你下载的 Qt 源码是 Qt 5 版本的,那么编译时,会找不到 Qt 6 相关的 cmake 文件,无法进行编译。是否适合当前版本,可以通过 qt-creator-opensource-src 里的 README.md 中介绍确定对应的版本。

下载完成后,使用 tar 命令进行解压

tar -zxvf qt-everywhere-src-5.15.2.tar.xz
tar -zxvf qt-creator-opensource-src-7.0.2.tar.gz

环境配置

安装 Qt 所需的依赖:

sudo apt install build-essential libgl1-mesa-dev libxkbcommon-dev libnss3-dev libdbus-1-dev gperf flex bison

安装 xcb 相关:

sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev

这一步比较关键,因为涉及到编译之后有 libqxcb.so,如果缺失会导致错误。

如果需要使用到 QWebEngine 模块,那么需要安装以下依赖库:

sudo apt install libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libxtst-dev libxss-dev libdbus-1-dev libevent-dev libfontconfig1-dev libcap-dev libpulse-dev libudev-dev libpci-dev libnss3-dev libasound2-dev libegl1-mesa-dev gperf bison nodejs

编译 Qt

进入解压后的 qt-everywhere-src-5.15.2 目录,开始配置:

./configure -prefix /home/leo/Qt -opensource -confirm-license -nomake examples -release
  • -prefix /home/leo/Qt: 指定 Qt 的安装路径
  • -opensource: 指定使用开源版本
  • -nomake examples: 不编译 examples
  • -release: release 模式

这个步骤会检查相关的库是否存在,若不存在则将缺少的安装。

安装完缺失的依赖库后,记得先删除 config.cache 缓存文件。

或者使用脚本运行,创建 run.sh 脚本:

#! /bin/bash
./configure -prefix /home/leo/Qt/5 \
-opensource -confirm-license \
-nomake examples \
-nomake tests \
-release \
-skip qt3d \
-skip qtcharts \
-skip qtandroidextras \
-skip qtlocation \
-skip qtmultimedia \
-skip qtsensors \
-skip qtserialbus \
-skip qtserialport \
-skip qtwayland

可以指定跳过编译哪些模块以加快编译速度

开始编译:

make

此过程示机器性能不同,时长不同。

在编译过程中,可能会遇到一些依赖问题,需要根据实际情况进行解决。

当编译完成后,即可安装了

make install

输出信息:

cd doc/src/cmake/ && ( test -e Makefile || /data/home/leo/Documents/qt-everywhere-src-5.15.2/qtbase/bin/qmake -o Makefile /data/home/leo/Documents/qt-everywhere-src-5.15.2/qtdoc/doc/src/cmake/cmake.pro ) && make -f Makefile install
make[2]: 进入目录“/data/home/leo/Documents/qt-everywhere-src-5.15.2/qtdoc/doc/src/cmake”
make[2]: 对“install”无需做任何事。
make[2]: 离开目录“/data/home/leo/Documents/qt-everywhere-src-5.15.2/qtdoc/doc/src/cmake”
cd doc/ && ( test -e Makefile || /data/home/leo/Documents/qt-everywhere-src-5.15.2/qtbase/bin/qmake -o Makefile /data/home/leo/Documents/qt-everywhere-src-5.15.2/qtdoc/doc/doc.pro ) && make -f Makefile install
make[2]: 进入目录“/data/home/leo/Documents/qt-everywhere-src-5.15.2/qtdoc/doc”
make[2]: 对“install”无需做任何事。
make[2]: 离开目录“/data/home/leo/Documents/qt-everywhere-src-5.15.2/qtdoc/doc”
make[1]: 离开目录“/data/home/leo/Documents/qt-everywhere-src-5.15.2/qtdoc”

会安装到 /home/leo/Qt 路径下,安装完之后可查看结果。

编译 Qt Creator

编译 Qt Creator 则可使用 cmake 工具进行编译:

cd qt-creator-opensource-src
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/home/leo/Qt -DCMAKE_INSTALL_PREFIX=/home/leo/Qt/Tool/QtCreator
cmake --build build --target=install

输出信息:

[100%] Building CXX object src/plugins/android/CMakeFiles/Android.dir/avddialog.cpp.o
[100%] Building CXX object src/plugins/android/CMakeFiles/Android.dir/avdmanageroutputparser.cpp.o
[100%] Building CXX object src/plugins/android/CMakeFiles/Android.dir/certificatesmodel.cpp.o
[100%] Building CXX object src/plugins/android/CMakeFiles/Android.dir/createandroidmanifestwizard.cpp.o
[100%] Building CXX object src/plugins/android/CMakeFiles/Android.dir/javaeditor.cpp.o
[100%] Building CXX object src/plugins/android/CMakeFiles/Android.dir/javaindenter.cpp.o
[100%] Building CXX object src/plugins/android/CMakeFiles/Android.dir/javalanguageserver.cpp.o
[100%] Building CXX object src/plugins/android/CMakeFiles/Android.dir/javaparser.cpp.o
[100%] Building CXX object src/plugins/android/CMakeFiles/Android.dir/splashscreencontainerwidget.cpp.o
[100%] Building CXX object src/plugins/android/CMakeFiles/Android.dir/splashscreenwidget.cpp.o
[100%] Building CXX object src/plugins/android/CMakeFiles/Android.dir/Android_autogen/EWIEGA46WW/qrc_android.cpp.o                                                                                                          
[100%] Linking CXX shared library ../../../lib/qtcreator/plugins/libAutoTest.so
[100%] Built target AutoTest
[100%] Linking CXX shared library ../../../lib/qtcreator/plugins/libAndroid.so
[100%] Built target Android


-- Installing: /home/leo/Qt/Tool/QtCreator/share/qtcreator/translations/qtcreator_hr.qm
-- Installing: /home/leo/Qt/Tool/QtCreator/share/qtcreator/translations/qtcreator_ja.qm
-- Installing: /home/leo/Qt/Tool/QtCreator/share/qtcreator/translations/qtcreator_pl.qm
-- Installing: /home/leo/Qt/Tool/QtCreator/share/qtcreator/translations/qtcreator_ru.qm
-- Installing: /home/leo/Qt/Tool/QtCreator/share/qtcreator/translations/qtcreator_sl.qm
-- Installing: /home/leo/Qt/Tool/QtCreator/share/qtcreator/translations/qtcreator_uk.qm
-- Installing: /home/leo/Qt/Tool/QtCreator/share/qtcreator/translations/qtcreator_zh_CN.qm
-- Installing: /home/leo/Qt/Tool/QtCreator/share/qtcreator/translations/qtcreator_zh_TW.qm
-- Installing: /home/leo/Qt/Tool/QtCreator/share/applications
-- Installing: /home/leo/Qt/Tool/QtCreator/share/applications/org.qt-project.qtcreator.desktop
-- Installing: /home/leo/Qt/Tool/QtCreator/share/metainfo/org.qt-project.qtcreator.appdata.xml

看到以上信息,则表示安装完成。

leo@leo-PC:/data/home/leo/Qt/Tool/QtCreator/bin$ ./qtcreator
./qtcreator: relocation error: /data/home/leo/Qt/Tool/QtCreator/bin/../lib/qtcreator/libUtils.so.7: symbol _ZNK11QPushButton9hitButtonERK6QPoint version Qt_5 not defined in file libQt5Widgets.so.5 with link time reference

前往安装目录运行会提示以上错误。

配置 Qt 环境:

leo@leo-PC:~$ vim ~/.bashrc 

在尾部加入以下内容:

export QTDIR=/home/leo/Qt/5.15.2
export PATH=$QTDIR/bin:$PATH
export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins/platforms
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH

刷新,qmake 测试

leo@leo-PC:~$ source ~/.bashrc 
leo@leo-PC:~$ qmake -v
QMake version 3.1
Using Qt version 5.15.2 in /home/leo/Qt/5.15.2/lib

能看到输出的版本信息,则说明配置成功。

错误解决

WARNING: gperf is required to build QWebEngine.

解决方法:

sudo apt-get install gperf
WARNING: flex is required to build QWebEngine.

解决方法:

sudo apt-get install flex
WARNING: bison is required to build QWebEngine.

解决方法:

sudo apt-get install bison
XCB Util >= 0.3.9... no

https://www.x.org/releases/individual/xcb/ 下载大于 0.3.9 的版本,我这里下载的是 xcb-util-0.4.1. tar. gz,解压并进入文件夹

./configure 
make 
sudo make install

再次执行 Qt 的 configure 命令,可以看到变成了 Yes

编译错误处理

Package nss was not found in the pkg-config search path.
Perhaps you should add the directory containing `nss.pc'
to the PKG_CONFIG_PATH environment variable
No package 'nss' found
Could not run pkg-config.

解决方法:

sudo apt install libnss3-dev
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code.
    pkgresult = exec_script(pkg_config_script, args, "value")
                ^----------
Current dir: /data/home/leo/Documents/qt-everywhere-src-5.15.2/qtwebengine/src/pdf/release/                                                                                                                          
Command: /usr/bin/python2 /data/home/leo/Documents/qt-everywhere-src-5.15.2/qtwebengine/src/3rdparty/chromium/build/config/linux/pkg-config.py -p pkg-config dbus-1
Returned 1.
stderr:

Package dbus-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `dbus-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dbus-1' found
Could not run pkg-config.

See //build/config/linux/dbus/BUILD.gn:12:1: whence it was called.
pkg_config("dbus") {
^-------------------
See //dbus/BUILD.gn:45:22: which caused the file to be included.                                                                                                                                                     
  public_configs = [ "//build/config/linux/dbus" ]
                     ^--------------------------
Project ERROR: GN run error!  

解决方法:

sudo apt install libdbus-1-dev
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code.
    pkgresult = exec_script(pkg_config_script, args, "value")
                ^----------
Current dir: /data/home/leo/Documents/qt-everywhere-src-5.15.2/qtwebengine/src/pdf/release/                                                                                                                          
Command: /usr/bin/python2 /data/home/leo/Documents/qt-everywhere-src-5.15.2/qtwebengine/src/3rdparty/chromium/build/config/linux/pkg-config.py -p pkg-config xkbcommon
Returned 1.
stderr:

Package xkbcommon was not found in the pkg-config search path.
Perhaps you should add the directory containing `xkbcommon.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xkbcommon' found
Could not run pkg-config.

See //ui/events/keycodes/BUILD.gn:12:3: whence it was called.
  pkg_config("xkbcommon") {
  ^------------------------
See //ui/events/ozone/layout/BUILD.gn:42:15: which caused the file to be included.                                                                                                                                   
    deps += [ "//ui/events/keycodes:xkb" ]
              ^-------------------------
Project ERROR: GN run error!            

解决方法:

sudo apt install libxkbcommon-dev
FAILED: obj/third_party/libjpeg_turbo/simd/jidctfst-neon.o 
/usr/bin/gcc -MMD -MF obj/third_party/libjpeg_turbo/simd/jidctfst-neon.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../3rdparty/chromium/third_party/libjpeg_turbo -Igen -I../../3rdparty/chromium -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -fno-omit-frame-pointer -g0 -fvisibility=hidden -O3 -fno-ident -fdata-sections -ffunction-sections -std=gnu11 -c ../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jidctfst-neon.c -o obj/third_party/libjpeg_turbo/simd/jidctfst-neon.o
../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jidctfst-neon.c: In function ‘jsimd_idct_ifast_neon’:
../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jidctfst-neon.c:87:28: error: incompatible types when initializing type ‘int64_t’ {aka ‘long int’} using type ‘int64x1_t’
   int64_t left_ac_bitmap = vreinterpret_s64_s16(vget_low_s16(bitmap));
                            ^~~~~~~~~~~~~~~~~~~~
../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jidctfst-neon.c:88:29: error: incompatible types when initializing type ‘int64_t’ {aka ‘long int’} using type ‘int64x1_t’
   int64_t right_ac_bitmap = vreinterpret_s64_s16(vget_high_s16(bitmap));
                             ^~~~~~~~~~~~~~~~~~~~
../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jidctfst-neon.c:408:29: note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts
                             vaddq_s8(cols_01_s8, vdupq_n_u8(CENTERJSAMPLE)));
                             ^~~~~~~~
../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jidctfst-neon.c:408:50: error: incompatible type for argument 2 of ‘vaddq_s8’
                             vaddq_s8(cols_01_s8, vdupq_n_u8(CENTERJSAMPLE)));
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jidctfst-neon.c:31:
/usr/lib/gcc/aarch64-linux-gnu/8/include/arm_neon.h:723:36: note: expected ‘int8x16_t’ but argument is of type ‘uint8x16_t’
 vaddq_s8 (int8x16_t __a, int8x16_t __b)
                          ~~~~~~~~~~^~~
../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jidctfst-neon.c:410:50: error: incompatible type for argument 2 of ‘vaddq_s8’
                             vaddq_s8(cols_45_s8, vdupq_n_u8(CENTERJSAMPLE)));
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jidctfst-neon.c:31:
/usr/lib/gcc/aarch64-linux-gnu/8/include/arm_neon.h:723:36: note: expected ‘int8x16_t’ but argument is of type ‘uint8x16_t’
 vaddq_s8 (int8x16_t __a, int8x16_t __b)
                          ~~~~~~~~~~^~~
../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jidctfst-neon.c:412:50: error: incompatible type for argument 2 of ‘vaddq_s8’
                             vaddq_s8(cols_23_s8, vdupq_n_u8(CENTERJSAMPLE)));
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jidctfst-neon.c:31:
/usr/lib/gcc/aarch64-linux-gnu/8/include/arm_neon.h:723:36: note: expected ‘int8x16_t’ but argument is of type ‘uint8x16_t’
 vaddq_s8 (int8x16_t __a, int8x16_t __b)
                          ~~~~~~~~~~^~~
../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jidctfst-neon.c:414:50: error: incompatible type for argument 2 of ‘vaddq_s8’
                             vaddq_s8(cols_67_s8, vdupq_n_u8(CENTERJSAMPLE)));
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jidctfst-neon.c:31:
/usr/lib/gcc/aarch64-linux-gnu/8/include/arm_neon.h:723:36: note: expected ‘int8x16_t’ but argument is of type ‘uint8x16_t’
 vaddq_s8 (int8x16_t __a, int8x16_t __b)
                          ~~~~~~~~~~^~~
[5/547] /usr/bin/gcc -MMD -MF obj/third_party/libjpeg_turbo/simd/jdsample-neon.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../3rdparty/chromium/third_party/libjpeg_turbo -Igen -I../../3rdparty/chromium -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -fno-omit-frame-pointer -g0 -fvisibility=hidden -O3 -fno-ident -fdata-sections -ffunction-sections -std=gnu11 -c ../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jdsample-neon.c -o obj/third_party/libjpeg_turbo/simd/jdsample-neon.o
../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jdsample-neon.c: In function ‘jsimd_h2v1_upsample_neon’:
../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jdsample-neon.c:507:36: warning: missing braces around initializer [-Wmissing-braces]
       uint8x16x2_t output_pixels = { samples, samples };
                                    ^
                                      {                }
../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jdsample-neon.c: In function ‘jsimd_h2v2_upsample_neon’:
../../3rdparty/chromium/third_party/libjpeg_turbo/simd/arm/common/jdsample-neon.c:548:36: warning: missing braces around initializer [-Wmissing-braces]
       uint8x16x2_t output_pixels = { samples, samples };
                                    ^
                                      {                }
[6/547] /usr/bin/gcc -MMD -MF obj/third_party/libjpeg_turbo/libjpeg/jdcolor.o.d -DWITH_SIMD -DNO_GETENV -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../3rdparty/chromium -I../../3rdparty/chromium/third_party/libjpeg_turbo -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -std=gnu11 -c ../../3rdparty/chromium/third_party/libjpeg_turbo/jdcolor.c -o obj/third_party/libjpeg_turbo/libjpeg/jdcolor.o
ninja: build stopped: subcommand failed.

解决方法:
这个错误是由于 QWebengine 模块的 chromium 包含的 third_party 里第三方库 libjpeg_turbo 在 ARM 下的兼容问题,可以逐个对比 GitHub 的代码修改错误,也可以尝试将最新的 libjpeg_turbo 源文件覆盖。

leo@leo-PC:/data/home/leo/Qt/Tool/QtCreator/bin$ ./qtcreator
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "/home/leo/Qt/5.15.2/plugins/platforms"
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb (from /home/leo/Qt/5.15.2/plugins/platforms), minimal (from /home/leo/Qt/5.15.2/plugins/platforms), offscreen (from /home/leo/Qt/5.15.2/plugins/platforms), vnc (from /home/leo/Qt/5.15.2/plugins/platforms), webgl (from /home/leo/Qt/5.15.2/plugins/platforms), linuxfb, minimal, offscreen, vnc, webgl.

已放弃

查看 /home/leo/Qt/5.15.2/plugins/platforms 安装目录下是否有 libqxcb.so 库,如果没有,则说明源码编译不完整。

需要安装 xcb 相关的库

sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev

然后重新编译尝试。

总结

以上便是在 ARM 架构平台的 Linux 系统上编译 Qt 整个过程,在编译过程中,需要特别注意的便是依赖库的完整性,如果缺失一些依赖库,Qt 并不会直接报错,编译之后才发现缺失依赖库,有的组件用不了。尤其是 libqxcb.so 库,最开始编译的时候,没用生成它,导致程序无法启动。

所以要特别留意 ./configure 那一步,Qt 会检测相关的环境及依赖库。

Building Qt 5 from Git
https://doc.qt.io/qt-6/linux-requirements.html
https://doc.qt.io/qt-5.15/linux-building.html
https://blog.csdn.net/luoyayun361/article/details/118395262
https://github.com/libjpeg-turbo/libjpeg-turbo/issues/547
https://blog.csdn.net/console_log/article/details/122881398文章来源地址https://www.toymoban.com/news/detail-772503.html

到了这里,关于飞腾ARM UOS编译Qt 5.15.2源码及Qt Creator的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • ubuntu搭建qtcreator(含arm qt5.15且下载、安装、配置、示例)

    1.1 QtCreator选择 在Qt5.15以前,Qt creator与Qt版本库是打包在一起发布的,比如要开发基于Qt5.14的代码,则从官网下载,安装,然后就可以参考Qt5.14的接口,进行开发。 但从Qt5.14以后,集成开发环境和Qt版本库是分开的,如下所示,只有源码,没有qt-opensource-xx 安装Qt,是在安装

    2024年02月03日
    浏览(55)
  • ARM架构银河麒麟docker,源码编译安装GDAL

    docker中安装依赖 去官网下载GDAL源码 下载GDAL3.4.3版本 进入到GDAL源码目录并执行 以6个cpu核心编译源码 安装到python

    2024年02月13日
    浏览(45)
  • 虚幻引擎UE4源码编译安装(x86,arm64平台)

    (1)关于运行Setup.sh脚本,mono报错,详情截图如下: 分析:不能执行二进制文件mono,根据错误提示找到源码中涉及到具体执行语句为: “mono Engine/Binaries/DotNET/GitDependencies.exe $ARGS”         GitDependencies.exe可执行文件的作用在线下载UE依赖库,而mono是跨平台.net运行环境,

    2024年02月06日
    浏览(94)
  • arm版(以uos为例)linux安装mysql8

    官网下载:https://downloads.mysql.com/archives/community/ 上传到服务器,然后解压缩 tar -zxvf mysql-8.0.31-linux-glibc2.17-aarch64.tar.gz mv mysql-8.0.31-linux-glibc2.17-aarch64 /usr/local/mysql-8 创建MySQL数据目录 mkdir -p /data cd data mkdir -p mysql 生成编辑配置文件 vim /etc/my.cnf 初始化MYSQL cd /usr/local/mysql-8/bin/ ./

    2024年02月09日
    浏览(49)
  • 【ARM版银河麒麟源码编译安装开源混合整数规划器SCIP和PySCIPOpt】

    第一章 ARM版银河麒麟源码编译安装开源混合整数规划器SCIP和PySCIPOpt 目前在研的项目需要用到整数规划,SCIP作为性能较好的开源混合整数规划器之一,成为我的不二之选,利用与之配套的PySCIPOpt包,可以通过python方便进行调用和求解整数规划问题。但由于SCIP官网只提供了X

    2024年04月27日
    浏览(31)
  • Qt交叉编译到arm平台

    从网上下载对应版本的Qt源码 https://download.qt.io/archive/qt/5.9/5.9.3/single/,我下载的是5.9.3的版本。 解压到ubuntu上 下载使用gcc 4.9.4编译器,并配置环境变量。(尽量选择高版本编译器) 配置Qt相关的编译器,使用linux-arm-gnueabi前缀, cd qtbase/mkspecs 修改qmake.conf文件,更改编译器为

    2024年02月11日
    浏览(53)
  • x86架构ubuntu 搭建arm64交叉编译环境及QT编译arm64架构工程

    背景:由于最近项目需要做国产系统适配,很多软件需要重新编译以适配不同架构CPU。 环境: 1、主机win10 64bit   vmware虚拟主机ubuntu1804 64bit 2、vmware虚拟主机已经安装了qt5.14.2及qt_create4.11.1 一、C/C++程序交叉编译 1、交叉编译环境搭建 ①选定编译工具aarch64-linux-gnu ②安装交叉

    2024年02月09日
    浏览(65)
  • Qt教程3-Ubuntu(x86_64)上配置arm64(aarch64)交叉编译环境及QT编译arm64架构工程

    苦辣酸甜时光八载,春夏秋冬志此一生 Qt简介: Qt(官方发音 [kju:t],音同 cute)是一个跨平台的 C++ 开发库,主要用来开发图形用户界面(Graphical User Interface,GUI)程序,当然也可以开发不带界面的命令行(Command User Interface,CUI)程序。 Qt 支持的操作系统有很多,例如通用

    2024年01月23日
    浏览(50)
  • QT·移植Qt到ARM平台及搭建Qt交叉编译环境

    目录 一、编译tslib库 二、移植 tslib 到文件系统  三、编译Qt源码(用于移植到ARM) 四、移植Qt到文件系统  五、搭建 Qt Creator 交叉编译环境  六、获得Qt可执行文件的另一种方法 要想在ARM平台上运行Qt程序,得满足以下两个点: 1、ARM平台上搭建Qt运行环境 2、获得通过交叉编

    2024年02月02日
    浏览(49)
  • 【一、搭建通用Arm平台的QT交叉编译环境】

    为实现目标嵌入式平台能够正常运行Qt程序,则需要在目标平台上部署QT运行环境。 Ubuntu系统,本文使用的是20.04版本 arm平台通用交叉编译工具链 QT源码 1.下载工具链 点击链接https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabi/,选择下图中标识的文件进行下载。

    2023年04月16日
    浏览(44)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包