[Qbs] Linux 32 bits build on x86_64 host
Christian Kandeler
Christian.Kandeler at qt.io
Sat Sep 9 18:37:27 CEST 2017
I don't have a Creator checkout at hand, but the problem is probably that we fail to pass the target architecture to qbs, which then uses the compiler default. Workaround: Set qbs.architecture to "x86" in the qbs-specific part of the Kit settings.
Can you please file a bug report?
________________________________________
From: Qbs <qbs-bounces+christian.kandeler=qt.io at qt-project.org> on behalf of Christian Gagneraud <chgans at gmail.com>
Sent: Saturday, September 9, 2017 2:07 AM
To: qbs; qt-creator
Subject: [Qbs] Linux 32 bits build on x86_64 host
[cross-posted qbs + qt-creator]
Hi there,
I'm using a 64bits Linux host and I have installed the "official"
Qt-5.5-linux-32.
I have then setup QtCreator:
Qt Version:
Name: Qt 5.5.1 (gcc-32)
ABI: x86-linux-generic-elf-32bit
Source: /opt/Qt32/5.5/gcc
mkspec: linux-g++-32
qmake: /opt/Qt32/5.5/gcc/bin/qmake
Version: 5.5.1
QMAKE_SPEC linux-g++-32
QMAKE_VERSION 3.0
QMAKE_XSPEC linux-g++-32
Kit:
Qt Version: Qt 5.5.1 (gcc-32)
C Compiler: GCC (C, x86 32 bit in /usr/bin)
C++ Compiler: GCC (x86 32 bit in /usr/bin)
My Qt version is really 32 bits:
$ file /opt/Qt32/5.5/gcc/lib/libQt5Sql.so.5.5.1
/opt/Qt32/5.5/gcc/lib/libQt5Sql.so.5.5.1: ELF 32-bit LSB shared
object, Intel 80386, version 1 (SYSV), dynamically linked,
BuildID[sha1]=055df3fbcd976602a1ce4f1fcfcaae4151345cfa, stripped
My qbs project files are so far dead simple, I have static libraries
and some apps all have very basic content, eg:
import qbs
StaticLibrary {
name: "Alarms"
Depends { name: "cpp" }
cpp.includePaths: [ ...]
cpp.libraryPaths: [ ... ]
cpp.defines: [ ...]
Depends { ... }
files: [ ...]
}
Absolutely nowhere I attempt to manipulate compiler flags in any way.
But when I build the project, qbs generate "/usr/bin/g++ -m64"
compiler commands.
Is this a bug in Qbs or QtCreator, or a problem in my setup?
Now if i create custom toolchains using /usr/bin/g++ and adding -m32
to the "platform code gen flags" (Qtc detects correctly that is is a
32 bits ABI) and associate these toochains with my Qt Kit, qbs
generate "/usr/bin/g++ -m64 -m32" compiler commands.
Any help appreciated.
Chris
_______________________________________________
Qbs mailing list
Qbs at qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs
More information about the Qbs
mailing list