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

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

Package: unalz
Version: 0.55-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

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 unalz_0.55-3 on coconut0 by sbuild/ia64 0.49
> make[1]: Entering directory `/build/tbm/unalz-0.55'
> g++ -Wall -g -O2   -c -o main.o main.cpp
> In file included from main.cpp:11:
> UnAlz.h: In member function 'void UNALZ::SLocalFileHeader::Clear()':
> UnAlz.h:272: error: 'free' was not declared in this scope
> UnAlz.h:272: error: 'free' was not declared in this scope

--- unalz-0.55.orig/UnAlz.h
+++ unalz-0.55/UnAlz.h
@@ -96,6 +96,7 @@
 #ifndef _UNALZ_H_

 #define _UNALZ_H_


+#include <cstdlib>

 #include <vector>

 using namespace std;


Martin Michlmayr

Reply to: