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

Markus Neteler neteler at osgeo.org
Tue Sep 18 06:58:56 PDT 2012


On Tue, Sep 18, 2012 at 3:39 PM, Glynn Clements
<glynn at gclements.plus.com> wrote:
> Markus Neteler wrote:
>> ls.c: In function 'G_ls_format':
...
> If the platform defines TIOCGWINSZ, you'd think that it would define
> "struct winsize" somewhere; although it's anyone's guess as to where
> (on Linux, it's in <sys/ioctl.h>).

I see it here:

[neteler at north necessitas]$ find . -type f | xargs grep TIOCGWINSZ
...
./android-ndk-r7b/platforms/android-14/arch-arm/usr/include/asm/ioctls.h:#define
TIOCGWINSZ 0x5413
./android-9-standalonetoolchain/sysroot/usr/include/asm/ioctls.h:#define
TIOCGWINSZ 0x5413

and
...
./android-ndk-r7b/platforms/android-14/arch-arm/usr/include/asm/termios.h:struct
winsize {

I have (hopefully) fixed the includes in r53207, now libgis compiles.

Your other fixes are well received by the cross compiler, thanks.

The next and last library issue after the irrelevant "form" library is:

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
make[3]: *** [OBJ.arm-unknown-linux-androideabi/clean_temp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [OBJ.arm-unknown-linux-androideabi/lock.o] Error 1

In android-9-standalonetoolchain/bin/../sysroot/usr/include/errno.h,
there is (white space compressed by me):
/* internal function that should *only* be called from system calls */
/* use errno = xxxx instead in C code                               */
extern int    __set_errno(int  error);
/* internal function returning the address of the thread-specific errno */
extern volatile int*   __errno(void);
/* a macro expanding to the errno l-value */
#define  errno   (*__errno())

Then a series of modules are not compiled due to this issue:


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/area.o -c area.c
: && arm-linux-androideabi-gcc
-L/home/neteler/grass70/dist.arm-unknown-linux-androideabi/lib
-L/home/neteler/grass70/dist.arm-unknown-linux-androideabi/lib
-Wl,--fix-cortex-a8 -Wl,--export-dynamic
-L/home/neteler/grass70/android/out/armeabi/lib
-L/home/neteler/software/necessitas/android-9-standalonetoolchain/lib/
-Wl,-rpath-link,/home/neteler/grass70/dist.arm-unknown-linux-androideabi/lib
 -o /home/neteler/grass70/dist.arm-unknown-linux-androideabi/bin/d.vect.chart
OBJ.arm-unknown-linux-androideabi/pie.o
OBJ.arm-unknown-linux-androideabi/plot.o
OBJ.arm-unknown-linux-androideabi/main.o
OBJ.arm-unknown-linux-androideabi/bar.o    -lgrass_display.7.0.svn
-lgrass_vector.7.0.svn -lgrass_dbmiclient.7.0.svn
-lgrass_dbmibase.7.0.svn  -lgrass_gis.7.0.svn -lm   -lm
/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)
/home/neteler/software/necessitas/android-9-standalonetoolchain/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld:
warning: libproj.so.0, needed by
/home/neteler/grass70/dist.arm-unknown-linux-androideabi/lib/libgrass_gproj.7.0.svn.so,
not found (try using -rpath or -rpath-link)
/home/neteler/grass70/dist.arm-unknown-linux-androideabi/lib/libgrass_vector.7.0.svn.so:
undefined reference to `OGRGetDriverByName'
/home/neteler/grass70/dist.arm-unknown-linux-androideabi/lib/libgrass_vector.7.0.svn.so:
undefined reference to `OGR_G_AddPoint'
/home/neteler/grass70/dist.arm-unknown-linux-androideabi/lib/libgrass_vector.7.0.svn.so:
undefined reference to `OGR_G_AddGeometry'
/home/neteler/grass70/dist.arm-unknown-linux-androideabi/lib/libgrass_gproj.7.0.svn.so:
undefined reference to `OSRIsProjected'
...
/home/neteler/grass70/dist.arm-unknown-linux-androideabi/lib/libgrass_gproj.7.0.svn.so:
undefined reference to `pj_strerrno'
/home/neteler/grass70/dist.arm-unknown-linux-androideabi/lib/libgrass_gproj.7.0.svn.so:
undefined reference to `pj_init'
...

This affects a series of d.*, g.*, i.* and also v.* modules.
All r3.* are not compiled due to the remaining XDR issue (maybe
irrelevant for now).

All r.* are compiled successfully.

Markus


More information about the grass-dev mailing list