[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

prepare to fix build failures with new GCC versions

Hash: SHA1

The new GCC versions 4.5 and 4.6 will introduce again some build failures in
package builds.  Please prepare to fix packages the package builds.  Bugs for
earlier rebuild tests with GCC 4.5 were filed in [1], GCC 4.6 related bug
reports will be filed in [2].  These issues will end up as release critical bug
reports during the wheezy cycle.

Build failures are seen at least in the following areas

 - Missing includes of stdc++ header files (both 4.5 and 4.6).

 - G++ became stricter.

 - Unreflected usage of symbols files for C++ libraries.

 - New warnings triggering build failures in packages building with

GCC-4.5 can be found in unstable as gcc-4.5/g++-4.5,  snapshots of GCC-4.6 can
be found in unstable as gcc-snapshot and in experimental as gcc-4.6/g++-4.6.

Release notes for GCC-4.5 can be found in /usr/share/doc/gcc-4.5/NEWS.gz.  A
draft for the 4.6 news can be found at [3].

Missing includes of stdc++ header files
- ---------------------------------------

libstdc++ headers changed again, and may result in missing definitions for C
functions.  When fixing packages, please consider to use the C++ headers, not
the C header, e.g. <cstdlib> instead of <stdlib.h>.

G++ strictness
- --------------

Most C++ related build failures are of the form

ustring.h:337:8: error: 'k3d::ustring::ustring' names the constructor, not the type

Just use k3d::ustring for the type.

Unreflected usage of symbols files for C++ libraries
- ----------------------------------------------------

These seem to be limited to Qt and KDE related libraries.

Apparently g++-4.4 did emit references to symbols defined in header files of
depending libraries.  At least some of these are not emitted anymore with 4.5
and 4.6.  Packages calling dpkg-gensymbols with -c2 or higher, fail to build.

The mangling for virtual thunks did change, and generates different symbols on
some architectures.  The issues can be avoided by using the unmangled names.

New warnings triggering build failures with -Werror
- ---------------------------------------------------

in GCC 4.6, -Wall now includes the warning -Wunused-but-set-variable, which
triggers a lot and causes build failures when building with -Werror.  In the
gcc-4.6 packages, -Wno-error=unused-but-set-variable is now passed when -Werror
is found to get test results beyond this kind of build failure.  See [4].  This
behaviour will be reverted in the wheezy cycle.

When submitting new issues about GCC-4.5 and GCC-4.6 related build failures,
please tag these according to [1] and [2].

Thanks, Matthias

[3] http://gcc.gnu.org/gcc-4.6/changes.html
[4] http://bugs.debian.org/615157
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


Reply to: