[GRASS-dev] iostream lib and r.terraflow/r.viewshed

Paul Kelly paul-grass at stjohnspoint.co.uk
Sun Aug 10 09:41:53 EDT 2008


On Sat, 9 Aug 2008, Maciej Sieczka wrote:

> Paul Kelly pisze:
>
>> r.terraflow still compiles fine so I hope there will be no unforeseen 
>> consequences.
>
> In the current develbranch6 (r32655) there are 2 errors at the build time:
>
> in lib/iostream:
>
> $ make
> c++ -I/home/shoofi/src/straight/grass64/dist.x86_64-unknown-linux-gnu/include 
> -pipe -march=core2 -g -Wall   -D_FILE_OFFSET_BITS=64 
> -DPACKAGE=\""grasslibs"\" 
> -I/home/shoofi/src/straight/grass64/dist.x86_64-unknown-linux-gnu/include -o 
> OBJ.x86_64-unknown-linux-gnu/ami_stream.o -c ami_stream.cc
> In file included from ami_stream.cc:29:
> /home/shoofi/src/straight/grass64/dist.x86_64-unknown-linux-gnu/include/grass/iostream/ami_stream.h: 
> In constructor 'AMI_STREAM<T>::AMI_STREAM(const char*, AMI_stream_type)':
> /home/shoofi/src/straight/grass64/dist.x86_64-unknown-linux-gnu/include/grass/iostream/ami_stream.h:256: 
> error: there are no arguments to 'strcpy' that depend on a template 
> parameter, so a declaration of 'strcpy' must be available
> /home/shoofi/src/straight/grass64/dist.x86_64-unknown-linux-gnu/include/grass/iostream/ami_stream.h:256: 
> error: (if you use '-fpermissive', G++ will accept your code, but allowing 
> the use of an undeclared name is deprecated)
> /home/shoofi/src/straight/grass64/dist.x86_64-unknown-linux-gnu/include/grass/iostream/ami_stream.h: 
> In member function 'AMI_err AMI_STREAM<T>::name(char**)':
> /home/shoofi/src/straight/grass64/dist.x86_64-unknown-linux-gnu/include/grass/iostream/ami_stream.h:373: 
> error: there are no arguments to 'strlen' that depend on a template 
> parameter, so a declaration of 'strlen' must be available
> /home/shoofi/src/straight/grass64/dist.x86_64-unknown-linux-gnu/include/grass/iostream/ami_stream.h:374: 
> error: there are no arguments to 'strcpy' that depend on a template 
> parameter, so a declaration of 'strcpy' must be available

Well I know very little about C++, but a very random guess: does adding
#include <string.h>
to include/iostream/ami_stream.h help?
Obviously I can't reproduce the problem myself (gcc 4.1.2 on Slackware 
12.0) or I wouldn't have committed the changes - perhaps the problem is 
x86_64 related?

Paul


More information about the grass-dev mailing list