kylinV10移植qt5.9.9(一)

一. 准备工作

  1. 下载qt5.9.9版本的源码
下载地址:https://download.qt.io/archive/qt/5.9/5.9.9/single/  //下载tar.gz包,使用迅雷下载,一个字。快
https://download.qt.io/official_releases/qtcreator/4.5/4.5.0/installer_source/   //将其中的两个包都下载下来
  1. win10搭建ftp服务
    kylin上有自带的filezilla客户端,我们需要在下载的机器上搭建一个ftp服务,将下载好的文件传过去,我的下载文件系统是win

参考:win10开启ftp

  1. 将qt文件传到kylin上
  2. 将下载好的qt-source解压,查看README,进行环境检查,结果发现都是符合的(确保文档中提到版本的都满足)

二. 编译安装 qt-everywhere-opensource-src-5.9.9

  1. 将文件放在文件夹中不要再移动了
tlx@TLX001:~/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9$ pwd
/home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9
  1. 进行配置
tlx@TLX001:~/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9$ ./configure -prefix /home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/qtbase -opensource -nomake tests

输出如下:

tlx@TLX001:~/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9$ ./configure -prefix /home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/qtbase -opensource -nomake tests
+ cd qtbase
+ /home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/qtbase/configure -top-level -prefix /home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/qtbase -opensource -nomake tests
Creating qmake...
.........................................................................................Done.
Info: creating super cache file /home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/.qmake.super
Info: creating stash file /home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/.qmake.stash

This is the Qt Open Source Edition.
 
You are licensed to use this software under the terms of
the GNU Lesser General Public License (LGPL) version 3
or the GNU General Public License (GPL) version 2.
 
Type 'L' to view the GNU Lesser General Public License version 3 (LGPLv3).
Type 'G' to view the GNU General Public License version 2 (GPLv2).
Type 'y' to accept this license offer.
Type 'n' to decline this license offer.
 
Do you accept the terms of either license? y


Running configuration tests...
Checking for gold linker... yes
Checking for machine tuple... yes
Checking for valid makespec... yes
Checking for alloca() in alloca.h... yes
Checking for target architecture... x86_64
Checking for SSE2 instructions... yes
Checking for SSE3 instructions... yes
Checking for SSSE3 instructions... yes
Checking for SSE4.1 instructions... yes
Checking for SSE4.2 instructions... yes
Checking for AVX instructions... yes
Checking for AVX2 instructions... yes
Checking for AVX512 F instructions... yes
Checking for AVX512 BW instructions... yes
Checking for AVX512 CD instructions... yes
Checking for AVX512 DQ instructions... yes
Checking for AVX512 ER instructions... yes
Checking for AVX512 IFMA instructions... yes
Checking for AVX512 PF instructions... yes
Checking for AVX512 VBMI instructions... yes
Checking for AVX512 VL instructions... yes
Checking for C++14 support... yes
Checking for C++1z support... yes
Checking for pkg-config... yes
Checking for D-Bus >= 1.2... no
Checking for new dtags support... yes
Checking for F16C instructions... yes
Checking for D-Bus >= 1.2 (host)... yes
Checking for udev... yes
Checking for POSIX fallocate()... yes
Checking for precompiled header support... yes
Checking for symbol visibility support... yes
Checking for -Bsymbolic-functions support... yes
Checking for STL compatibility... yes
Checking for zlib... yes
Checking for clock_gettime()... yes
Checking for POSIX monotonic clock... yes
Checking for dlopen()... yes
Checking for eventfd... yes
Checking for GLib... no
Checking for POSIX iconv... yes
Checking for ICU... no
Checking for inotify... yes
Checking for SysV IPC... yes
Checking for ppoll()... yes
Checking for slog2... no
Checking for 64 bit atomics... yes
Checking for DoubleConversion... no
Checking for PCRE2... no
Checking for O_CLOEXEC... yes
Checking for working std::atomic for function pointers... yes
Checking for getaddrinfo()... yes
Checking for getifaddrs()... yes
Checking for IPv6 ifname... yes
Checking for OpenSSL Headers... yes
Checking for XCB >= 1.5 (core)... yes
Checking for atspi... no
Checking for Desktop OpenGL... yes
Checking for EGL... yes
Checking for XCB Xlib... yes
Checking for EGL on X11... yes
Checking for Broadcom EGL (Raspberry Pi)... no
Checking for EGLDevice... yes
Checking for KMS... yes
Checking for GBM... no
Checking for Mali EGL... no
Checking for Mali 2 EGL... no
Checking for i.Mx6 EGL... no
Checking for evdev... yes
Checking for FreeType... no
Checking for libinput... no
Checking for LinuxFB... yes
Checking for mtdev... no
Checking for OpenVG... no
Checking for default QPA platform... xcb
Checking for HarfBuzz... no
Checking for libjpeg... no
Checking for libpng... no
Checking for XCB (extensions)... no
Checking for tslib... no
Checking for X11 prefix... /usr
Checking for XCB GLX... yes
Checking for X11 session management... yes
Checking for XLib... yes
Checking for Xinput2... no
Checking for xkbcommon-x11 >= 0.4.1... no
Checking for XKB config root... /usr/share/X11/xkb
Checking for xkbcommon... no
Checking for CUPS... no
Checking for DB2 (IBM)... no
Checking for InterBase... no
Checking for MySQL... no
Checking for OCI (Oracle)... no
Checking for ODBC... no
Checking for PostgreSQL... no
Checking for SQLite (version 2)... no
Checking for TDS (Sybase)... no
Checking for Socket CAN... yes
Checking for Socket CAN FD... yes
Checking for Direct3D 12... no
Checking for SDL2... no
Checking for Assimp... no
Checking for Autodesk FBX... no
Checking for Wayland client library... yes
Checking for Wayland cursor library... yes
Checking for wayland-scanner... yes
Checking for DRM EGL Server... yes
Checking for libhybris EGL Server... no
Checking for Wayland EGL library... yes
Checking for XComposite... no
Checking for wayland-server... yes
Checking for BlueZ... no
Checking for sensorfw... no
Checking for Gypsy... no
Checking for WinRT Geolocation API... no
Checking for ALSA... no
Checking for GStreamer 1.0... no
Checking for GStreamer 0.10... no
Checking for Video for Linux... yes
Checking for OpenAL... no
Checking for PulseAudio >= 0.9.10... no
Checking for libresourceqt5... no
Checking for ALSA... no
Checking for embedded... no
Checking for PulseAudio >= 0.9.10... no
Checking for Python 2... /usr/bin/python2
Checking for system ninja... no
Checking for opus... no
Checking for re2... no
Checking for libwebp and libwebpdemux... no
Done running configuration tests.

Configure summary:

Build type: linux-g++ (x86_64, CPU features: mmx sse sse2)
Configuration: use_gold_linker sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl compile_examples enable_new_dtags f16c largefile precompile_header shared rpath release c++11 c++14 c++1z concurrent dbus reduce_exports reduce_relocations stl
Build options:
  Mode ................................... release
  Optimize release build for size ........ no
  Building shared libraries .............. yes
  Using C++ standard ..................... C++1z
  Using ccache ........................... no
  Using gold linker ...................... yes
  Using new DTAGS ........................ yes
  Using precompiled headers .............. yes
  Using LTCG ............................. no
  Target compiler supports:
    SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
    AVX .................................. AVX AVX2 F16C
    AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI
  Build parts ............................ libs examples tools
Qt modules and options:
  Qt Concurrent .......................... yes
  Qt D-Bus ............................... yes
  Qt D-Bus directly linked to libdbus .... no
  Qt Gui ................................. yes
  Qt Network ............................. yes
  Qt Sql ................................. yes
  Qt Testlib ............................. yes
  Qt Widgets ............................. yes
  Qt Xml ................................. yes
Support enabled for:
  Using pkg-config ....................... yes
  QML debugging .......................... yes
  udev ................................... yes
  Using system zlib ...................... yes
Qt Core:
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
  GLib ................................... no
  iconv .................................. yes
  ICU .................................... no
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  Using system PCRE2 ..................... no
Qt Network:
  getaddrinfo() .......................... yes
  getifaddrs() ........................... yes
  IPv6 ifname ............................ yes
  libproxy ............................... no
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ no
  SCTP ................................... no
  Use system proxies ..................... yes
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ no
  HarfBuzz ............................... yes
    Using system HarfBuzz ................ no
  Fontconfig ............................. no
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
      Using system libjpeg ............... no
    PNG .................................. yes
      Using system libpng ................ no
  EGL .................................... yes
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... yes
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
  Session Management ..................... yes
Features used by QPA backends:
  evdev .................................. yes
  libinput ............................... no
  INTEGRITY HID .......................... no
  mtdev .................................. no
  tslib .................................. no
  xkbcommon-evdev ........................ no
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. yes
  EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... yes
    EGLFS GBM ............................ no
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGL on X11 ........................... yes
  LinuxFB ................................ yes
  VNC .................................... yes
  Mir client ............................. no
  X11:
    Using system-provided XCB libraries .. no
    EGL on X11 ........................... yes
    Xinput2 .............................. no
    XCB XKB .............................. yes
    XLib ................................. yes
    XCB render ........................... yes
    XCB GLX .............................. yes
    XCB Xlib ............................. yes
    Using system-provided xkbcommon ...... no
Qt Widgets:
  GTK+ ................................... no
  Styles ................................. Fusion Windows
Qt PrintSupport:
  CUPS ................................... no
Qt Sql:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... no
  PostgreSQL ............................. no
  SQLite2 ................................ no
  SQLite ................................. yes
    Using system provided SQLite ......... no
  TDS (Sybase) ........................... no
Qt SerialBus:
  Socket CAN ............................. yes
  Socket CAN FD .......................... yes
QtXmlPatterns:
  XML schema support ..................... yes
Qt QML:
  QML interpreter ........................ yes
  QML network support .................... yes
Qt Quick:
  Direct3D 12 ............................ no
  AnimatedImage item ..................... yes
  Canvas item ............................ yes
  Support for Qt Quick Designer .......... yes
  Flipable item .......................... yes
  GridView item .......................... yes
  ListView item .......................... yes
  Path support ........................... yes
  PathView item .......................... yes
  Positioner items ....................... yes
  ShaderEffect item ...................... yes
  Sprite item ............................ yes
Qt Gamepad:
  SDL2 ................................... no
Qt 3D:
  Assimp ................................. yes
  System Assimp .......................... no
  Output Qt3D Job traces ................. no
  Output Qt3D GL traces .................. no
Qt 3D GeometryLoaders:
  Autodesk FBX ........................... no
Qt Wayland Drivers:
  EGL .................................... yes
  Raspberry Pi ........................... no
  XComposite EGL ......................... no
  XComposite GLX ......................... no
  DRM EGL ................................ yes
  libhybris EGL .......................... no
Qt Wayland Client ........................ yes
Qt Wayland Compositor .................... yes
Qt Bluetooth:
  BlueZ .................................. no
  BlueZ Low Energy ....................... no
  Linux Crypto API ....................... no
Qt Sensors:
  sensorfw ............................... no
Qt Quick Controls 2:
  Styles ................................. Default Material Universal
Qt Quick Templates 2:
  Hover support .......................... yes
  Multi-touch support .................... yes
Qt Positioning:
  Gypsy GPS Daemon ....................... no
  WinRT Geolocation API .................. no
Qt Location:
  Geoservice plugins:
    OpenStreetMap ........................ yes
    HERE ................................. yes
    Esri ................................. yes
    Mapbox ............................... yes
    MapboxGL ............................. yes
    Itemsoverlay ......................... yes
Qt Multimedia:
  ALSA ................................... no
  GStreamer 1.0 .......................... no
  GStreamer 0.10 ......................... no
  Video for Linux ........................ yes
  OpenAL ................................. no
  PulseAudio ............................. no
  Resource Policy (libresourceqt5) ....... no
  Windows Audio Services ................. no
  DirectShow ............................. no
  Windows Media Foundation ............... no
Qt WebEngine:
  Embedded build ......................... no
  Pepper Plugins ......................... yes
  Printing and PDF ....................... yes
  Proprietary Codecs ..................... no
  Spellchecker ........................... yes
  WebRTC ................................. yes
  Using system ninja ..................... no
  ALSA ................................... no
  PulseAudio ............................. no
  System libraries:
    re2 .................................. no
    ICU .................................. no
    libwebp and libwebpdemux ............. no
    Opus ................................. no
    ffmpeg ............................... no

Note: Also available for Linux: linux-clang linux-icc

Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing.

Qt is now configured for building. Just run 'make'.
Once everything is built, Qt is installed.
You should NOT run 'make install'.
Note that this build cannot be deployed to other machines or devices.

Prior to reconfiguration, make sure you remove any leftovers from
the previous build.

在参考博客中提到还要支持zlib,我们看到在配置的输出信息中已经找到了zlib了,不错!

  1. 编译
    机器配置较好的,用j8,记住,一定要用j8,不然编译到怀疑人生
make -j8

make完成,执行make install 却报错了,报了3个错:

cd qtmacextras/ && ( test -e Makefile || /home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/qtbase/bin/qmake -o Makefile /home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/qtmacextras/qtmacextras.pro ) && make -f Makefile install
make[1]: Entering directory '/home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/qtmacextras'
/home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/qtbase/bin/qmake -o Makefile qtmacextras.pro
Cannot read /home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/qtbase/mkspecs/linux-g++/qmake.conf: No such file or directory
Could not read qmake configuration file /home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/qtbase/mkspecs/linux-g++/qmake.conf.
Error processing project file: qtmacextras.pro
Makefile:202: recipe for target 'Makefile' failed
make[1]: *** [Makefile] Error 3
make[1]: Leaving directory '/home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/qtmacextras'
Makefile:119: recipe for target 'module-qtmacextras-install_subtargets' failed
make: *** [module-qtmacextras-install_subtargets] Error 2
  1. 重新进行配置
    删除原来的qtbase里面内容,或者整个解压出来的包删除,重新解压
tlx@TLX001:~/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9$ ./configure -silent 
tlx@TLX001:~/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9$ make -j8 
tlx@TLX001:~/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9$ sudo make install //普通用户这里一定要加sudo,否则会出现安装时权限不足 

以上操作正确安装,没有报错

三.编译安装 qtcreator.7z

  1. 解压
tlx@TLX001:~/qt/sw$ 7z x qtcreator.7z

解压出来会有share bin lib libexec四个文件夹 ,对于这四个文件夹不知道怎么操作了。。。(无语吧)

开始运行编译,结果报错,没有webenginewidgets和webcchannel模块

四.上面的方法没有成功,看到有文章说可以直接安装run包,试试呗…真香~~~

sudo apt-get install gcc g++ make -y
$ chmod a+x qt-opensource-linux-x64-5.11.1.run 
$ ./qt-opensource-linux-x64-5.11.1.run 

完美解决。

参考:银河麒麟(Kylin)完整移植Qt5.9.2, 包含QCharts和QML等全部模块
ubuntu kylin 18.04 安装 Qt Creator 5.11

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论
根据引用\[1\]和引用\[2\]的内容,安装Qt 5.9.9的步骤如下: 1. 下载Qt 5.9.9源码包,可以从官方网站上下载。\[2\] 2. 将下载好的源码包解压到指定的文件夹中,不要再移动文件。\[1\] 3. 进入解压后的文件夹,执行配置命令,指定安装路径和其他选项。例如,在终端中运行`./configure -prefix /home/tlx/qt/sw/Qt5.9.9src/qt-everywhere-opensource-src-5.9.9/qtbase -opensource -nomake tests`。\[1\] 4. 确保配置成功后,运行`make`命令进行编译。\[3\] 5. 编译完成后,运行`make install`命令进行安装。Qt将被安装到指定的路径中。\[3\] 请注意,以上步骤是基于Linux系统的。如果你使用的是银河麒麟v10操作系统,你需要根据具体情况进行相应的调整。 #### 引用[.reference_title] - *1* *2* [kylinV10移植qt5.9.9(一)](https://blog.csdn.net/bootleader/article/details/116243706)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [银河麒麟V10 + 飞腾CPU编译安装 Qt5.9.9](https://blog.csdn.net/Sakuya__/article/details/127536152)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

WenCoo

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值