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

2008-03-20 Thread Moritz Muehlenhoff
tags 461673 patch
thanks

On Sun, Jan 20, 2008 at 10:14:12AM +0100, Martin Michlmayr wrote:
 Package: grass
 Version: 6.2.3-1
 Usertags: ftbfs-gcc-4.3
 
 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).  There's some more information about this at
 http://gcc.gnu.org/gcc-4.3/porting_to.html
 
 You can reproduce this problem with gcc-4.3 or gcc-snapshot from
 unstable.

Dear GIS maintainers,
attached dpatch fixes compilation with GCC 4.3. Shall I NMU?

Cheers,
Moritz
#! /bin/sh /usr/share/dpatch/dpatch-run
## Fix GCC 4.3 compatbility, jmm
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -aur grass-6.2.3.orig/raster/r.terraflow/IOStream/include/ami_stream.h 
grass-6.2.3/raster/r.terraflow/IOStream/include/ami_stream.h
--- grass-6.2.3.orig/raster/r.terraflow/IOStream/include/ami_stream.h   
2004-11-09 14:29:58.0 +0100
+++ grass-6.2.3/raster/r.terraflow/IOStream/include/ami_stream.h
2008-03-21 01:03:36.0 +0100
@@ -51,6 +51,7 @@
 #include fcntl.h
 #include errno.h
 #include unistd.h
+#include cstring
 
 #include iostream
 using namespace std;
Only in grass-6.2.3/raster/r.terraflow/IOStream/include: ami_stream.h~
___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel

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

2008-01-20 Thread Martin Michlmayr
Package: grass
Version: 6.2.3-1
Usertags: ftbfs-gcc-4.3

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).  There's some more information about this at
http://gcc.gnu.org/gcc-4.3/porting_to.html

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

 Automatic build of grass_6.2.3-1 on em64t by sbuild/amd64 0.53
...
 main.cc:547:   instantiated from here
 ./IOStream/include/ami_stream.h:220: warning: deprecated conversion from 
 string constant to 'char*'
 c++ -c -I/build/tbm/grass-6.2.3/dist.x86_64-pc-linux-gnu/include  -g -O2   
 -I./IOStream/include -DUSER=\root\ -DNODATA_FIX -D_FILE_OFFSET_BITS=64
 -DPACKAGE=\grassmods\ -DELEV_FLOAT common.cc -o 
 OBJ.x86_64-pc-linux-gnu/FLOAT/common.o
 In file included from ./IOStream/include/ami.h:49,
  from common.h:49,
  from common.cc:55:
 ./IOStream/include/ami_stream.h: In constructor 
 'AMI_STREAMT::AMI_STREAM(const char*, AMI_stream_type)':
 ./IOStream/include/ami_stream.h:255: error: there are no arguments to 
 'strcpy' that depend on a template parameter, so a declaration of 'strcpy' 
 must be available
 ./IOStream/include/ami_stream.h:255: error: (if you use '-fpermissive', G++ 
 will accept your code, but allowing the use of an undeclared name is 
 deprecated)
 ./IOStream/include/ami_stream.h: In member function 'AMI_err 
 AMI_STREAMT::name(char**)':
 ./IOStream/include/ami_stream.h:363: error: there are no arguments to 
 'strlen' that depend on a template parameter, so a declaration of 'strlen' 
 must be available
 ./IOStream/include/ami_stream.h:364: error: there are no arguments to 
 'strcpy' that depend on a template parameter, so a declaration of 'strcpy' 
 must be available
 In file included from ./IOStream/include/ami_sort_impl.h:46,
  from ./IOStream/include/ami_sort.h:45,
  from ./IOStream/include/ami.h:55,
  from common.h:49,
  from common.cc:55:
 ./IOStream/include/mem_stream.h: In member function 'AMI_err 
 MEM_STREAMT::name(char**)':
 ./IOStream/include/mem_stream.h:111: error: there are no arguments to 
 'strlen' that depend on a template parameter, so a declaration of 'strlen' 
 must be available
 ./IOStream/include/mem_stream.h:112: error: there are no arguments to 
 'strcpy' that depend on a template parameter, so a declaration of 'strcpy' 
 must be available
 make[3]: *** [OBJ.x86_64-pc-linux-gnu/FLOAT/common.o] Error 1
 make[3]: Leaving directory `/build/tbm/grass-6.2.3/raster/r.terraflow'
 r.out.tiff

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



___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel