[Qbs] Mingw issues

Alberto Mardegan mardy at users.sourceforge.net
Mon Apr 6 09:37:29 CEST 2020


On 05/04/20 22:48, Richard Weickelt wrote:
> Does your toolchain setup work without Qt? Maybe build a plain c++ hello world app.
> 
> Is the deduced qbs.architecture correct?

The architecture is unset (I cannot see it with `qbs config`, at least).
But looking at the configuration I understood where the problem was: I
didn't set up the base profile correctly:

==================================
$ qbs config --list
[...]
profiles.gcc.cpp.toolchainInstallPath: "/usr/bin"
profiles.gcc.qbs.toolchain: "gcc"
profiles.mxe-i686-w64-mingw32-static.cpp.toolchainInstallPath:
"/mnt/Lavoro/mxe/mxe-qt5.9/usr/bin"
profiles.mxe-i686-w64-mingw32-static.cpp.toolchainPrefix: "i686-w64-"
profiles.mxe-i686-w64-mingw32-static.qbs.targetPlatform: "windows"
profiles.mxe-i686-w64-mingw32-static.qbs.toolchain: ["mingw", "gcc"]
profiles.mxe-qt59-i686-w64-mingw32-static.baseProfile: "gcc"
profiles.mxe-qt59-i686-w64-mingw32-static.moduleProviders.Qt.qmakeFilePaths:
"/mnt/Lavoro/mxe/mxe-qt5.9/usr/i686-w64-mingw32.static/qt5/bin/qmake"
[...]
==================================

Setting the base profile to "mxe-i686-w64-mingw32-static" made me
progress a bit:

==================================
ERROR: /home/mardy/src/git/mappero/lib/Mappero/Mappero.qbs:3:1 Error
while handling product 'Mappero':
/usr/local/share/qbs/imports/qbs/Probes/GccProbe.qbs:56:16 Error: Error
running '/mnt/Lavoro/mxe/mxe-qt5.9/usr/bin/i686-w64-g++': execve: No
such file or directory
==================================

It looks like the value of
`profiles.mxe-i686-w64-mingw32-static.cpp.toolchainPrefix` was
incomplete (you can see it from the config pasted above). It should have
been "i686-w64-mingw32.static-", and after changing it to that value,
the build started.

So, actually, my problem is solved. It would be super cool if QBS was so
smart to automatically detect the correct baseProfile to be used when I
point it to a qmake provided by MXE, and I still need to figure out why
the toolchainPrefix was only set to `i686-w64`.


Ciao,
  Alberto

-- 
http://www.mardy.it - Geek in un lingua international


More information about the Qbs mailing list