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

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

Package: vbs
Version: 1.4.0-9
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

You can reproduce this problem with gcc-snapshot (20070326-1 or higher)
from unstable. (Currently not available for i386, but for amd64, powerpc
and ia64.  I hope to have i386 binaries in the archive in ~3 weeks.)

> Automatic build of vbs_1.4.0-9 on coconut0 by sbuild/ia64 0.49
> g++ -DHAVE_CONFIG_H -Isrc -I. -g -O2 -ansi -pedantic -Wall -fPIC -DVBS_DEBUG -c src/swig/vbs_api.cc
> In file included from src/common/bvector.h:33,
>                  from src/common/st_node.h:16,
>                  from src/common/sym_tab.h:26,
>                  from src/swig/vbs_api.cc:20:
> src/common/logic.h: In static member function 'static void* logic::operator new(size_t)':
> src/common/logic.h:87: error: 'malloc' was not declared in this scope
> src/common/logic.h: In static member function 'static void* logic::operator new [](size_t)':
> src/common/logic.h:107: error: 'malloc' was not declared in this scope

--- src/common/logic.h~	2007-04-04 12:51:55.000000000 +0000
+++ src/common/logic.h	2007-04-04 12:52:05.000000000 +0000
@@ -19,6 +19,8 @@
 #ifndef _LOGIC_H
 #define _LOGIC_H
+#include <cstdlib>
 class logic
 	friend bool operator==(const logic, const logic);
--- src/common/dumpstrm.cc~	2007-04-04 12:52:50.000000000 +0000
+++ src/common/dumpstrm.cc	2007-04-04 12:52:56.000000000 +0000
@@ -12,6 +12,7 @@
 // dumpstrm.cc
 #include <cstdio> // sprintf
+#include <cstdlib>
 #include <iostream>
 #include "dumpstrm.h"
--- src/swig/vbs_api.cc~	2007-04-04 12:50:32.000000000 +0000
+++ src/swig/vbs_api.cc	2007-04-04 12:50:38.000000000 +0000
@@ -11,6 +11,7 @@
 // vbs_api.cc
+#include <cstdlib>
 #include <csetjmp> // longjmp()
 #include <list>
 #include <sstream>

Martin Michlmayr

Reply to: