[GAP Forum] GAP on Android

Matan Ziv-Av matan at svgalib.org
Thu Aug 2 22:03:10 BST 2012


Hello,

I compiled a part of GAP 4.5.5 for android. In fact, the
binaries are compiled for ARMv7 and statically linked, so
they should work on any Linux based system using Cortex-A8
core or later.

If there is enough (more than 1GB) space on the /data
partition, then no root access is required. An application
has write access to a subdirectory under /data/data, so GAP
can be installed (if using Android Terminal Emulator, for
example) under /data/data/jackpal.androidterm.  It is also
possible to install to sdcard and have only the binaries and
some directories and symlinks in the /data partition.

Otherwise, installing requires root, since the storage
partition (/mnt/sdcard) is by default mounted with noexec
options, and it needs to be remounted with exec option 
( mount -o remount,exec /mnt/sdcard ).  After remounting, 
the program can be executed by a non-root user (that has
read access to /mnt/sdcard).

To install, untar the tar.gz file somewhere. If you do not
untar under /mnt/sdcard, edit the included gap4r5/gap.sh
accordingly.

The HOME environment variable should be set to a directory
where .gap with the configuration files should be.

To run, execute the file /mnt/sdcard/gap4r5/gap.sh.

I removed a few carat and Browse, as they took some work to
get working, and I don't use them.

Another notable difference is that android does not have
/tmp (or equivalent).  I changed DirectoryTemporary() to
return DirectoryHome().

Download: http://my.svgalib.org/android/gap4r5-1.tar.gz

When compiling I noted that a few packages ignore (or
overwrite) the CC, CFLAGS and LDFLAGS environment variables,
making it harder to cross compile, or to have more control
over compilations. The Makefile.in (or similar) in the
following subdirectory required small obvious changes:

ace/src/
fplsa/
anupq/ 
guava-3.12/ src/ src/leon 
cohomolo/ standalone/progs.d
kbmag/


-- 
Matan Ziv-Av.                         matan at svgalib.org





More information about the Forum mailing list