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

BogDan Vatra bogdan.vatra at kdab.com
Tue Feb 23 12:27:10 CET 2021


  Even though I said that I'm not opening this subject again, I must do it 
because in this moment, cross compiling Qt6 is painful and broken. 

  Long time ago, in the Qt 5 time, we had an painlessly way to do cross 
compiling, not only for Android, but also for the rest of the platforms.  Yes, 
I know, Qt 5 was using the evil, outdated qmake system which we all loved to 
hate, but it just worked for most of us.

Now cross compiling Qt6 for any platform is broken and painful:

- first and foremost, we need to waste time to **fully** build and install it 
for host platform (desktop). Yeah, I know that this was "decided" before TQC 
switched, overnight, to cmake, 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. 

- the cross build installation is broken, instead to copy the tools from the 
QT_HOST_TOOLS folder,  it creates some scripts that has hardcoded paths to 
QT_HOST_TOOLS which runs the scripts from QT_HOST_TOOLS folder. Of course this 
makes the installation unusable on another computer. Even the "lib/cmake/Qt6/
qt.toolchain.cmake" contains hardcoded paths...

- there is no way to have a standalone cross build installation, we always 
need to ship the whole desktop installation as well (also patch all the files 
from cross installation).

- android cross compilation is so crippled now.  In Qt 5.x times, we used to 
have a nice multi ABI build which built all the android ABIs in one go and it 
created a unified Qt SDK for all these ABIs (same as the Android NDK). In Qt 6, 
that work was trashed... for the same reason: cmake can't handle multiple 
platforms at once...

- android cross compilation in Qt 6 takes more time to build one ABI  with 
less Qt modules than in Qt5 to build all ABIs and all modules...

- IMHO the qmake build files were removed prematurely ... they should be 
removed **after** cmake matched qmake.

Having said that, I truly believe that cmake is a big step backwards.
Am I the only one who's bother by all these things?

We have a huge elephant in the room which nobody want to see it...


More information about the Development mailing list