[Pkg-kde-extras] Bug#417230: FTBFS with GCC 4.3: missing #includes

Martin Michlmayr tbm at cyrius.com
Sun Apr 1 21:14:50 UTC 2007


Package: icecc
Version: 0.7.14-4
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 icecc_0.7.14-4 on coconut0 by sbuild/ia64 0.49
...
>  g++ -DHAVE_CONFIG_H -I. -I. -I.. -I./../minilzo -fPIC -DPIC -W -Wall -Wimplicit -Wpointer-arith -Wcast-align -Wwrite-strings -g -Wall -O2 -c job.cpp -o libicecc_la-job.o
> In file included from job.cpp:22:
> logging.h:85: error: 'uint' does not name a type
> logging.h: In constructor 'log_block::log_block(const char*)':
> logging.h:92: error: 'nesting' was not declared in this scope
> logging.h:98: error: 'nesting' was not declared in this scope
> logging.h: In destructor 'log_block::~log_block()':
> logging.h:109: error: 'nesting' was not declared in this scope
> logging.h:115: error: 'free' was not declared in this scope
^^^^^^^^^^^^^^^^^^^
> /usr/lib/gcc-snapshot/lib/gcc/ia64-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/basic_string.h: In member function 'std::basic_string<_CharT, _Traits, _Alloc>::_Rep* std::basic_string<_CharT, _Traits, _Alloc>::_M_rep() const [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]':
> /usr/lib/gcc-snapshot/lib/gcc/ia64-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/basic_string.h:496:   instantiated from 'std::basic_string<_CharT, _Traits, _Alloc>::~basic_string() [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]'
> job.h:32:   instantiated from here
> /usr/lib/gcc-snapshot/lib/gcc/ia64-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/basic_string.h:288: warning: cast from 'char*' to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep*' increases required alignment of target type
> make[3]: *** [libicecc_la-job.lo] Error 1
> make[3]: Leaving directory `/build/tbm/icecc-0.7.14/services'


--- services/logging.h~	2007-04-01 21:06:21.000000000 +0000
+++ services/logging.h	2007-04-01 21:06:28.000000000 +0000
@@ -21,6 +21,7 @@
 #ifndef _LOGGING_H
 #define _LOGGING_H
 
+#include <cstdlib>
 #include <sys/time.h>
 #include <errno.h>
 #include <string>

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




More information about the pkg-kde-extras mailing list