[GRASS-dev] Grass SVN in Android, display issue

Glynn Clements glynn at gclements.plus.com
Wed Sep 19 06:19:05 PDT 2012


Markus Neteler wrote:

> > r53219 has moved the XDR functions from lib/raster to lib/gis.
> > lib/raster3d should be converted to use these.
> 
> OK - a todo.
> This also affects several g.* modules and v.colors, v.surf.bspline and
> some more
> vector modules which link the G3D library, no surprise of course.

That will include g.region, which is fairly essential. Also,
g.{copy,rename,remove,list}, as lib/manage had a gratuitous dependency
on the raster3d library (fixed in r53230).

> BTW: After the configure, I always have to manually comment this line:
> include/Make/Platform.make
> #XDRLIB              = @XDRLIB@
> 
> ... the  I can compile (more).

Currently, the configure script shouldn't abort if it can't find the
XDR functions. If you remove the AC_MSG_ERROR, you need to add XDRLIB=
so that it's always defined.

> Further issues:
> 
> * lib/form/ (just for the record) - the same in ximgview:

> In file included from /usr/include/features.h:386,
>                  from /usr/include/stdlib.h:25,
>                  from generate.c:1:
> /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

The error originates with <stdlib.h> on the first line of the file, so
the only thing which can affect it is the compiler switches. lib/form
adds $(XCFLAGS) $(TCLINCDIR) $(TKINCDIR) while ximgview adds
$(XCFLAGS) $(XMINC). $(XCFLAGS) is a likely candidate; that isn't
something we can easily fix.

> * r.mapcalc
> /bin/sh: /home/neteler/grass70/dist.arm-unknown-linux-androideabi/bin/r.mapcalc:
> cannot execute binary file

This should be fixed by r53231.

> * v.extract

> main.c:27:20: error: search.h: No such file or directory

Fixed in r53232. <search.h> wasn't being used for anything (bsearch()
is C89, and is declared in <stdlib.h>).

> * v.kcv
> OBJ.arm-unknown-linux-androideabi/utils.o: In function `myrand':
> utils.c:(.text+0x2): undefined reference to `rand'

v.kcv/utils.c included a local prototype for rand() rather than
including <stdlib.h>. That won't work if rand() is a macro. This
should be fixed by r53234.

More generally: local prototypes should never be used. For library
functions, the library's headers should be used. Functions which are
defined in a module should be declared in a header which is included
by the source file which defines the function plus any source files
which reference it.

> So, a high percentage of the GRASS modules do compile now (186
> compiled, 34 fail, most of them due to the G3D lib XDR issue).

I'll look into the G3D XDR issue.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list