[Qbs] Qt.core.qtBuildVariant is not supported by this Qt installation

Christian Kandeler christian.kandeler at qt.io
Fri Oct 6 15:12:02 CEST 2017


On Sat, 7 Oct 2017 00:59:33 +1300
Christian Gagneraud <chgans at gmail.com> wrote:

> Sorry for not being clear. Basically what i said was:
> - With QtC, If your device mkspec is broken (a qmake/Qt thing), Qbs
> will give you weird error messages.
> - In my respect It shouldn't, because I'm aiming to control qbs
> profiles from QtC, including cross-compile specifics of all sorts,
> without Qt/qmake's assistance.
> - This doesn't seem to be Qbs's fault (more like Qtc+Qt+qmake integration fault)

Well, qmake is at the moment the "official entry point" into a Qt installation, so in the end, all information is derived from it.
In particular, the active mkspec is relevant also for what qbs gets to know about this particular Qt configuration.

> The error message about "Qt.core.qtBuildVariant" was far away from the
> "CROSS_COMPILE" problem in qt5/mkspecs/devices/mine/qmake.conf.
> I'm not blaming Qbs, but suggesting that an early warning system could
> have say something like:
> warning : Qbs.profiles.<profile>.qt.sanity: something is weird.

That's *kind of* what happened: The Qt.core module in qbs has a validate script. This script does some sanity checks, one of them being that the list of build variants is not empty. This one failed, resulting in the output you saw. The preceding checks succeeded, meaning we detected no problem with e.g. the path to the libraries or the version number.
So what kind of check would you suggest that would also have caught the problem, but with a better error message?


Christian



More information about the Qbs mailing list