[Qt-interest] Qt4.5 branch trying to build 64bit on 32bit linux

Andreas Pakulat apaku at gmx.de
Thu Jun 18 08:50:49 CEST 2009


On 17.06.09 19:46:34, Thiago Macieira wrote:
> Andreas Pakulat wrote:
> >seems like there's been some change to the architecture-detection code
> >in Qt's configure. The 4.5.1 I've built via kdesvn from qt-copy had no
> >problems whatsoever, however I just fetched the 4.5 branch from git and
> >that tries to build qmake for 64bit which of course doesn't work on my
> >32bit system.
> >
> >The problem is that apparently the newer detection code relies on the
> >output of uname -m which is not enough in my case. I'm running an amd64
> >Kernel but the distribution itself is pure 32bit (so I can easily access
> >the full 4GB of RAM). This means that uname -m prints x86_64, but
> >compiling an application with the 64-bit flags will not work.
> >
> >I'd like to get some input on wether I just need to live with the
> >setarch call before configuring or wether maybe configure should be
> >extended (again?) to cope for that case.
> >
> >FWIW, cmake has no problem with my setup and will always create 32bit
> >binaries.
> 
> The problem isn't cmake or qmake.
> 
> The problem is that Qt has assembly code that needs to be selected 
> according to the architecture being built for. The x86 code does not work 
> for x86-64, nor vice-versa.
> 
> The compiler knows what to produce and it knows therefore which #define 
> macro to add (__i386__ or __x86_64__). However, Qt doesn't use that to 
> determine what to build: since it needs to add a global #define 
> (QT_ARCH_I386, for example), that is determined by configure. And the test, 
> like you said, is uname -m.
> 
> Could it be better? Definitely. For example, by compiling a simple program 
> and the program outputting the arch that it got compiled into, according 
> to the standard #define's by the compiler.

I just found out that part of my statement was even wrong, it seems it
never worked with kdesvn-build and qt-copy either as I just saw that I
have -platform linux-g++-32 in my kdesvn-buildrc file. So nothing broke
in Qt4.5, its just a bit of missing convenience (otoh one could argue
that I just setup a proper build env before starting to compile things)

Andreas
 
-- 
You're not my type.  For that matter, you're not even my species!!!



More information about the Qt-interest-old mailing list