[Qbs] Linux 32 bits build on x86_64 host

Christian Gagneraud chgans at gmail.com
Sat Sep 9 13:24:20 CEST 2017


On 9 September 2017 at 22:42, Ely
<elyzabethvonreuenthal at iserlohn-fortress.net> wrote:
> The -m64 flag seems to be set from /usr/share/qbs/modules/cpp/gcc.js because
> you have a 64-bit host and no specified target architecture.

I do understand this, but then it is a Qtc/Qbs integration problem, my
toolchain is defined as gcc 32 bits, it is an "auto-detected" Qtc
toolchain with a x86-linux-generic-elf-32bit ABI.

>> import qbs
>>
>> StaticLibrary {
>>     name: "Alarms"
>>     Depends { name: "cpp" }
>>     cpp.includePaths: [ ...]
>>     cpp.libraryPaths: [ ... ]
>>     cpp.defines: [ ...]
>>     Depends { ... }
>>     files: [ ...]
>> }
> Try settings cpp.architecture: "x86"[0], or if building from the command line,

No, I don't want to make my Qbs file architecture specific.

> use: [1]
>> qbs -f /path/to/project.qbs --products productname qbs.architecture:x86_64

I do understand again, but Qbs/Qtc is doing it wrong, the Qt mkspec is
"linux-g++-32", so qbs should know the architecture - somehow.
IMHO, QtC should do this for me.

If Qbs cannot deduce the architecture from Qt's mkspec, then QtC
should set the qbs.architecture when i create a Kit with the "32 bits"
host toolchain.

I'm trying to find out where do i need to report a bug: QtC or Qbs?

If the trick when doing 32 bits build on a 64 bits platform is what
you described above, then the bug is in QtC.

Thanks,
Chris

>
> [0]: https://doc.qt.io/qbs/cpp-module.html#general-properties
> [1]: https://wiki.qt.io/Qbs_Quick_Reference#Command-line_examples
>
> Hope this helps.
>
>  - ely
> _______________________________________________
> Qbs mailing list
> Qbs at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>



More information about the Qbs mailing list