...researching fundamentals of networking and communications


Compiling Libraries Using the Android NDK --- 07/23/2010

Idan Warsawski

Abstract: The nature of the Android platform requires high code portability. The Android platform is designed to run on the highest powered processors and the cheapest ones as well. As a result of this, Google made the primary supported programming language Java. However, due to the limited power of a mobile phone processor and the relatively high overhead of Java, this can lead to poor performance in critical code sections. Google eventually released the Android NDK, or native development kit, which allows developers to write critical code sections in C, and pass the results to Java using the JNI (Java Native Interface). Despite releasing a cross compile toolchain, Google does not support using these tools directly. Instead, they require developers to use a specialized makefile format and initiate compiles using their scripts. This can make porting large libraries to the Android platform very difficult, if not impossible.

In this talk I will discuss my experience compiling the GMP (GNU Multiple Precision Library) and NTL (Number Theory Library) libraries to the Android platform without the use of these scripts. I will discuss some of the shortcomings of these cross compile toolchains and explain what options need to be passed to the compiler to get the programs to run. I will additionally provide some benchmarks of doing various finite field operations using NTL on both the Android platform and a regular PC for comparison.

-- JiaxiJin - 22 Jul 2010

r2 - 2010-07-29 - 17:49:10 - JiaxiJin

Laboratory of Networking and Information Systems
Photonics Building, Room 413
8 St Mary's Street,
Boston MA 02215

Initial web site created by Sachin Agarwal (ska@alum.bu.edu), Modified by Weiyao Xiao (weiyao@alum.bu.edu), Moved to TWiki backend by Ari Trachtenberg (trachten@bu.edu). Managed by Jiaxi Jin (jin@bu.edu).
Syndicate this site RSSATOM