[GRASS5] Re: updated r.terraflow compile error

Hamish hamish_nospam at yahoo.com
Tue Jan 20 05:22:42 EST 2004


> > > the updated r.terraflow causes the automated Linux compilation
> > > of 5.7 to fail:
> > > 
> > [...]
> > > 
> > > It is a Redhat 7 system (grass.itc.it) - on my Mandrake 9.1 box
> > > it compiles well. Do you have an idea?
> > > 
> > > A quick locate tells me
> > > /usr/include/c++/3.2.2/ostream
> > > 
> > > Seems that r.terraflow is no longer compliant with gcc <= 3.2.2?

Apparently so.


> > I've got a RH 7.3 computer I can test it on, and both gcc 2.96 & 3.3 on
> > my debian one. I'll see what I can figure out.
> 
> Thanks. Here a locate on 'grass.itc.it'
> 
> /usr/include/php/Zend/zend_istdiostream.h
> /usr/include/g++-3/iostream
> /usr/include/g++-3/iostream.h
> /usr/include/g++-3/ostream.h

                     ^^^^^^^^^ and there's the problem.

gcc 2.96 (g++) includes both a current and backwards compatible version 
of iostream (and others), but it doesn't include a current "ostream".

So there's only ostream.h on gcc 2.96, and the compile fails. I guess we 
are stuck with setting it to <ostream.h> and seeing "depreciated" messages.



fyi Debian/testing with gcc 2.96, 3.2, and 3.3 has these:
/usr/include/g++-3/iostream.h
/usr/include/g++-3/iostream
/usr/include/g++-3/ostream.h

/usr/include/c++/3.2/backward/iostream.h
/usr/include/c++/3.2/backward/ostream.h
/usr/include/c++/3.2/iostream
/usr/include/c++/3.2/ostream

/usr/include/c++/3.3/backward/iostream.h
/usr/include/c++/3.3/backward/ostream.h
/usr/include/c++/3.3/iostream
/usr/include/c++/3.3/ostream



> /usr/include/g++-3/stdiostream.h
> /usr/include/g++-2/iostream
> /usr/include/g++-2/iostream.h
> /usr/include/g++-2/ostream.h
> /usr/include/g++-2/stdiostream.h
> /usr/include/aspell/app_ostream.hh
> 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)
> 


> If it is easier, I could also upgrade the compiler on that machine
> (but what about compatibility then?).

Better to make the code work for gcc 2.96, which is pretty standard.

It'll probably break for older versions of the compiler though, what 
can one do? I'd rather not have "#ifdef GCC_3.3"s everywhere..



regards,
Hamish




More information about the grass-dev mailing list