Bug#417112: FTBFS with GCC 4.3: missing #includes

Martin Michlmayr tbm at cyrius.com
Sun Apr 1 15:58:11 UTC 2007


Package: asc
Version: 1.16.3.0-3
Usertags: ftbfs-gcc-4.3
Tags: patch

Your package fails to build with GCC 4.3.  Version 4.3 has not been
released yet but I'm building with a snapshot in order to find errors
and give people an advance warning.  In GCC 4.3, the C++ header
dependencies have been cleaned up.  The advantage of this is that
programs will compile faster.  The downside is that you actually
need to directly #include everything you use (but you really should
do this anyway, otherwise your program won't work with any compiler
other than GCC).  Some background of this can be found at
http://gcc.gnu.org/PR28080

You can reproduce this problem with gcc-snapshot from unstable.

> Automatic build of asc_1.16.3.0-3 on coconut0 by sbuild/ia64 0.49
...
>  ia64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2 -g -O2 -Wno-sign-compare -funsigned-char -D_UNIX_ -D_SDL_ -DSIZE_T_not_identical_to_INT -MT sound.lo -MD -MP -MF .deps/sound.Tpo -c sound.cpp -o sound.o
> In file included from ../ascstring.h:6,
>                  from sound.h:15,
>                  from sound.cpp:19:
> ../ASCStringHelpers.h: In static member function 'static size_t ASCStringHelpers::_ConvertToCharT(char*, const wchar_t*, size_t)':
> ../ASCStringHelpers.h:474: error: 'wcstombs' is not a member of 'std'
> sound.cpp: In constructor 'SoundSystem::SoundSystem(bool, bool, bool)':
> sound.cpp:84: warning: deprecated conversion from string constant to 'char*'
> sound.cpp: In member function 'void SoundSystem::nextTrack()':
> sound.cpp:133: warning: deprecated conversion from string constant to 'char*'
> make[4]: *** [sound.lo] Error 1


--- source/ASCStringHelpers.h~	2007-04-01 15:35:58.000000000 +0000
+++ source/ASCStringHelpers.h	2007-04-01 15:36:03.000000000 +0000
@@ -1,6 +1,7 @@
 #ifndef __ASC_STRING_HELPERS_H_INCLUDED__
 #define __ASC_STRING_HELPERS_H_INCLUDED__
 
+#include <cstdlib>
 #include <cassert>
 #include <cstdarg>
 #include <cstdio>

-- 
Martin Michlmayr
http://www.cyrius.com/




More information about the Pkg-games-devel mailing list