Join Date:Joined: Mar 2012
Hi, I actually had the same idea as you and started working on porting some GNU programs over to Android. I started out because I wanted GnuPG on Android 5.0 and the one on Google Play from the Gaurdian Project wasn't compiled for PIE (Position Independent Executable) which is required as of 5.0. Anyway I got GPG and Bash compiled (those were pretty easy) and then figured I'd go further and try to port over GNU Coreutils. I ran into some trouble compiling and then saw that you've already done it.
Where I'm stuck at the moment is on lib/fseeko.c. I took a peek at your github but it doesn't I don't see any of the FILE related sources in your lib/ Were you able to get those files to compile or did you just exclude them from your build? This code is pretty cryptic with #ifdefs out the wazoo for about 10 different implementations of <stdlib.h> for various OS's. I was able to get the first few files to compile (freading.c, freadahead.c, freadptr.c) by adding "defined __ANDROID__" to the "defined __DragonFly__" branch since Android's C library is based off BSD's. I also had to remove the underscore from the fp_ variable. That worked pretty well until I got to fseeko line 73 "fp_ub._base == NULL" variable is undeclared :/
I'm cloning your git at the moment so maybe I'll try compiling that and find my answers there but anyway if I do get this working I was planning on making an installer app and posting it on Google Play to make it easy for people to be able to install these GNU CLI programs. I could actually go ahead and post GPG and Bash if people are interested since I already have working builds of those.
EDIT: I actually have more questions than answers from your git sources now... you've removed the ./configure script... and there's no makefile. How am I even supposed to build this?
Last edited by weirddan455; 4th December 2014 at 10:29 AM.