Error building ghc on raspberry pi.

roconnor at roconnor at
Mon Jan 21 16:43:09 CET 2013

On Mon, 21 Jan 2013, Karel Gardas wrote:

> On 01/21/13 12:49 AM, roconnor at wrote:
>> On Sun, 20 Jan 2013, Karel Gardas wrote:
>>>> Okay, I patched the settings filed generted by ./configure in the
>>>> binary-dist and rank make install which completed. However,
>>>> pi at raspberrypi /tmp/bindist $ bin/ghc --make Main.hs
>>>> [1 of 1] Compiling Main ( Main.hs, Main.o )
>>>> Linking Main ...
>>>> pi at raspberrypi /tmp/bindist $ ./Main
>>>> Segmentation fault
>>>> pi at raspberrypi /tmp/bindist $ cat Main.hs
>>>> main = putStrLn "Hello World."
>>>> Damn it. So close. I don't know how make install succeded without
>>>> segfaulting.
>>> Sigh! Go back to your build tree and try the same thing with
>>> inplace/bin/ghc-stage2 and let us know if this works or not. BTW:
>>> What's in Main.hs?
>> pi at raspberrypi /tmp $ ghc-7.6.1c/inplace/bin/ghc-stage2 Main.hs
>> [1 of 1] Compiling Main ( Main.hs, Main.o )
>> Linking Main ...
>> pi at raspberrypi /tmp $ ./Main
>> Hello World.
>> The stage2 compiler works fine inplace.
> OK, so binary-dist not only corrupted your settings file, but also somehow 
> your compiler. Nice to see you are able to get working compiler on your RPi 
> board. Congratulations! :-)

Thanks. :)

So the binary-dist has a file.  It is the configure step in 
the binary-dist that generates the corrupt settings file.

I'll try to poke around to see where and why the stage2 compiler 
and the binary-dist compiler differ.

Russell O'Connor                                      <>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''

More information about the Glasgow-haskell-users mailing list