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

Markus Neteler neteler at osgeo.org
Tue Sep 18 14:47:23 PDT 2012


On Tue, Sep 18, 2012 at 11:08 PM, Glynn Clements
<glynn at gclements.plus.com> wrote:
>
> Markus Neteler wrote:
>
>> I have (hopefully) fixed the includes in r53207, now libgis compiles.
>
> You probably shouldn't be including either of those headers directly.
> I suspect that the "correct" fix is just:
>
>         #ifdef HAVE_TERMIOS_H
>         #include <termios.h>
>         #endif

Right, so done in r53220. Compiles on Android as well.

...
>> clean_temp.c:35: error: conflicting types for '__errno'
>> /home/neteler/software/necessitas/android-9-standalonetoolchain/bin/../sysroot/usr/include/errno.h:48:
>> note: previous declaration of '__errno' was here
>> lock.c:29: error: conflicting types for '__errno'
>> /home/neteler/software/necessitas/android-9-standalonetoolchain/bin/../sysroot/usr/include/errno.h:48:
>> note: previous declaration of '__errno' was here
>
> Try r53215.

This compiles now.

>> Then a series of modules are not compiled due to this issue:
>
>> /home/neteler/software/necessitas/android-9-standalonetoolchain/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld:
>> warning: libgdal.so, needed by
>> /home/neteler/grass70/dist.arm-unknown-linux-androideabi/lib/libgrass_vector.7.0.svn.so,
>> not found (try using -rpath or -rpath-link)
>
> You probably need to use e.g.:
>
>         LDFLAGS=-Wl,-rpath-link,/path/to/lib ./configure ...
>
> where /path/to/lib is the directory containing the Android version of
> libgdal.so.

Very nice, this helps.
...
>> All r3.* are not compiled due to the remaining XDR issue (maybe
>> irrelevant for now).
>
> 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.

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

... the  I can compile (more).

Further issues:

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

make[3]: Entering directory `/home/neteler/grass70/lib/form'
arm-linux-androideabi-gcc
-I/home/neteler/grass70/android/out/armeabi/include -DANDROID=ON
-Wno-psabi -O2 -mthumb   -fPIC
-I/home/neteler/grass70/android/out/armeabi/include
-I/home/neteler/grass70/dist.arm-unknown-linux-androideabi/include
-I/home/neteler/grass70/dist.arm-unknown-linux-androideabi/include
-I/usr/include   -DPACKAGE=\""grasslibs"\"
-I/home/neteler/grass70/dist.arm-unknown-linux-androideabi/include
-I/home/neteler/grass70/dist.arm-unknown-linux-androideabi/include -o
OBJ.arm-unknown-linux-androideabi/generate.o -c generate.c
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
make[3]: *** [OBJ.arm-unknown-linux-androideabi/generate.o] Error 1
make[3]: Leaving directory `/home/neteler/grass70/lib/form'

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

* v.extract

arm-linux-androideabi-gcc
-I/home/neteler/grass70/android/out/armeabi/include -DANDROID=ON
-Wno-psabi -O2 -mthumb
-I/home/neteler/grass70/android/out/armeabi/include
-I/home/neteler/grass70/dist.arm-unknown-linux-androideabi/include
-I/home/neteler/grass70/dist.arm-unknown-linux-androideabi/include
-I/home/neteler/grass64/android/out/armeabi/include
-DPACKAGE=\""grassmods"\"
-I/home/neteler/grass70/dist.arm-unknown-linux-androideabi/include
-I/home/neteler/grass70/dist.arm-unknown-linux-androideabi/include -o
OBJ.arm-unknown-linux-androideabi/main.o -c main.c
main.c:27:20: error: search.h: No such file or directory
make[3]: *** [OBJ.arm-unknown-linux-androideabi/main.o] Error 1
make[3]: Leaving directory `/home/neteler/grass70/vector/v.extract'

* v.kcv
OBJ.arm-unknown-linux-androideabi/utils.o: In function `myrand':
utils.c:(.text+0x2): undefined reference to `rand'
collect2: ld returned 1 exit status
make[3]: *** [/home/neteler/grass70/dist.arm-unknown-linux-androideabi/bin/v.kcv

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).

Markus


More information about the grass-dev mailing list