Compiler Notes - GCC

Compiler Notes - GCC


gcc 3.*

We have tested Qt with this compiler on Intel/Linux and SPARC/Solaris. We have heard of compiler problems with the gcc 3.* series on other systems such as PA-RISC/HP-UX.

gcc 2.96

There are some optimization problems with the gcc 2.96-54 compiler bundled with Red Hat 7.0. Fix by upgrading to gcc 2.96-69 or better.

gcc 2.8.*

These compilers are not supported anymore.

gcc 2.7.*

These compilers are not supported anymore.

Crash on 64-bits architectures

Some gcc/egcs versions are unable to generate a correctly working 64-bits shared library of Qt. egcs 1.1.1 is reported not to have this problem. For Linux-AXP, this is a bug in binutils, versions older than 2.9.1.0.13.

Other problems on 64-bits architectures

On SPARC/Solaris gcc 3.1 miscompiles 64-bit targets, resulting for example in layout problems.

Crash on Linux-AXP

Reported on Alpha: Optimization bug reported for egcs 1.1.b and gcc 2.95.2 causes all programs to segfault; work around by replacing -O2 with -O1 or -O0.

gcc on HP-UX

We have found that it is necessary to use the zlib provided from the Software Porting And Archive Centre for HP-UX. Add -system-zlib -I<zlib-include-path> -L<zlib-lib-path> to your configure line. STL and thread support does not appear to work with the current GCC packages (except for gcc 3.2).

gcc 3.* on HP-UX

gcc 3.0.*, 3.1.* and 3.2 suffer a number of bugs on HP-UX platforms. Please use gcc 3.2.3 or better, or a previous versions of gcc such as gcc 2.95.3.
Note: We have successfully build Qt 3.1.2 with gcc 3.2 for 32-bit targets on HP-UX with both STL and thread support.

egcs 2.91.66

To compile Qt 3.3.0 with this experimental version of gcc one will have to disable optimizations

We use gcc 2.95.*, gcc 3.2, and gcc 3.3 for daily development and test Qt with gcc on all supported X11 platforms.


Copyright 2008, Trolltech ASA