[GRASS5] 5.7: r.terraflow and gcc 2.96 fails

Hi,

recently changes were submitted to r.terraflow in 5.3-CVS.
Should it be updated in 5.7 as well?

Currently the automated 5.7 CVS Linux binary snapshot
fails:

bash-2.04$ cd /hardmnt/grass0/neteler/grass51binarybuild/grass51/raster/r.terraflow/
bash-2.04$ make
Makefile:78: warning: overriding commands for target `clean'
../../include/Make/Rules.make:35: warning: ignoring old commands for target `clean'
mkdir -p OBJ.i686-pc-linux-gnu/FLOAT ; true
mkdir -p OBJ.i686-pc-linux-gnu/SHORT ; true
c++ -c -g -O2 -I./IOStream/include -DUSER=\"neteler\" -DNODATA_FIX -D_FILE_OFFSET_BITS=64 -I/hardmnt/grass0/neteler/grass51binarybuild/grass51/include -DELEV_FLOAT main.cc -o OBJ.i686-pc-linux-gnu/FLOAT/main.o
In file included from IOStream/include/ami.h:61,
                 from common.h:49,
                 from main.cc:59:
IOStream/include/empq_impl.h:44:19: ostream: No such file or directory
In file included from plateau.h:50,
                 from water.h:51,
                 from fill.h:46,
                 from main.cc:60:
direction.h:46:19: ostream: No such file or directory
make: *** [OBJ.i686-pc-linux-gnu/FLOAT/main.o] Error 1

bash-2.04$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-112.7.1)

Probably the recent fixes in 5.3-CVS addressed this problem?

Markus

Currently the automated 5.7 CVS Linux binary snapshot
fails:

bash-2.04$ cd
/hardmnt/grass0/neteler/grass51binarybuild/grass51/raster/r.terraflow/
bash-2.04$ make Makefile:78: warning: overriding commands for target
`clean'../../include/Make/Rules.make:35: warning: ignoring old
commands for target `clean' mkdir -p OBJ.i686-pc-linux-gnu/FLOAT ;
true mkdir -p OBJ.i686-pc-linux-gnu/SHORT ; true
c++ -c -g -O2 -I./IOStream/include -DUSER=\"neteler\" -DNODATA_FIX
-D_FILE_OFFSET_BITS=64
-I/hardmnt/grass0/neteler/grass51binarybuild/grass51/include
-DELEV_FLOAT main.cc -o OBJ.i686-pc-linux-gnu/FLOAT/main.o In file
included from IOStream/include/ami.h:61,
                 from common.h:49,
                 from main.cc:59:
IOStream/include/empq_impl.h:44:19: ostream: No such file or directory
In file included from plateau.h:50,
                 from water.h:51,
                 from fill.h:46,
                 from main.cc:60:
direction.h:46:19: ostream: No such file or directory
make: *** [OBJ.i686-pc-linux-gnu/FLOAT/main.o] Error 1

bash-2.04$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-112.7.1)

Probably the recent fixes in 5.3-CVS addressed this problem?

No.

gcc 2.96 is missing the <ostream> include header. <ostream.h> is still
available in gcc 3.3 (not sure about 3.4?) for backwards compatibility.

Therefore we have to use #include <ostream.h> and live with the
compiler warning that ostream.h is depreciated.

This has not been reverted yet (for a second time) in either 5.3 or 5.7:
http://freegis.org/cgi-bin/viewcvs.cgi/grass/src.contrib/DUKE/r.terraflow/common.cc

the recent fixes to 5.3 were before the 5.7 copy-mix, they are the same.

see also
http://grass.itc.it/pipermail/grass5/2004-November/015840.html

I'm just about to head out to sea for a while so I can't deal with this now..

Hamish

On Thu, Nov 18, 2004 at 03:31:35PM +1300, Hamish wrote:

> Currently the automated 5.7 CVS Linux binary snapshot
> fails:
>
> bash-2.04$ cd
> /hardmnt/grass0/neteler/grass51binarybuild/grass51/raster/r.terraflow/
> bash-2.04$ make Makefile:78: warning: overriding commands for target
> `clean'../../include/Make/Rules.make:35: warning: ignoring old
> commands for target `clean' mkdir -p OBJ.i686-pc-linux-gnu/FLOAT ;
> true mkdir -p OBJ.i686-pc-linux-gnu/SHORT ; true
> c++ -c -g -O2 -I./IOStream/include -DUSER=\"neteler\" -DNODATA_FIX
> -D_FILE_OFFSET_BITS=64
> -I/hardmnt/grass0/neteler/grass51binarybuild/grass51/include
> -DELEV_FLOAT main.cc -o OBJ.i686-pc-linux-gnu/FLOAT/main.o In file
> included from IOStream/include/ami.h:61,
> from common.h:49,
> from main.cc:59:
> IOStream/include/empq_impl.h:44:19: ostream: No such file or directory
> In file included from plateau.h:50,
> from water.h:51,
> from fill.h:46,
> from main.cc:60:
> direction.h:46:19: ostream: No such file or directory
> make: *** [OBJ.i686-pc-linux-gnu/FLOAT/main.o] Error 1
>
> bash-2.04$ gcc -v
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
> gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-112.7.1)
>
> Probably the recent fixes in 5.3-CVS addressed this problem?

No.

gcc 2.96 is missing the <ostream> include header. <ostream.h> is still
available in gcc 3.3 (not sure about 3.4?) for backwards compatibility.

Therefore we have to use #include <ostream.h> and live with the
compiler warning that ostream.h is depreciated.

This has not been reverted yet (for a second time) in either 5.3 or 5.7:
http://freegis.org/cgi-bin/viewcvs.cgi/grass/src.contrib/DUKE/r.terraflow/common.cc

the recent fixes to 5.3 were before the 5.7 copy-mix, they are the same.

see also
http://grass.itc.it/pipermail/grass5/2004-November/015840.html

I have submitted the change proposed in above email reference
to 5.7-CVS. We'll see with non-gcc compilers then.

No (more) problems with:
gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-112.7.1)
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-42)

Markus

> > /hardmnt/grass0/neteler/grass51binarybuild/grass51/raster/r.terra
> > flow/

..

> > -DELEV_FLOAT main.cc -o OBJ.i686-pc-linux-gnu/FLOAT/main.o In file
> > included from IOStream/include/ami.h:61,
> > from common.h:49,
> > from main.cc:59:
> > IOStream/include/empq_impl.h:44:19: ostream: No such file or
> > directory In file included from plateau.h:50,
> > from water.h:51,
> > from fill.h:46,
> > from main.cc:60:
> > direction.h:46:19: ostream: No such file or directory
> > make: *** [OBJ.i686-pc-linux-gnu/FLOAT/main.o] Error 1

...

> gcc 2.96 is missing the <ostream> include header. <ostream.h> is
> still available in gcc 3.3 (not sure about 3.4?) for backwards
> compatibility.
>
> Therefore we have to use #include <ostream.h> and live with the
> compiler warning that ostream.h is depreciated.

..

> see also
> http://grass.itc.it/pipermail/grass5/2004-November/015840.html

I have submitted the change proposed in above email reference
to 5.7-CVS. We'll see with non-gcc compilers then.

No (more) problems with:
gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-112.7.1)
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-42)

all the headers without .h should be conditionalized really. THEN we'll
see with non-gcc.

Hamish