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

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



Package: lineak-xosdplugin
Version: 1:0.9-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 (20070326-1 or higher)
from unstable.

> Automatic build of lineak-xosdplugin_1:0.9-4 on coconut0 by sbuild/ia64 0.49
...
>  ia64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -g -Wall -O2 -I/usr/include -I.. -I. -I -I/usr/include/lineak -I/usr/include -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -MT xosdctrl.lo -MD -MP -MF .deps/xosdctrl.Tpo -c xosdctrl.cpp  -fPIC -DPIC -o .libs/xosdctrl.o
> xosdctrl.cpp: In constructor 'xosdCtrl::xosdCtrl()':
> xosdctrl.cpp:87: error: 'atoi' was not declared in this scope
> xosdctrl.cpp: In member function 'virtual void xosdCtrl::init(LConfig&, bool)':
> xosdctrl.cpp:143: error: 'atoi' was not declared in this scope
> xosdctrl.cpp: In member function 'virtual void xosdCtrl::volume(float)':
> xosdctrl.cpp:271: warning: conversion to 'float' from 'double' may alter its value
> xosdctrl.cpp: In member function 'virtual void xosdCtrl::setColor(const std::string&)':
> xosdctrl.cpp:330: error: 'malloc' was not declared in this scope
> xosdctrl.cpp:335: error: 'free' was not declared in this scope
> make[3]: *** [xosdctrl.lo] Error 1

--- xosd_plugin/xosdctrl.cpp~	2007-04-02 13:16:28.000000000 +0000
+++ xosd_plugin/xosdctrl.cpp	2007-04-02 13:16:36.000000000 +0000
@@ -21,6 +21,7 @@
 #include <lineak/lconfig.h>
 #include <lineak/lineak_core_functions.h>
 
+#include <cstdlib>
 
 using namespace lineak_core_functions;
 using namespace std;

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



Reply to: