[Interest] Qt Binaries for Mingw 4.7

Konrad Rosenbaum konrad at silmor.de
Sun Jul 22 17:38:08 CEST 2012


Hi,

On Thursday 19 July 2012, K. Frank wrote:
> On Thu, Jul 19, 2012 at 4:07 AM, Konrad Rosenbaum <konrad at silmor.de> 
wrote:
> > I'm using features of C++11 (provided by GCC 4.7, and maybe LLVM 3.1)
> 
> Me too, especially std::thread.

Lambdas and variadic templates (in connection they make a nice wrapper for 
directing signals to lambdas with an unchanged Qt4).

> > in my
> > projects, which is fine for Linux, but there are some problems on
> > Windows.
> 
> I have been using mingw-w64 4.7.0 with Qt to good effect.

Ok, I did not move Windows to 64bits yet. With Windows I'm always afraid 
that the Redmonders mix up 8-byte-wide addresses with drinking 64 Bit beers 
(short for Bitburger beer) - that much would definitely not be good for 
you... ;-)

> > Moving back to an earlier GCC is not an option - I'd rather drop
> > Windows- Support (I've already dropped Mac for the same reason).
> > 
> > If I use the official Qt 4.8.2 binary package for Mingw 4.4 the
> > application crashes immediately on start when it is trying to
> > initialize itself. I presume a Qt compiled with Mingw4.4 is
> > incompatible with a project compiled with Mingw 4.7 - is this correct?
> 
> I do not know for sure, but it would not surprise me if 4.4 and 4.7
> code would be incompatible.  The various mingw projects do try
> to maintain abi (link-time) compatibility, but not at all costs.  I have
> always been conservative and made a point of rebuilding Qt (and
> other libraries) when upgrading the version of g++ I use for day-to-day
> use.

The version of the main library for MinGW changed from 3.16 to 3.17 between 
4.6 and 4.7 - this might indicat an ABI break. :-(

> > I'm also trying to compile Qt myself - after several days it is still
> > in the middle of compiling the Webkit module. I know compiling on
> > windows is slow - but this bad?
> 
> My most recent build of Qt was 4.8.0-rc1 (so not your 4.8.2 version,
> but still 4.8) using a 64-bit mingw-w64 Ruben personal build of
> g++ 4.7.0 on a native 64-bit windows 7 system.
> 
> It took "about a day" (where "about a day" might mean, say, ten
> hours).  It was certainly "rather slow" -- it didn't take just a couple
> of hours, but neither did it take a couple of days.

I could reduce to 5 hours by moving the sources from my "shared drive" to a 
virtual hard disk and by configuring Qt to not compile Webkit and all 
Multimedia related modules.

> (As I understand it, make / g++, with their roots in the unix world,
> spawn a bunch of subprocesses to do the work, and that's an
> expensive process on windows.)

I'm getting the feeling that GCC and especially ld make a lot of separate 
and small file I/O operations - these come at almost no cost on Unices, but 
bear a heavy cost on Windows. A few years ago I found out the hard way that 
regular fflush-calls make a runtime-difference of factor(!!) 60 between 
Linux and Windows - it seems things are even worse on networked file 
systems.

> > Windows runs in a VirtualBox VM, Guest Utils are installed, the
> > sources and Mingw are in a shared folder. I would try to move
> > everything to a virtual hard disk next - does anyone know whether this
> > would help?
> 
> I definitely have had link times be really slow when the input
> object files and the output exe's and/or libs resided on network
> storage, rather than on a local hard drive.
> 
> I don't know whether this is relevant to your case, though.

It seems to be.

> One comment:  I built Qt using its "default" configuration (i.e.,
> I didn't explicitly turn anything on or off).  I think that Webkit
> gets built by default, but I don't actually know.  (I'd be glad
> to check if someone would tell me how.)

It does get built by default - that what took about 2 days before it crashed 
the build-process while linking (memory exhausted in ld).

> Also, I did not use the g++ command-line argument that turns
> on c++11 support ("-std=c++0x") when compiling Qt.  I believe,
> but haven't verified, that I could compile my code with -std=c++0x,
> and link it with Qt built without.

It's certainly possible on Linux and I did do this on Windows while I was 
still using GCC 4.6.2 and Qt 4.7.4.

With GCC 4.7 and Qt 4.8.2 I just compiled Qt without any -std=* flag and the 
program with -std=g++0x. It runs, but crashes on a very specific operation - 
I'm still investigating why (might be OpenSSL or a flaw in my program).


	Konrad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120722/b62b086f/attachment.sig>


More information about the Interest mailing list