[Development] moc output from non-local tool build

Joerg Bornemann joerg.bornemann at qt.io
Mon Sep 13 09:38:55 CEST 2021


On 9/10/21 4:58 PM, Thiago Macieira wrote:

> Qt 6 supports using the moc from a different build of Qt, to help with the
> bootstrapping issue and also so you don't always run a debug-mode moc in your
> debug builds of Qt.
> 
> Is that moc required to be from the same Qt version as the Qt you're trying to
> build? Or is there a leeway in accepting slightly different builds?

For a cross-build, currently, the host Qt needs to have the same version 
as the target Qt. When trying to build, let's say, Qt for Android 6.2.0 
with a host Qt 6.1.2, you're getting an error:

   Could not find a configuration file for package "Qt6CoreTools" that is
   compatible with requested version "6.2.0".

This is because our find_package calls for the host Qt contain the exact 
version number of the Qt that is being built.


Cheers,

Joerg


More information about the Development mailing list