
After googling a little more, do I understand correctly that to compile haskell (with ghc) for Android, one would have to compile and run ghc itself on android (because it can not cross compile)? That seems almost impossible, I would need an android device with unusual capacity. I have heard that ghc for iphone is possible. Anyone knows how that is done? What is the difference for android? Regards, Nathan

Nathan,
David is right. Using the x86 Android image in a VM could be fast
enough (if you computer has virtualization support)
I haven't tried to compile GHC for android myself. At the present
time, and taking into account that it would probably be slow to
execute and lack all the interesting libraries that I would like to
use, other FP languages may be better choices.
Please, let us know if you manage to compile it.
Cheers,
Ivan
On 31 December 2012 19:04, David Thomas
Couldn't that simply be simulated?
On Mon, Dec 31, 2012 at 2:36 PM, Nathan Hüsken
wrote: That seems almost impossible, I would need an android device with unusual capacity.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Tue, Jan 1, 2013 at 1:13 PM, Ivan Perez
Please, let us know if you manage to compile it.
There are some comments regarding porting git-annex to android, in order to make it useable from shell (that is, not as android app). http://git-annex.branchable.com/design/assistant/android/ The main issue: The GHC runtime relies on glibc, which is not used on android. Also, glibc cannot be (fully) linked statically. Probably someone with more knowledge about GHC internals and glibc can came up with a clean solution to this problem.
An additional issue: ghci (and Template Haskell because it uses the bytecode interpreter of ghci internally) currently(?) requires its own custom linker instead of being able to use the system linker. Said linker has no support for ARM. The correct fix for this is to redesign ghci so it doesn't need its own linker; there has been some work in this direction, but I don't know how complete it is, and it interacts with other issues such as building Haskell libraries as shared objects.
http://www.haskell.org/pipermail/glasgow-haskell-users/2012-December/023163.... I don't know the situation on ARM though. I added ghc-users mailinglist to CC. Regards, Bernhard

On Tue, Jan 1, 2013 at 9:13 AM, Bernhard Urban
The main issue: The GHC runtime relies on glibc
I have to assume this is not meant literally, because ghc works on OS X and *BSD. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

On Tue, Jan 1, 2013 at 3:41 PM, Brandon Allbery
On Tue, Jan 1, 2013 at 9:13 AM, Bernhard Urban
wrote: The main issue: The GHC runtime relies on glibc
I have to assume this is not meant literally, because ghc works on OS X and *BSD.
Right. I was talking about the situation on Linux, hopefully I'm totally wrong with that statement :) How can I build GHC without glibc on Linux? What should I use instead? That would certainly help. Thanks, Bernhard

Hello, rather than native GHC run on top of Android, I would recommend to have a look at GHC HEAD and attempt to cross-compile to Android. On ghc-cvs@ mailing list I've seen some work done for cross-compiling to QNX/BlackBerry OS 10 so I think Androind should be also doable with some work... Cheers, Karel On 01/ 2/13 05:29 PM, Bernhard Urban wrote:
On Tue, Jan 1, 2013 at 3:41 PM, Brandon Allbery
wrote: On Tue, Jan 1, 2013 at 9:13 AM, Bernhard Urban
wrote: The main issue: The GHC runtime relies on glibc
I have to assume this is not meant literally, because ghc works on OS X and *BSD.
Right. I was talking about the situation on Linux, hopefully I'm totally wrong with that statement :) How can I build GHC without glibc on Linux? What should I use instead? That would certainly help.
Thanks, Bernhard
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (6)
-
Bernhard Urban
-
Brandon Allbery
-
David Thomas
-
Ivan Perez
-
Karel Gardas
-
Nathan Hüsken