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

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



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

> Automatic build of lineakd_1:0.9-3 on coconut0 by sbuild/ia64 0.49
...
> ../lineak/lbutton.h:46: warning: type qualifiers ignored on function return type
> xmgr.cpp: In constructor 'Xmgr::Xmgr(std::string)':
> xmgr.cpp:46: warning: cast from 'const char*' to '<anonymous struct>*' increases required alignment of target type
> xmgr.cpp: In member function 'void Xmgr::openXkbDisplay(std::string)':
> xmgr.cpp:78: error: 'malloc' was not declared in this scope
> xmgr.cpp:82: error: 'free' was not declared in this scope
> xmgr.cpp: In member function 'void Xmgr::commitXKBChanges(int)':
> xmgr.cpp:126: warning: conversion to 'KeyCode' from 'int' may alter its value
> xmgr.cpp: In member function 'void Xmgr::setXKBKey(int, KeySym)':
> xmgr.cpp:172: warning: conversion to 'KeyCode' from 'int' may alter its value
> xmgr.cpp: At global scope:
> xmgr.cpp:194: warning: unused parameter 'theDisplay'
> xmgr.cpp: In member function 'bool Xmgr::getModifiers()':
> xmgr.cpp:235: warning: conversion to 'unsigned int' from 'int' may alter its value
> xmgr.cpp:237: warning: conversion to 'unsigned int' from 'int' may alter its value
> xmgr.cpp: In member function 'bool Xmgr::initialize(LKbd&)':
> xmgr.cpp:285: warning: conversion to 'long int' from 'long unsigned int' may alter its value
> xmgr.cpp:322: error: 'exit' was not declared in this scope

--- lineak/xmgr.cpp~	2007-04-02 13:17:31.000000000 +0000
+++ lineak/xmgr.cpp	2007-04-02 13:17:39.000000000 +0000
@@ -21,6 +21,7 @@
 #include <lineak/lbutton.h>
 
 extern "C" {
+   #include <stdlib.h>
    #include <signal.h>
    #include <X11/Xlib.h>
    #include <X11/keysym.h>
--- lineak/defloader.h~	2007-04-02 13:20:35.000000000 +0000
+++ lineak/defloader.h	2007-04-02 13:20:47.000000000 +0000
@@ -23,6 +23,7 @@
 #   endif
 
 #   include <lineak/loader.h>
+#   include <cstdlib>
 #   include <map>
 
 class LDef;

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



Reply to: