[Interest] 32bits builds on 64bits Linux platform

Oliver Niebuhr googleersatz at oliverniebuhr.de
Sat Aug 26 04:27:06 CEST 2017


Am 26.08.2017 um 03:26 schrieb Christian Gagneraud:
> Hi there,
> 
> I have an application that requires a 32 bits version of Qt-5.6 and
> fixing the 32 vs 64 bits issues of this app is not option at this
> stage.
> 
> So I need to build Qt-6.6 in 32 bits mode on a 64 bits Linux platfrom,
> and then i need to build and run my 32 bits app on the same 64 bits
> Linux platform against this 32 bits Qt-5.6.
> 
> Is it possible to to build 32 bits Qt on 64 bits platform? Has anyone
> manage to do that? Any advice, tips or tricks to share?
> 
> Thanks in advance,
> Chris
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> 

Good Morning.

Yes it is possible. To build 32-Bit Binaries and Libs on a 64-Bit OS,
you must install the "Multilib" Version of the Compiler and the used
Dev-Packages. So in example for the GCC Compiler (G++): Remove the "GCC"
Package and replace it with "GCC-Multilib" (at least this is the Name
under Antergos Linux (Arch based). Not sure about other Distros. My main
OS is still Windows so I am still kind-a noob when it comes to Linux
Development :)

Some 32-Bit Libraries (or Package Names to be more precise) are named
like "lib32-example1". Others like "example2-multilib". Depending on the
Library itself and your Distribution.

You propably need to activate the Multilib Repository for your
Distribution first, if you dont have any 32-Bit Stuff installed yet.

Qt Configure Parameter for the GCC / G++ Compiler:
The important Configure Parameter for you (so that Qt tells the
Compiler to build 32-Bit Binaries etc.) is:
"/your/qt56/sourcefolder/configure -platform linux-g++-32"

No Idea about other Distros or Compiler like LLVM/Clang.

Good Luck :)

Greetings
Oliver



More information about the Interest mailing list