Re: Building on android - compiled program segfaults

2013-01-13 Thread Bernhard Urban
Hi Nathan,

On Fri, Jan 11, 2013 at 12:36 PM, Nathan Hüsken
 wrote:
> I was succesfull in building ghc (pulled from git) to compile for
> arm-linux-androideabi!

Great news!
Can you describe how you managed to build it and which environment you use?


> main = putStrLn "Hello, World"
>
> I get an executable, which I can run on my android device. Unfortantly
> it segfaults.

just a random idea, does
  main = error "Hello, World"
work?


Thanks,
Bernhard

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: [Haskell-cafe] [Haskell-beginners] ghc and android

2013-01-02 Thread Bernhard Urban
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

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: [Haskell-cafe] [Haskell-beginners] ghc and android

2013-01-01 Thread Bernhard Urban
On Tue, Jan 1, 2013 at 1:13 PM, Ivan Perez  wrote:
> 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.html
I don't know the situation on ARM though.


I added ghc-users mailinglist to CC.


Regards,
Bernhard

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


ghc-mod and FFI

2012-09-17 Thread Bernhard Urban
Hi,

recently I run into an issue using ghc-mod, as described here:
https://github.com/kazu-yamamoto/ghc-mod/issues/75
In summary, ghc-mod fails if the source file contains a `foreign'
declaration. I played around a bit, but I have no experience with the
GHC API, so any help is appreciated!

Thanks,
Bernhard

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users