银河麒麟编译qt飞腾CPU

  • Post author:
  • Post category:qt
  • Post comments:0评论

系统版本

uname -a
Linux q-KaiTianM749T 5.4.18-35-generic #21-KYLINOS SMP Tue Jul 20 13:31:32 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

qt版本5.12.8

https://download.qt.io/archive/qt/5.12/5.12.8/single/qt-everywhere-src-5.12.8.tar.xz

下载源码

wget https://download.qt.io/archive/qt/5.12/5.12.8/single/qt-everywhere-src-5.12.8.tar.xz --no-check-certificate

解压

tar xf qt-everywhere-src-5.12.8.tar.xz

configure

进入源码目录qt-everywhere-src-5.12.8

查看README检查Perl、Python版本

HOW TO BUILD QT5
================

 Synopsis
 ========

   System requirements
   ------------------

    - Perl 5.8 or later
    - Python 2.7 or later
    - C++ compiler supporting the C++11 standard
    ...

执行configure

./configure -prefix $PWD/build -opensource -nomake tests -nomake examples

参数:

-prefix $PWD/build生成路径

-opensource开源用户

-nomake tests -nomake examples跳过tests和examples

出现ERROR:提示时需要根据说明安装缺少的包或者配置相应的环境变量

出错后需要rm -rf config.cache删除config.cache后重新执行./configure -prefix $PWD/build -opensource -nomake tests -nomake examples

可能遇到bash和perl权限不够的问题。修改/usr/bin/目录下的bashshdashperl的权限为777。

configure执行成功后显示如下内容

Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into '/home/uos/qt-everywhere-src-5.12.8/build'.

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

编译

make 

遇到缺少库的错误安装对应库后继续编译

文章作者: 张拓
文章链接: http://www.xssl.online/%e9%93%b6%e6%b2%b3%e9%ba%92%e9%ba%9f%e7%bc%96%e8%af%91qt%e9%a3%9e%e8%85%becpu/
版权声明: 本博客所有文章除特别声明外,均采用CC BY-NC-SA 4.0 许可协议。转载请注明来自 张拓的博客
浏览次数: 902

张拓

陕西西安蓝田张拓QQ1070410059。一生所求不过“心安”二字。 然,尘世多纷扰。

发表回复