[Pkg-allegro-maintainers] Bug#417510: FTBFS with GCC 4.3: missing #includes

Martin Michlmayr tbm at cyrius.com
Mon Apr 2 21:55:42 UTC 2007


Package: rafkill
Version: 1.2.2-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 rafkill_1.2.2-3 on em64t by sbuild/amd64 0.53
...
> build/gunobj.h:52: warning: type qualifiers ignored on function return type
> build/menu.cpp: In member function 'char* menuClass::getFileInfo(int)':
> build/menu.cpp:613: error: 'malloc' was not declared in this scope
> scons: *** [build/menu.o] Error 1

--- build/guns/gun_findgun.cpp~	2007-04-02 21:46:07.000000000 +0000
+++ build/guns/gun_findgun.cpp	2007-04-02 21:46:20.000000000 +0000
@@ -5,6 +5,7 @@
 #include "weaponobj.h"
 #include "hulls/hull_weapon_machine.h"
 #include "spaceobj.h"
+#include <cstdlib>
 #include <vector>
 #include <math.h>
 
--- build/guns/gun_machine_circle.cpp~	2007-04-02 21:46:51.000000000 +0000
+++ build/guns/gun_machine_circle.cpp	2007-04-02 21:46:56.000000000 +0000
@@ -3,6 +3,7 @@
 #include "weaponobj.h"
 #include "hulls/hull_weapon_machine.h"
 #include "trigtable.h"
+#include <cstdlib>
 
 // #define d_circle_move (2.9*8)
 
--- build/guns/gun_saber.cpp~	2007-04-02 21:47:51.000000000 +0000
+++ build/guns/gun_saber.cpp	2007-04-02 21:47:57.000000000 +0000
@@ -5,6 +5,7 @@
 #include "weapons/weapon_beam.h"
 #include "spaceobj.h"
 #include "ebox.h"
+#include <cstdlib>
 #include <vector>
 
 using namespace std;
--- build/menu.cpp~	2007-04-02 21:43:40.000000000 +0000
+++ build/menu.cpp	2007-04-02 21:43:51.000000000 +0000
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <cstdlib>
 #include "defs.h"
 #include "menu.h"
 #include "loadsave.h"
--- build/weapons/weapon_follow.cpp~	2007-04-02 21:44:52.000000000 +0000
+++ build/weapons/weapon_follow.cpp	2007-04-02 21:44:59.000000000 +0000
@@ -3,6 +3,7 @@
 #include "weapon_follow.h"
 #include "hulls/hull_weapon_follow.h"
 #include "spaceobj.h"
+#include <cstdlib>
 #include <vector>
 
 using namespace std;
--- build/hulls/hull_weapon_beam.cpp~	2007-04-02 21:48:40.000000000 +0000
+++ build/hulls/hull_weapon_beam.cpp	2007-04-02 21:48:46.000000000 +0000
@@ -4,6 +4,7 @@
 #include "hull_weapon_beam.h"
 #include "trigtable.h"
 #include "ebox.h"
+#include <cstdlib>
 
 #ifndef debug
 #include <iostream>

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




More information about the Pkg-allegro-maintainers mailing list