[DebianGIS-dev] Bug#505629: FTBFS with GCC 4.4: missing #include

Martin Michlmayr tbm at cyrius.com
Thu Nov 13 22:18:38 UTC 2008


Package: gdal
Version: 1.5.2-3
User: debian-gcc at lists.debian.org
Usertags: ftbfs-gcc-4.4
Tags: patch

Your package fails to build with the upcoming GCC 4.4.  Version 4.4
has not been released yet but I'm building with a snapshot in order
to find errors and give people an advance warning.

GCC 4.4 cleaned up some more C++ headers.  You always have to #include
headers directly and cannot rely for things to be included indirectly.

You can reproduce this problem with gcc-snapshot from unstable.

> Automatic build of gdal_1.5.2-3 on em64t by sbuild/amd64 0.53
...
> /bin/sh /build/tbm/gdal-1.5.2/libtool --mode=compile --tag=CXX g++ -g -O2  -Wall  -I/usr/include -I/usr/include/xercesc -DOGR_ENABLED -I/build/tbm/gdal-1.5.2/port  -I.. -c -o ../../o/iom_utilities.o iom_utilities.cpp
>  g++ -g -O2 -Wall -I/usr/include -I/usr/include/xercesc -DOGR_ENABLED -I/build/tbm/gdal-1.5.2/port -I.. -c iom_utilities.cpp  -fPIC -DPIC -o ../../o/.libs/iom_utilities.o
> iom_utilities.cpp: In function 'char* iom_gettmpnam()':
> iom_utilities.cpp:230: error: 'tempnam' was not declared in this scope
> make[5]: *** [../../o/iom_utilities.o] Error 1
> make[5]: Leaving directory `/build/tbm/gdal-1.5.2/ogr/ogrsf_frmts/ili/iom'

--- ogr/ogrsf_frmts/ili/iom/iom_utilities.cpp~	2008-11-13 22:02:15.000000000 +0000
+++ ogr/ogrsf_frmts/ili/iom/iom_utilities.cpp	2008-11-13 22:02:21.000000000 +0000
@@ -33,6 +33,7 @@
  * @{
  */
 
+#include <cstdio>
 #include <iostream>
 #include <string>
 #include <string.h>

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





More information about the Pkg-grass-devel mailing list