[DebianGIS-dev] Bug#419827: FTBFS with GCC 4.3: missing #includes

Martin Michlmayr tbm at cyrius.com
Wed Apr 18 05:41:34 UTC 2007


Package: gdal
Version: 1.4.1-1
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. (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 gdal_1.4.1-1 on em64t by sbuild/amd64 0.53
...
> ilwisdataset.cpp: In function 'long int longConv(double)':
> ilwisdataset.cpp:249: error: 'LONG_MAX' was not declared in this scope
> ilwisdataset.cpp:249: error: 'LONG_MIN' was not declared in this scope
> ilwisdataset.cpp: In function 'CPLErr GetRowCol(std::string, int&, int&)':
> ilwisdataset.cpp:314: warning: comparison between signed and unsigned integer expressions
> ilwisdataset.cpp:325: warning: comparison between signed and unsigned integer expressions
> ilwisdataset.cpp: In function 'ilwisStoreType stNeeded(long unsigned int)':
> ilwisdataset.cpp:1749: error: 'SHRT_MAX' was not declared in this scope
> ilwisdataset.cpp: In member function 'void ValueRange::init(double)':
> ilwisdataset.cpp:1793: error: 'ULONG_MAX' was not declared in this scope
> ilwisdataset.cpp:1798: error: 'LONG_MAX' was not declared in this scope
> make[3]: *** [../o/ilwisdataset.o] Error 1
> make[3]: Leaving directory `/build/tbm/gdal-1.4.1/frmts/ilwis'

--- frmts/ilwis/ilwisdataset.cpp~	2007-04-18 05:20:14.000000000 +0000
+++ frmts/ilwis/ilwisdataset.cpp	2007-04-18 05:20:25.000000000 +0000
@@ -29,6 +29,7 @@
 
 #include "ilwisdataset.h"
 #include <float.h>
+#include <climits>
 
 // IniFile.cpp: implementation of the IniFile class.
 //
--- frmts/idrisi/IdrisiDataset.cpp~	2007-04-18 05:24:11.000000000 +0000
+++ frmts/idrisi/IdrisiDataset.cpp	2007-04-18 05:24:21.000000000 +0000
@@ -34,6 +34,7 @@
 #include "ogr_spatialref.h"
 #include "gdal_pam.h"
 #include "gdal_alg.h"
+#include <climits>
 
 CPL_CVSID("$Id: IdrisiDataset.cpp 10646 2007-01-18 02:38:10Z warmerdam $");
 

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




More information about the Pkg-grass-devel mailing list