Bill Allombert on Thu, 21 Jul 2011 21:36:29 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: cross-compiling pari for Android |
On Thu, Jul 21, 2011 at 03:17:23PM -0400, Charles Boyd wrote: > Hi, > > I am trying to port PARI/GP to Android by cross compiling with the > standalone NDK toolchain (contains system headers, libs, C compiler, etc). > > The way I am trying to do this is by writing a simple shell script which > exports the C compiler (et. all) and points to the appropriate Android > headers and invokes the usual Configure script after all of the > Android-specific things are taken care of. > > There is a problem I keep running into with the Configure script, which > immediately tries to compile and run the ansi.c program -- the build > obviously fails since I am compiling for the arm-linux-androideabi target, > but working on a Linux-x86 host. > > This leads me to a few questions: > > (1) Is there any simple way to invoke the Configure script without > performing the tests? ./Configure -a > If not, how does the Configure script expect me to run > ARM binaries on an x86 machine? By using an emulator (e.g. qemu-arm) and the environment variable RUNTEST. > I just want to build libpari.so such that it > can be invoked by a test C program on an ARM device running Android. I'm not > worrying about GP or readline or anything else right now. The first step is > getting only the library to compile. > > (2) Instead of writing a wrapper script for the Android port around the > existing Configure script, should I modify the Configure script to work for > Android? I don't mind getting my hands dirty, but this seems like an > error-prone and time consuming way to do something relatively simple. You just need to create a pari.cfg file with ./Configure -a and then do ./Configure -l pari.cfg > There is apparently an existing ARM port for PARI/GP in the Debian > repository. How did they do this? Compiled directly on the ARM device? PARI/GP for ARM is compiled natively. Cheers, Bill.