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

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



Package: kdeadmin
Version: 4:3.5.5-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 kdeadmin_4:3.5.5-4 on coconut0 by sbuild/ia64 0.49
...
> /build/tbm/kdeadmin-3.5.5/./kcron/ctcron.cpp: In constructor 'CTCron::CTCron(const passwd*)':
> /build/tbm/kdeadmin-3.5.5/./kcron/ctcron.cpp:122: error: 'system' was not declared in this scope
> /build/tbm/kdeadmin-3.5.5/./kcron/ctcron.cpp:128: warning: conversion to 'unsigned int' from 'size_t' may alter its value
> /build/tbm/kdeadmin-3.5.5/./kcron/ctcron.cpp:129: warning: conversion to 'unsigned int' from 'size_t' may alter its value
> /build/tbm/kdeadmin-3.5.5/./kcron/ctcron.cpp: In function 'std::istream& operator>>(std::istream&, CTCron&)':
> /build/tbm/kdeadmin-3.5.5/./kcron/ctcron.cpp:181: warning: conversion to 'int' from 'size_t' may alter its value
> /build/tbm/kdeadmin-3.5.5/./kcron/ctcron.cpp:200: warning: conversion to 'int' from 'size_t' may alter its value
> /build/tbm/kdeadmin-3.5.5/./kcron/ctcron.cpp:201: warning: conversion to 'int' from 'size_t' may alter its value
> /build/tbm/kdeadmin-3.5.5/./kcron/ctcron.cpp: In member function 'void CTCron::apply()':
> /build/tbm/kdeadmin-3.5.5/./kcron/ctcron.cpp:272: error: 'system' was not declared in this scope

--- lilo-config/common/String.cc~	2007-04-02 08:26:58.000000000 +0000
+++ lilo-config/common/String.cc	2007-04-02 08:27:05.000000000 +0000
@@ -27,6 +27,7 @@
 ** Bug reports and questions can be sent to kde-devel@kde.org
 */
 #define _GNU_SOURCE 1
+#include <cstdlib>
 #include <features.h>
 #include <string.h>
 #include <string>
--- lilo-config/kde-qt-common/general.cpp~	2007-04-02 08:27:41.000000000 +0000
+++ lilo-config/kde-qt-common/general.cpp	2007-04-02 08:27:51.000000000 +0000
@@ -32,6 +32,7 @@
 #include <qlayout.h>
 #include <ui.h>
 #include <qwhatsthis.h>
+#include <cstdlib>
 General::General(liloconf *l, QWidget *parent, const char *name):QWidget(parent, name)
 {
 	lilo=l;
--- kcron/ctunit.cpp~	2007-04-02 08:34:14.000000000 +0000
+++ kcron/ctunit.cpp	2007-04-02 08:34:20.000000000 +0000
@@ -13,6 +13,7 @@
 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
 
 #include "cti18n.h"
+#include <cstdlib>
 #include <vector>
 #include <string>
 #include <stdio.h>    // sprintf

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



Reply to: