[GRASS-user] i.atcorr and raster compilation errors

Hi,

I've been configuring GRASS CVS for a long time as follows:

---<---------------cut here---------------start-------------->---
#! /bin/sh
# GRASS CVS updater and configurer

cd /usr/local/src/grass-cvs
make clean
make distclean
export CVSROOT=3D:pserver:grass-guest@intevation.de:/home/grass/grassreposi=
tory
# cvs login
cvs update -dP

CFLAGS=3D"-g -Wall" ./configure --enable-64bit --with-libs=3D/usr/lib64 \
    --with-tcltk-includes=3D/usr/include/tcl8.4 --with-readline --with-cxx \
    --with-odbc --with-mysql --with-mysql-includes=3D/usr/include/mysql \
    --with-postgres --with-postgres-includes=3D/usr/include/postgresql \
    --with-proj-share=3D/usr/share/proj --with-motif \
    --with-freetype --with-freetype-includes=3D/usr/include/freetype2 \
    2>&1 | tee config_log.txt
---<---------------cut here---------------end---------------->---

However, on compilation I have:

---<---------------cut here---------------start-------------->---
GRASS GIS compilation log
-------------------------
Started compilation: Sat Jul 5 17:41:55 CDT 2008
--
Errors in:
/usr/local/src/grass-cvs/imagery/i.atcorr
/usr/local/src/grass-cvs/raster/r.terraflow/IOStream/lib/src
/usr/local/src/grass-cvs/raster/r.terraflow
--
In case of errors please change into the directory with error and run 'make=
'.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.
--
Finished compilation: Sat Jul 5 17:50:30 CDT 2008
/usr/local/src/grass-cvs/raster/r.terraflow/IOStream/lib/src
---<---------------cut here---------------end---------------->---

and proceeding as suggested to compile in the offending directories, I
end up with the following for i.atcorr:

---<---------------cut here---------------start-------------->---
-*- mode: compilation; default-directory: "/usr/local/src/grass-cvs/imagery=
/i.atcorr/" -*-
Compilation started at Sat Jul 5 18:02:50

make -k
Makefile:15: warning: overriding commands for target `/usr/local/src/grass-=
cvs/dist.x86_64-unknown-linux-gnu/bin/i.atcorr'
../../include/Make/Module.make:14: warning: ignoring old commands for targe=
t `/usr/local/src/grass-cvs/dist.x86_64-unknown-linux-gnu/bin/i.atcorr'
c++ -I/usr/local/src/grass-cvs/dist.x86_64-unknown-linux-gnu/include -g -O=
2 -DPACKAGE=3D\""grassmods"\" -I/usr/local/src/grass-cvs/dist.x86_64-=
unknown-linux-gnu/include -o OBJ.x86_64-unknown-linux-gnu/6s.o -c 6s.cpp
6s.cpp: In function =E2=80=98TransformInput compute()=E2=80=99:
6s.cpp:369: error: =E2=80=98memset=E2=80=99 was not declared in this scope
6s.cpp:599: error: =E2=80=98memcpy=E2=80=99 was not declared in this scope
make: *** [OBJ.x86_64-unknown-linux-gnu/6s.o] Error 1
c++ -I/usr/local/src/grass-cvs/dist.x86_64-unknown-linux-gnu/include -g -O=
2 -DPACKAGE=3D\""grassmods"\" -I/usr/local/src/grass-cvs/dist.x86_64-=
unknown-linux-gnu/include -o OBJ.x86_64-unknown-linux-gnu/AerosolModel.o -c=
AerosolModel.cpp
AerosolModel.cpp: In member function =E2=80=98void AerosolModel::parse(floa=
t)=E2=80=99:
AerosolModel.cpp:861: error: =E2=80=98exit=E2=80=99 was not declared in thi=
s scope
AerosolModel.cpp:926: error: =E2=80=98exit=E2=80=99 was not declared in thi=
s scope
make: *** [OBJ.x86_64-unknown-linux-gnu/AerosolModel.o] Error 1
c++ -I/usr/local/src/grass-cvs/dist.x86_64-unknown-linux-gnu/include -g -O=
2 -DPACKAGE=3D\""grassmods"\" -I/usr/local/src/grass-cvs/dist.x86_64-=
unknown-linux-gnu/include -o OBJ.x86_64-unknown-linux-gnu/computations.o -c=
computations.cpp
computations.cpp: In function =E2=80=98void os(float, float, float, float, =
float, float (&)[51][49], Gauss&, const Altitude&, const GeomCond&)=E2=80=
=99:
computations.cpp:359: error: =E2=80=98memset=E2=80=99 was not declared in t=
his scope
computations.cpp: In function =E2=80=98void discom(const GeomCond&, const A=
tmosModel&, const AerosolModel&, const AerosolConcentration&, const Altitud=
e&, const IWave&)=E2=80=99:
computations.cpp:1595: error: =E2=80=98memset=E2=80=99 was not declared in =
this scope
make: *** [OBJ.x86_64-unknown-linux-gnu/computations.o] Error 1
make: Target `first' not remade because of errors.

Compilation exited abnormally with code 2 at Sat Jul 5 18:02:51
---<---------------cut here---------------end---------------->---

and for the following directory:

---<---------------cut here---------------start-------------->---
-*- mode: compilation; default-directory: "/usr/local/src/grass-cvs/raster/=
r.terraflow/IOStream/lib/src/" -*-
Compilation started at Sat Jul 5 18:04:40

make -k
c++ -I/usr/local/src/grass-cvs/dist.x86_64-unknown-linux-gnu/include -g -O=
2 -D_FILE_OFFSET_BITS=3D64 -DPACKAGE=3D\""grasslibs"\" -I../../include =
-I/usr/local/src/grass-cvs/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:
../../include/ami_stream.h: In constructor =E2=80=98AMI_STREAM<T>::AMI_STRE=
AM(const char*, AMI_stream_type)=E2=80=99:
../../include/ami_stream.h:233: error: there are no arguments to =E2=80=98s=
trcpy=E2=80=99 that depend on a template parameter, so a declaration of =E2=
=80=98strcpy=E2=80=99 must be available
../../include/ami_stream.h:233: error: (if you use =E2=80=98-fpermissive=E2=
=80=99, G++ will accept your code, but allowing the use of an undeclared na=
me is deprecated)
../../include/ami_stream.h: In member function =E2=80=98AMI_err AMI_STREAM<=
T>::name(char**)=E2=80=99:
../../include/ami_stream.h:341: error: there are no arguments to =E2=80=98s=
trlen=E2=80=99 that depend on a template parameter, so a declaration of =E2=
=80=98strlen=E2=80=99 must be available
../../include/ami_stream.h:342: error: there are no arguments to =E2=80=98s=
trcpy=E2=80=99 that depend on a template parameter, so a declaration of =E2=
=80=98strcpy=E2=80=99 must be available
make: *** [OBJ.x86_64-unknown-linux-gnu/ami_stream.o] Error 1
make: Target `first' not remade because of errors.

Compilation exited abnormally with code 2 at Sat Jul 5 18:04:40
---<---------------cut here---------------end---------------->---

I won't show the log for the last problem directory as it is much
larger, and probably stems from the error above.

GRASS is useable despite these errors, but I've been having these for a
few weeks now, and would appreciate some pointers as to what the problem
is. Thanks.

Cheers,

--
Seb

Hi,

I've been configuring GRASS CVS for a long time as follows:

---<---------------cut here---------------start-------------->---
#! /bin/sh
# GRASS CVS updater and configurer

cd /usr/local/src/grass-cvs
make clean
make distclean
export CVSROOT=3D:pserver:grass-guest@intevation.de:/home/grass/grassreposi=
tory
# cvs login
cvs update -dP

please note that it is more than half of the year we moved to SVN...

http://trac.osgeo.org/grass/wiki/DownloadSource

First download fresh code from SVN (old CVS server is read-only).

Regards, Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

On Mon, 14 Jul 2008 16:10:01 +0200,
"Martin Landa" <landa.martin@gmail.com> wrote:

[...]

please note that it is more than half of the year we moved to SVN...

Wow, no wonder! Thanks, I'll check out from SVN from now on.

--
Seb

On Mon, 14 Jul 2008 09:17:14 -0500,
"Sebastian P. Luque" <spluque@gmail.com> wrote:

On Mon, 14 Jul 2008 16:10:01 +0200,
"Martin Landa" <landa.martin@gmail.com> wrote:

[...]

please note that it is more than half of the year we moved to SVN...

Wow, no wonder! Thanks, I'll check out from SVN from now on.

No problems compiling with the SVN version. Is it OK to build a Debian
package with this version? The README.debian says:

---<---------------cut here---------------start-------------->---
# For preparing GRASS Debian package run

svn co svn://svn.debian.org/pkg-grass/packages/grass/branches/6.3/debian .

# in this directory. It will download latest debian configuration files
# from debian Subversion server (http://svn.debian.org).
---<---------------cut here---------------end---------------->---

so I'm not sure this would work with this version. Thanks for any
pointers.

--
Seb

On 14/07/08 18:24, Sebastian P. Luque wrote:

On Mon, 14 Jul 2008 09:17:14 -0500,
"Sebastian P. Luque" <spluque@gmail.com> wrote:

On Mon, 14 Jul 2008 16:10:01 +0200,
"Martin Landa" <landa.martin@gmail.com> wrote:

[...]

please note that it is more than half of the year we moved to SVN...

Wow, no wonder! Thanks, I'll check out from SVN from now on.

No problems compiling with the SVN version. Is it OK to build a Debian
package with this version? The README.debian says:

---<---------------cut here---------------start-------------->---
# For preparing GRASS Debian package run

svn co svn://svn.debian.org/pkg-grass/packages/grass/branches/6.3/debian .

# in this directory. It will download latest debian configuration files
# from debian Subversion server (http://svn.debian.org).
---<---------------cut here---------------end---------------->---

so I'm not sure this would work with this version. Thanks for any
pointers.

You can definitely compile the svn version for debian. This debian directory should probably work:

http://svn.debian.org/viewsvn/pkg-grass/packages/grass/branches/6.3/debian/

If not, let me know and I'll send you mine which does work.

Moritz

On Mon, 14 Jul 2008 22:11:41 +0200,
Moritz Lennert <mlennert@club.worldonline.be> wrote:

[...]

You can definitely compile the svn version for debian. This debian
directory should probably work:

http://svn.debian.org/viewsvn/pkg-grass/packages/grass/branches/6.3/debian/

Thanks Moritz, I should have said that I am set up with the 6.4 SVN
version, that's why the 6.3 instructions only in the README.debian made
me doubt.

Cheers,

--
Seb