[Development] The sorry state of the Qt6 cross compile experience

Marius Kittler mkittler at suse.de
Tue Feb 23 13:27:02 CET 2021


It looks like your experience with the new build system is the very opposite 
of my experience. I've found it to work much more flawlessly, especially with 
regards to cross-compilation targeting mingw-w64 and Android (haven't tested 
the Android build much, though).


> first and foremost, we need to waste time to **fully** build and install it

I usually have native/non-cross build around anyways so this never occurred to 
me as a problem. In fact I found it quite nice that I don't have to waste time 
building qmake, other tools and bootstrapping libraries for all targets. 
Simply reusing my native/non-cross binaries seems like a win to me.

> but let's face it, it's a BS needed to cover  the fact that cmake can't 
build more than one platform at once.

Again, this seems like a good thing to me. I found it always messy that qmake 
tries to build for multiple targets at the same time. This makes everything 
more complex. When adjusting some kind of flags or dependency lookup (or 
whatever behavior) it always raised the question: Which targets will it 
affect? How do I make it affect only e.g. the host build? This was not very 
intuitive to deal with. Keeping targets separate simplifies things.

> android cross compilation is so crippled now.

The multi-ABI build never worked well for me with Qt 5. While it is nice that 
Qt's build system offers this feature it doesn't help with the fact that other 
dependencies of my project don't support that. Hence it is still easier to 
install each architecture within its own prefix which unfortunately was broken 
by the multi-ABI build. Hence I don't miss that feature at all.


I'd also like to note that with CMake the dependencies of static libraries and 
plugins are taken into account correctly. At least this required some heavy/
hacky patching with qmake in the past. (It might have improved in recent Qt 5 
releases, though. At some point I gave up and just kept using my patches.)


I've just wanted to share my own experience because the initial mail was 
overwhelmingly negative. Likely it depends very much on the use-cases, e.g. I 
never wanted to "ship" Qt. My main focus is packaging Qt for GNU/Linux 
including cross-compilation packages for mingw-w64 and Android targets.

Best Regards

More information about the Development mailing list