国产OS上完整编译Qt5.15、搭建基本开发环境需要的库

近期有师弟问我国产OS安装Qt5.15编译老是不完整,不是没声音,就是没视频,或者没有xcb。通过QEMU模拟Arm64,闲来20几天摸索,完整编译了Qt5.15,并编译成功了我的SDR玩具taskBus。

taskBus inOS

1.主要结论:

  1. 该OS内核太老,5.4,gcc 9, Qt6.2以上的基本很难。还是退回 Qt 5.15 好一些。
  2. 想编译 5.15,先安装 5.12,这样可以凑齐很多包。

在编译过程中,还有一些做法,值得记录。

1.1 使用 recheck 不断凑齐缺失的包

首先 configure 的时候,会缺少很多包。安装相应的包后,要使用 -recheck 选项(Qt5有,Qt6没有)触发重新检查,才能生效。

./configure -xcb -prefix /usr/local/qt/5.15 -sql-psql -sql-mysql  -sql-sqlite -gstreamer 1.0 -sql-tds  -recheck

直到确保包check通过后,再运行1次不带 recheck的版本。否则,在随后 make install时会再次触发configure,导致重新编译。

1.2 解决时戳冲突导致的重新编译

在qemu虚拟化下,可能出现configure时的时间和make时的时间错位,导致重新编译。每次完整编译,意味着1天的开销。

如果确定其实所有的包已经编译好了,则完全可以通过touch重置所有时戳,同时解决 make 、sudo make install 导致的文件权属问题。

首先准备bash脚本 lstouch.sh 并赋予x属性。

#!/bin/bash
echo $1
chown user:user $1
touch -t 202502010102.03   $1

而后运行:

sudo find . | xargs -I {} -P 6 ./lstouch.sh {}

即可重置所有文件为1个时刻。由于make检查是否要重新编译,并不检查等于符号,Makefile的日期和obj的日期完全相同,则不会编译。

2. 附件:安装的包

我把history里曾经安装的包列举如下。感谢deepSeek,后两列是采用deepSeek生成的。
要注意的是,还有cups的不少dev包是用 dkpg 单独安装的,因为国产OS的默认mirror的dev版本和实际的工具版本不匹配,导致无法apt安装(也是醉了)。

包名用途官网
bison语法分析器生成器https://www.gnu.org/software/bison/
build-essential编译工具集合https://packages.debian.org/build-essential
clang-formatC++代码格式化工具https://clang.llvm.org/docs/ClangFormat.html
clang-tidyC++代码静态分析工具https://clang.llvm.org/extra/clang-tidy/
clang-toolsClang工具集合https://clang.llvm.org/
clazyQt/C++代码静态分析工具https://github.com/KDE/clazy
cmake跨平台构建工具https://cmake.org/
filezillaFTP客户端https://filezilla-project.org/
firebird3.0-serverFirebird数据库服务器https://firebirdsql.org/
firebird-devFirebird开发库https://firebirdsql.org/
flex词法分析器生成器https://github.com/westes/flex
flite1-dev语音合成开发库https://github.com/festvox/flite
freetds-devFreeTDS开发库https://www.freetds.org/
g++GNU C++编译器https://gcc.gnu.org/
gccGNU C编译器https://gcc.gnu.org/
gdbGNU调试器https://www.gnu.org/software/gdb/
geany轻量级IDEhttps://www.geany.org/
git分布式版本控制系统https://git-scm.com/
git-guiGit图形界面https://git-scm.com/
gitkGit提交历史查看器https://git-scm.com/
Gperf哈希函数生成器https://www.gnu.org/software/gperf/
gqrx-sdrSDR接收器软件https://gqrx.dk/
grass地理信息系统https://grass.osgeo.org/
grass-devGRASS GIS开发库https://grass.osgeo.org/
grass-guiGRASS GIS图形界面https://grass.osgeo.org/
gstreamer1.0-qt5GStreamer Qt5集成https://gstreamer.freedesktop.org/
htop交互式系统监视器https://htop.dev/
isag系统活动报告工具https://packages.debian.org/isag
lib3ds-dev3DS文件格式开发库https://github.com/lib3ds/lib3ds
libalsaplayer-devALSA音频播放开发库https://packages.debian.org/libalsaplayer-dev
libarchive-dev压缩文件开发库https://www.libarchive.org/
libasound2-devALSA声音开发库https://www.alsa-project.org/
libatspi2.0-dev辅助技术开发库https://developer.gnome.org/atspi/
libavcodec-devFFmpeg编解码开发库https://ffmpeg.org/
libavformat-devFFmpeg格式开发库https://ffmpeg.org/
libav-toolsFFmpeg多媒体工具https://ffmpeg.org/
libbluetooth-dev蓝牙开发库https://www.bluez.org/
libclang-10-devClang 10开发库https://clang.llvm.org/
libdbus-1-devD-Bus开发库https://www.freedesktop.org/wiki/Software/dbus/
libdbus-cpp-devD-Bus C++开发库https://github.com/dbus-cxx/dbus-cxx
libdrm-devDRM开发库https://dri.freedesktop.org/
libevent-dev事件通知开发库https://libevent.org/
libfftw3-dev快速傅里叶变换开发库https://www.fftw.org/
libfontconfig1-dev字体配置开发库https://www.freedesktop.org/wiki/Software/fontconfig/
libfreetype6-dev字体渲染开发库https://www.freetype.org/
libgdal-grassGDAL GRASS插件https://gdal.org/
libghc-double-conversion-devHaskell双精度转换开发库https://hackage.haskell.org/package/double-conversion
libgl1-mesa-devMesa OpenGL开发库https://www.mesa3d.org/
libglu1-mesa-devMesa GLU开发库https://www.mesa3d.org/
libgstreamer1.0-devGStreamer开发库https://gstreamer.freedesktop.org/
libgstreamermm-1.0-devGStreamer C++开发库https://gstreamer.freedesktop.org/
libharfbuzz-binHarfBuzz文本 shaping工具https://harfbuzz.github.io/
libharfbuzz-devHarfBuzz文本 shaping开发库https://harfbuzz.github.io/
libiconv-hook-dev字符编码转换开发库https://www.gnu.org/software/libiconv/
libicu-devUnicode开发库https://icu.unicode.org/
libicu-le-hb-devICU HarfBuzz开发库https://icu.unicode.org/
libiio-dev工业I/O开发库https://analogdevicesinc.github.io/libiio/
libinput-dev输入设备开发库https://www.freedesktop.org/wiki/Software/libinput/
libjson-perlJSON Perl模块https://metacpan.org/pod/JSON
libmd4c-devMarkdown解析开发库https://github.com/mity/md4c
libmysqlclient-devMySQL客户端开发库https://dev.mysql.com/
libnss3-devNSS开发库https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
libopenal-devOpenAL音频开发库https://openal.org/
libopusfile-devOpus音频文件开发库https://opus-codec.org/
libpcap-dev网络数据包捕获开发库https://www.tcpdump.org/
libpq-devPostgreSQL开发库https://www.postgresql.org/
libqt5bluetooth5Qt5蓝牙模块https://www.qt.io/
libqt5charts5-devQt5图表开发库https://www.qt.io/
libqt5datavisualization5-devQt5数据可视化开发库https://www.qt.io/
libqt5gamepad5-devQt5游戏手柄开发库https://www.qt.io/
libqt5gstreamer-devQt5 GStreamer开发库https://www.qt.io/
libqt5location5-pluginsQt5定位插件https://www.qt.io/
libqt5multimedia5-pluginsQt5多媒体插件https://www.qt.io/
libqt5networkauth5-devQt5网络认证开发库https://www.qt.io/
libqt5positioning5-pluginsQt5定位插件https://www.qt.io/
libqt5remoteobjects5-devQt5远程对象开发库https://www.qt.io/
libqt5sensors5-devQt5传感器开发库https://www.qt.io/
libqt5serialbus5-devQt5串行总线开发库https://www.qt.io/
libqt5serialbus5-pluginsQt5串行总线插件https://www.qt.io/
libqt5serialport5-devQt5串口开发库https://www.qt.io/
libqt5sql5-ibaseQt5 InterBase数据库驱动https://www.qt.io/
libqt5sql5-mysqlQt5 MySQL数据库驱动https://www.qt.io/
libqt5sql5-odbcQt5 ODBC数据库驱动https://www.qt.io/
libqt5sql5-psqlQt5 PostgreSQL数据库驱动https://www.qt.io/
libqt5sql5-tdsQt5 TDS数据库驱动https://www.qt.io/
libqt5svg5-devQt5 SVG开发库https://www.qt.io/
libqt5texttospeech5-devQt5文本转语音开发库https://www.qt.io/
libqt5-ukui-style-devQt5 UKUI风格开发库https://www.qt.io/
libqt5virtualkeyboard5-devQt5虚拟键盘开发库https://www.qt.io/
libqt5webchannel5-devQt5 WebChannel开发库https://www.qt.io/
libqt5webengine5Qt5 WebEngine模块https://www.qt.io/
libqt5websockets5-devQt5 WebSockets开发库https://www.qt.io/
libqt5webview5-devQt5 WebView开发库https://www.qt.io/
libqt5x11extras5-devQt5 X11扩展开发库https://www.qt.io/
libqtspell-qt5-devQt5拼写检查开发库https://github.com/manisandro/qtspell
libqwt-qt5-devQt5图表开发库https://qwt.sourceforge.io/
libre2-devRE2正则表达式开发库https://github.com/google/re2
libsdl2-devSDL2开发库https://www.libsdl.org/
libsnappy-devSnappy压缩开发库https://github.com/google/snappy
libspeechd-dev语音合成开发库https://freebsoft.org/speechd
libssl-devSSL安全套接字开发库https://www.openssl.org/
libuhd-devUHD开发库https://files.ettus.com/manual/
libvpx-devVP8/VP9视频编解码开发库https://www.webmproject.org/
libx11-devX11开发库https://www.x.org/
libx11-xcb-devX11-XCB开发库https://www.x.org/
libxcb1-devXCB开发库https://xcb.freedesktop.org/
libxcb-composite0-devXCB复合扩展开发库https://xcb.freedesktop.org/
libxcb-cursor-devXCB光标开发库https://xcb.freedesktop.org/
libxcb-damage0-devXCB损坏扩展开发库https://xcb.freedesktop.org/
libxcb-dpms0-devXCB DPMS扩展开发库https://xcb.freedesktop.org/
libxcb-dri2-0-devXCB DRI2扩展开发库https://xcb.freedesktop.org/
libxcb-dri3-devXCB DRI3扩展开发库https://xcb.freedesktop.org/
libxcb-ewmh-devXCB EWMH扩展开发库https://xcb.freedesktop.org/
libxcb-glx0-devXCB GLX扩展开发库https://xcb.freedesktop.org/
libxcb-icccm4-devXCB ICCCM扩展开发库https://xcb.freedesktop.org/
libxcb-image0-devXCB图像扩展开发库https://xcb.freedesktop.org/
libxcb-imdkit-devXCB输入法开发库https://github.com/fcitx/xcb-imdkit
libxcb-keysyms1-devXCB键符号开发库https://xcb.freedesktop.org/
libxcb-present-devXCB Present扩展开发库https://xcb.freedesktop.org/
libxcb-randr0-devXCB RandR扩展开发库https://xcb.freedesktop.org/
libxcb-record0-devXCB Record扩展开发库https://xcb.freedesktop.org/
libxcb-render-util0-devXCB渲染工具开发库https://xcb.freedesktop.org/
libxcb-res0-devXCB资源扩展开发库https://xcb.freedesktop.org/
libxcb-screensaver0-devXCB屏幕保护扩展开发库https://xcb.freedesktop.org/
libxcb-shape0-devXCB形状扩展开发库https://xcb.freedesktop.org/
libxcb-shm0-devXCB共享内存扩展开发库https://xcb.freedesktop.org/
libxcb-sync-devXCB同步扩展开发库https://xcb.freedesktop.org/
libxcb-util-devXCB工具开发库https://xcb.freedesktop.org/
libxcb-xf86dri0-devXCB XF86DRI扩展开发库https://xcb.freedesktop.org/
libxcb-xfixes0-devXCB XFixes扩展开发库https://xcb.freedesktop.org/
libxcb-xinerama0-devXCB Xinerama扩展开发库https://xcb.freedesktop.org/
libxcb-xinput-devXCB XInput扩展开发库https://xcb.freedesktop.org/
libxcb-xkb-devXCB XKB扩展开发库https://xcb.freedesktop.org/
libxcb-xrm-devXCB X资源管理开发库https://github.com/Airblader/xcb-util-xrm
libxcb-xtest0-devXCB XTest扩展开发库https://xcb.freedesktop.org/
libxcb-xv0-devXCB XVideo扩展开发库https://xcb.freedesktop.org/
libxcb-xvmc0-devXCB XVideo MC扩展开发库https://xcb.freedesktop.org/
libxcomposite-devX Composite扩展开发库https://www.x.org/
libxcursor-devX光标开发库https://www.x.org/
libxdamage-devX损坏扩展开发库https://www.x.org/
libxext-devX扩展开发库https://www.x.org/
libxfixes-devX Fixes扩展开发库https://www.x.org/
libxi-devX输入扩展开发库https://www.x.org/
libxkbcommon-devXKB通用开发库https://xkbcommon.org/
libxkbcommon-x11-devXKB X11开发库https://xkbcommon.org/
libxkbfile-devXKB文件开发库https://www.x.org/
libxrandr-devX RandR扩展开发库https://www.x.org/
libxrender-devX渲染扩展开发库https://www.x.org/
libxshmfence-devX共享内存栅栏开发库https://www.x.org/
libxtst-devX测试扩展开发库https://www.x.org/
libzstd-devZstandard压缩开发库https://facebook.github.io/zstd/
lzipLzip压缩工具https://www.nongnu.org/lzip/
lzma-devLZMA压缩开发库https://tukaani.org/xz/
mcMidnight Commander文件管理器https://midnight-commander.org/
nano文本编辑器https://www.nano-editor.org/
ncompress压缩工具https://packages.debian.org/ncompress
ninja-buildNinja构建系统https://ninja-build.org/
nodejsNode.js JavaScript运行时https://nodejs.org/
npmNode.js包管理器https://www.npmjs.com/
OpensshSSH客户端和服务器https://www.openssh.com/
Partitionmanager分区管理工具https://www.kde.org/applications/system/partitionmanager/
perlPerl编程语言https://www.perl.org/
pgadmin3PostgreSQL管理工具https://www.pgadmin.org/
postgisPostGIS地理信息系统https://postgis.net/
postgis-guiPostGIS图形界面https://postgis.net/
postgresqlPostgreSQL数据库https://www.postgresql.org/
python3-html5libPython HTML5解析库https://github.com/html5lib/html5lib-python
python3-pipPython包管理工具https://pip.pypa.io/
python3-rpy2Python R语言接口https://rpy2.github.io/
python3-termcolorPython终端颜色库https://pypi.org/project/termcolor/
qgisQGIS地理信息系统https://qgis.org/
qt5-defaultQt5默认开发包https://www.qt.io/
qt5keychain-devQt5密钥管理开发库https://github.com/frankosterfeld/qtkeychain
qt5-style-pluginsQt5风格插件https://www.qt.io/
qtbase5-examplesQt5基础示例https://www.qt.io/
qtcharts5-examplesQt5图表示例https://www.qt.io/
qtcreatorQt集成开发环境https://www.qt.io/
qtdatavisualization5-examplesQt5数据可视化示例https://www.qt.io/
qtdeclarative5-devQt5声明式开发库https://www.qt.io/
qtlocation5-devQt5定位开发库https://www.qt.io/
qtmultimedia5-devQt5多媒体开发库https://www.qt.io/
qtmultimedia5-examplesQt5多媒体示例https://www.qt.io/
qtpositioning5-devQt5定位开发库https://www.qt.io/
qtquickcontrols2-5-devQt5 Quick Controls 2开发库https://www.qt.io/
qttools5-devQt5工具开发库https://www.qt.io/
qtwebengine5-devQt5 WebEngine开发库https://www.qt.io/
qtwebengine5-examplesQt5 WebEngine示例https://www.qt.io/
rubyRuby编程语言https://www.ruby-lang.org/
sagaSAGA地理信息系统https://saga-gis.org/
screen终端多路复用器https://www.gnu.org/software/screen/
speech-dispatcher语音合成服务https://freebsoft.org/speechd
speech-dispatcher-fliteFlite语音合成插件https://freebsoft.org/speechd
sqliteSQLite数据库https://www.sqlite.org/
uhd-soapysdrUHD SoapySDR支持https://github.com/pothosware/SoapyUHD
unrarRAR解压工具https://www.rarlab.com/
valgrind内存调试工具https://valgrind.org/
wireshark网络协议分析工具https://www.wireshark.org/
xarchiver压缩文件管理器https://github.com/ib/xarchiver
zstdZstandard压缩工具https://facebook.github.io/zstd/

3. 遗留问题

之所以花了20多天,就是因为默认的仓库缺乏维护,导致了不一致的版本(lib和lib-dev的版本冲突)。而基于x86的qemu模拟arm64如蜗牛一样,每个试错都会花费很久。

而我在OS的论坛提问,有朋友提醒我,卸载cups,安装开源的版本,会失去对国产打印机的支持。所以,相当于问题还没有完全解决。Webengine以及一些模块依赖cups,这是一个大问题。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/977894.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

数据库 安装initializing database不通过

出现一下情况时: 处理方法: 将自己的电脑名称 中文改成英文 即可通过

【视频2 - 4】初识操作系统,Linux,虚拟机

📝前言说明: ●本专栏主要记录本人的基础算法学习以及LeetCode刷题记录,主要跟随B站博主灵茶山的视频进行学习,专栏中的每一篇文章对应B站博主灵茶山的一个视频 ●题目主要为B站视频内涉及的题目以及B站视频中提到的“课后作业”。…

AI绘画软件Stable Diffusion详解教程(2):Windows系统本地化部署操作方法(专业版)

一、事前准备 1、一台配置不错的电脑,英伟达显卡,20系列起步,建议显存6G起步,安装win10或以上版本,我的显卡是40系列,16G显存,所以跑大部分的模型都比较快; 2、科学上网&#xff0…

将Ubuntu操作系统的安装源设置为阿里云

在使用Ubuntu操作系统时,默认的软件源通常是国外的仓库,这可能会导致软件安装和更新速度较慢。为了提高下载速度和稳定性,我们可以将Ubuntu的安装源设置为阿里云镜像源。以下是详细步骤: 一、准备工作 在开始之前,请确保您的Ubuntu系统可以正常上网,并且您拥有管理员权…

IP-------GRE和MGRE

4.GRE和MGRE 1.应用场景 现实场景 居家工作,公司工作,分公司工作----------需要传输交换数据--------NAT---在该场景中需要两次NAT(不安全) 为了安全有两种手段-----1.物理专线---成本高 2.VPN--虚拟专用网---隧道技术--封装技…

Visual Studio Code 跨平台安装与配置指南(附官方下载链接)

一、软件定位与核心功能 Visual Studio Code(简称VS Code)是微软开发的开源跨平台代码编辑器,支持超过50种编程语言的智能补全、调试和版本控制功能。2025版本新增AI辅助编程模块,可自动生成单元测试代码和API文档注释。 二、下载…

小智AI桌宠机器狗

本文主要介绍如何利用开源小智AI制作桌宠机器狗 1 源码下载 首先下载小智源码,下载地址, 下载源码后,使用vsCode打开,需要在vscode上安装esp-idf,安装方式请自己解决 2 源码修改 2.1添加机器狗控制代码 在目录main/iot/things下添加dog.cc文件,内容如下; #include…

Linux:进程信号(二.信号的保存与处理、递达、volatile关键字、SIGCHLD信号)

目录 1.信号保存 1.1递达、未决、阻塞等概念 1.2再次理解信号产生与保存 1.3信号集操作函数 sigset_t类型 sigemptyset() 函数 sigismember()函数 sigaddset ()函数 sigdelset() 函数 sigprocmask()系统调用 sigpending()系统调用 2.信号的处理/递达 2.1信号处理时…

kotlin 知识点 七 泛型的高级特性

对泛型进行实化 泛型实化这个功能对于绝大多数Java 程序员来讲是非常陌生的,因为Java 中完全没有这个概 念。而如果我们想要深刻地理解泛型实化,就要先解释一下Java 的泛型擦除机制才行。 在JDK 1.5之前,Java 是没有泛型功能的,…

go基本语法

跟Java比较学习。 hello word 示例代码 test1.go文件: // 包路径 package main// 导入模块,下面两种都行 import ("fmt" ) import "log"// main方法 func main() {log.Print("hello word !!!")fmt.Print("hello …

Linux内核,slub分配流程

我们根据上面的流程图,依次看下slub是如何分配的 首先从kmem_cache_cpu中分配,如果没有则从kmem_cache_cpu的partial链表分配,如果还没有则从kmem_cache_node中分配,如果kmem_cache_node中也没有,则需要向伙伴系统申请…

冯诺依曼体系结构 ──── linux第8课

目录 冯诺依曼体系结构 关于冯诺依曼,必须强调几点: 冯诺依曼体系结构 我们常见的计算机,如笔记本。我们不常见的计算机,如服务器,大部分都遵守冯诺依曼体系 输入单元:包括键盘, 鼠标,网卡,扫…

国标28181协议在智联视频超融合平台中的接入方法

一. 国标28181介绍 国标 28181 协议全称是《安全防范视频监控联网系统信息传输、交换、控制技术要求》,是国内视频行业最重要的国家标准,目前有三个版本: 2011 年:推出 GB/T 28181-2011 版本,为安防行业的前端设备、平…

2024-2025 学年广东省职业院校技能大赛 “信息安全管理与评估”赛项 技能测试试卷(四)

2024-2025 学年广东省职业院校技能大赛 “信息安全管理与评估”赛项 技能测试试卷(四) 第一部分:网络平台搭建与设备安全防护任务书第二部分:网络安全事件响应、数字取证调查、应用程序安全任务书任务 1:应急响应&…

音乐游戏Dance Dance Revolution(DDR)模拟器

文章目录 (一)Dance Dance Revolution(1.1)基本情况(1.2)机体 (二)模拟器(2.1)主程序(2.2)模拟器主题 (三)曲谱…

货车一键启动无钥匙进入手机远程启动的正确使用方法

一、移动管家货车无钥匙进入系统的使用方法 基本原理:无钥匙进入系统通常采用RFID无线射频技术和车辆身份识别码识别系统。车钥匙需要随身携带,当车钥匙靠近货车时,它会自动与货车的解码器匹配。开门操作:当靠近货车后&#xff0…

vscode如何使用鼠标滚轮调整字体大小

1.打开设置 2.搜索Font Ligatures 3.编辑配置文件 4.修改代码并保存 修改前 修改后 在最后一行添加:“editor.mouseWheelZoom”: true 记得在上一行最后,加上英文版的“,”逗号 5.配置成功,再次按Ctrl鼠标滚轮便可以缩放了。

视频裂变加群推广分享引流源码

源码介绍 视频裂变加群推广分享引流源码 最近网上很火,很多人都在用,适合引流裂变推广 测试环境:PHP7.4(PHP版本不限制) 第一次访问送五次观看次数,用户达到观看次数后需要分享给好友或者群,好友必须点击推广链接后才会增加观看次…

redis小记

redis小记 下载redis sudo apt-get install redis-server redis基本命令 ubuntu16下的redis没有protected-mode属性,就算sudo启动,也不能往/var/spool/cron/crontabs写计划任务,感觉很安全 #连接到redis redis-cli -h 127.0.0.1 -p 6379 …

IDEA关闭SpringBoot程序后仍然占用端口的排查与解决

IDEA关闭SpringBoot程序后仍然占用端口的排查与解决 问题描述 在使用 IntelliJ IDEA 开发 Spring Boot 应用时,有时即使关闭了应用,程序仍然占用端口(例如:4001 端口)。这会导致重新启动应用时出现端口被占用的错误&a…