[Development] CMake && QtCreator cross-compilation for ARM fails

Kevin Kofler kevin.kofler at chello.at
Thu Dec 13 12:47:08 CET 2018


Christian Gagneraud wrote:
> On Thu, 13 Dec 2018 at 12:27, Kevin Kofler wrote:
>> (so, unlike QBS, it does not depend on Qt, which would mean a circular
>> dependency when building Qt),
> 
> qmake has this problem, yet it's been packaged for 10+ years without a
> problem.

Bootstrapping QMake has always been the least pleasant part of the Qt build
process. It requires building parts of Qt (QMake and the classes it depends
on) with a custom script, making it harder than necessary to get it to use
the proper build flags (optimization, security hardening, etc.). The script
is also a completely unnecessary maintenance burden for Qt.

I am looking forward to this bootstrapping hack going away by just using
CMake.

And it would be much worse for QBS, which requires much more from Qt than
QMake. It requires QML, JavaScript, etc.

>> widely packaged for GNU/Linux distributions, and with binaries for
>> Windows and macOS shipped by CMake upstream (Kitware) themselves. It has
>> a live upstream at Kitware, so Qt does not have to maintain it. And it is
>> already widely used in the Qt and KDE community.
> 
> What a bunch of cheap free statements, w/o proper comparison.

Comparison with what? I did compare with QBS, which got only limited
adoption, which would have to be maintained by Qt, and which just does not
have a showcase project of the size of KDE.

> Can you point me to something that shows the Qt "project" contributing
> to the Qt "company" on that very particular topic?

The Qt Project is largely just the Qt Company when it comes to such core
tasks.

> The Qt Company has been looking for "employees" to work on Qbs for
> month before dropping it, apparently nobody responded, or something...

Then that would pretty much explain why they cannot maintain it in the long
run.

> Cmake is crap, it is a macro based language, like it's good to be back
> in the 80's.

Sometimes, old concepts just work and do not need to be replaced. C++ is
also from the 80's (started in 1985) and serves Qt just fine.

> It has no semantic,

Huh?

> and no concept apart form 'macro',

Not true. There are builtin commands, and there are now also functions with
support for recursion.

> the syntax sucks, big time,

The syntax is straightforward and easy to learn. Try autoconf for a syntax
that REALLY sucks. ;-)

> every thing is just 'expression',

Having untyped/weakly-typed expressions is typical for scripting languages.
JavaScript also works this way. That does not stop it from being an
extremely popular programming language, also used in QML and QBS.

> read that one:
> https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#output-expressions

That is a powerful feature. And you don't have to use it if you don't need
it. Most CMake files actually do not need or use output expressions.

> And read that again and again, until you brain says: 'Actually, CMake
> is "crap"!'

My brain refuses to enter this infinite loop. ;-)

> Oh yeah! Unless you hit some bugs, like, CMake-based cross-compilation
> doesn't actually exists (yet) on Windows:
> https://github.com/Kitware/CMake/commit/5f0f84c7e0630d7b8190c18badd5a68e2dd08ff7

This is a bug that was already fixed by:
https://gitlab.kitware.com/cmake/cmake/merge_requests/2668

        Kevin Kofler




More information about the Development mailing list