Unsolved [Linux][Antergos] How to compile Qt 5.6 for maximum Compatibility?
-
Hello Forum and a late happy new year :)
I am starting to develop under Linux in the near Future. I would like to know with what Plugins / Config Parameters I should compile Qt 5.6 to make sure my Application runs on as many Linux Variants as possible.
My Software use i.e.
- TextEditor Widget
- WebEngine
- SQLite Plugin (used in the TableView Database - currently XML based. Will be ported to SQLite usage)
- OpenSSL
- dynamic build
- Qt OpenSource License
The Main Development is done under Windows 10 64-bit. The native Linux Development/Compilation will be done under:
- Antergos 64-bit
- Plasma 5 / KDE 5.5.3
- gcc 5.3
- Windows and Linux Version share 1 Codebase through Git. It is mainly the native compilation that will be done under Linux
My Software is running fine so far with the pre-installed Default Qt 5.5 Packages - on my Machine.
Is there anything special I have to / should look out for? Aside from the Stuff mentioned in Linux X11 Requirements? Is Wayland something I should have in my Mind already?Thanks and have a great weekend.
Oliver -
Hi!
I think your question is wrong. :-) Let me explain: If you want to deploy your dynamically built software successfully to many linux distros then you'll have to go the painful way of creating native packages for all those distros and their versions. You will then use the Qt libraries that are supplied by those distros together with the distros' package build systems.
IMAO the easiest way to create native packages for a great number of distros is provided by "openSUSE build service". https://build.opensuse.org/ . There you create a copy of you source repos, create build recipes and then their server farm will build native packages for SUSE, Fedora, Centos, Debian, Arch, Ubuntu. And it will automatically rebuild your software as soon as any external dependencies change.
-
Evening.
So you are saying: The under Antergos compiled Binaries wont work under other Distros? Thats a shame. 1 more reason Linux will never make it to the Number 1 of OS's used. Under Windows 10 compiled Binaries runs from Windows Vista (Qt5.5)/ 7 (Qt 5.6) to Windows 10.
This Build System is out of question: Part of my Source Code will not be made available in the mid-future. And this is a private made Tool for a Local Community Politics Project. We dont have thousands of Euros for a Server Farm to run OBS ourself - or myself to be more precise.
Seems I have to find another Solution.
But thanks anyway.
Oliver -
The problem is not binary incompatibility (you can still run software that was compiled in 1995 or so) but different versions and locations of the shared libraries supplied by the distros. In theory all "normal" Linux distros are compliant to a standard called "Linux Standard Base" (LSB). This means that you can create an rpm-package that can be installed on SUSE, Fedora, Debian, etc and it will just work. I'd say it works 80% of the time but you need to invest much time in testing to raise this number to 95%.
-
Hi,
To add to @Wieland, if you want to support many distributions then do as Qt does currently: build for the oldest version you want to support. As for distributing your application, provide all dependencies needed by your it with it i.e. build a package that is self-contained (just like you have to do on Windows).
-
Building binaries for linux is definitely a pain. I have a number of closed source projects that I am having to do it for now.
One thing that will help you a ton is Linux Standard Base. This will help you get maximum compatibility across as many distros as you need.
Bottom line is it will take effort to support a lot of linux flavors due to ... nevermind, LSB website will explain why. :)
Oh and Linux is so much better of an OS than Windows. I fight with windows constantly, my OSX and Linux stuff just works great. Binary builds aside as those are really a pain under linux. Small price to pay to not deal with windows all the time though. And I started my career as a pure windows developer. So my new bias is a recent development. Once you work a lot in a posix based OS you will absolutely hate going back and supporting windows.