Fsu0413 / QtCompile

Personal build of Qt5 onwards, with SSL builtin. Multiple configuration available.
https://build-qt.fsu0413.me/
88 stars 11 forks source link

Request of adding built version for Desktop Linux (was: 小小的请求) #11

Closed Greedysky closed 1 year ago

Greedysky commented 1 year ago

大佬有计划把linux的版本也加入到其中吗?


(Translated)

Do you have any plans for including builds for Linux?

Fsu0413 commented 1 year ago

Linux 版本繁多,适配起来比较费劲。
找一个附带软件版本最低的 sysroot 太难找了,自己搭建的话太麻烦,而且依赖的软件真的很多,所以暂且放弃了

而且如果弄 Linux 版,就要考虑不同的架构排列组合,我这边能想到的有以下的可能必须要弄:

C/C++ ABI \ CPU 架构 x86_64 aarch64 riscv64 loongarch64 备注
glibc / libstdc++ ? 使用通常的 GNU/Linux 发行版
glibc / libc++ ? 使用通常的 GNU/Linux 发行版
musl / libstdc++ 使用 Alpine Linux
bionic / libc++ 使用 Android 上的 termux
uclibc-ng / ? ? ? OpenWrt 通常不用来做主机的,可能需要交叉编译,而且支持也少

主要是我还不能说弄一个就弄,只弄一个又会有别的请求,常见的都弄了还有不常见的,包括BSD也一样。 之前我也弄其他冷门系统,包括FreeBSD、OpenBSD、NetBSD、Solaris之类的,后来嫌麻烦全删了


(Translated)

Linux has a lot of variants. It is hard for adapting them.
A sysroot with softwares of lowest version is nearly impossible to be found, while so compilicated to be built and there is really a lot of dependencies, which makes me given up for it.

Also different architecture combination must be considered when building for Linux. I currently thought of following ones which may be impossible to be ignored:

C/C++ ABI \ CPU Arch x86_64 aarch64 riscv64 loongarch64 Notes
glibc / libstdc++ ? Regular GNU/Linux distro can be used
glibc / libc++ ? Regular GNU/Linux distro can be used
musl / libstdc++ Alpine Linux should be used
bionic / libc++ termux on Android should be used
uclibc-ng / ? ? ? OpenWrt is not usually be the host. Cross build may be needed while support is poor

Another important thing is that I can't say "do it" easily. Thing is that the requests can happen one after another. The uncommon ones will come after common ones. This also includes BSD.
I did builds on uncommon OSes before including FreeBSD, OpenBSD, NetBSD, Solaris and so on, but have the builds and methods deleted just because I found it so complex.

Fsu0413 commented 1 year ago

还有,多数 Linux 发行版自带 Qt 的软件包,而且都是针对发行版自己有一些调整,和发行版的相性更佳。 除了 termux 之外其实没有绝对一定需要我来编译,直接上软件源里面搜基本都能搜的到。

termux 编译更大的意义则是编译一个 bionic / libc++ 组合的主机版,用来主机编译安卓版本。


BTW most of Linux distro have Qt software package shipped, with some adjustments against the distro itself and works better on that distro. So it must not be me who is in charge of building a version except for one for termux. Basically a version must be found during searching in the software source.

The value of building a version for termux is no more than a host version of bionic / libc++ combination, which will be used consequently when host build a version for Android.

Greedysky commented 1 year ago

感谢大佬这么详细的说明,确实现在Linux发行版本实在是太多了,但大部分主流的自己用的还是Ubuntu、Debian系类。 另外Qt5.15.2后面的系列,官方都是以源码的形式提供,现在用官方的只能到5.15.2,后续的补丁版本望尘莫及。

Fsu0413 commented 1 year ago

Ubuntu 是我为数不多不想用的发行版,也是我为数不多的不想支持的发行版之一。 最主要的原因是我对它的使用体验有非常大的意见。光一个在 apt 里放广告的行为就足够让我讨厌它了。

最早在做 WebAssembly 平台的时候,因为当时我用的 CentOS 7 不支持 emscripten 工具链,用了一段时间的 Ubuntu 作为主机版。 后来在 CentOS 8 发布之后果断换掉了 Ubuntu,并使用 CentOS 8 当主机。当时应该是 2019 年底那样吧。


Qt 5.15.2 后面的系列其实也不用怎么追,没有功能更新,全是 Bug 修复。 如果用的是 Debian sid 或者 Arch Linux 的话,应该会有相应的版本及时推送的。 Arch Linux 是相对比较激进的,它直接使用了 KDE 维护的 Git 版本。 Debian sid 我倒是没有太关注用的是不是 KDE 版,但是 sid 也是紧跟潮流的版本。

Fsu0413 commented 1 year ago

这个 issue 我关了,主要是暂时我也没有计划做这个东西。 就算是我最想做的 termux 版本估计也得花费一段时间的调查才能做,如果涉及修改大量代码的话,就不是这个工程应该做的内容了。


I'm closing this issue mainly because I have no plan for it. Even the most wanted termux version needs investigation for a period of time. If a lot of code needed to be modified it would be out of scope of this project.

leamus commented 1 year ago

看刘典武写的编程经验,说是Linux下Qt编译的程序可以跨平台,不过我测试过arm的linux是不行的(树莓派4b下编译,国产UOS下运行,版本是一致的),确实linux版本繁多,弄起来很麻烦,不过Debian和CentOS这两大版本搞定应该可以适配其他衍生版本吧?

Fsu0413 commented 1 year ago

看刘典武写的编程经验,说是Linux下Qt编译的程序可以跨平台,不过我测试过arm的linux是不行的(树莓派4b下编译,国产UOS下运行,版本是一致的),确实linux版本繁多,弄起来很麻烦,不过Debian和CentOS这两大版本搞定应该可以适配其他衍生版本吧?

最大的问题是sysroot,需要所有支持的第三方库都是最低版本,而不是特定发行版。

leamus commented 1 year ago

好吧,可惜了。。。

uoschina commented 4 months ago

作者能提供一下FOR linux 版本最新的编译方法吗?比如DEBIAN 12 、ubuntu22.04 这两个比较常用的版本的编译方法?

Fsu0413 commented 4 months ago

@uoschina 没调查过。 而且如果用的是成熟的发行版的话,为啥不试试发行版自带的Qt呢? https://github.com/Fsu0413/QtCompile/issues/11#issuecomment-1425798784