Error building ghc on raspberry pi.

roconnor at roconnor at
Thu Jan 17 20:11:09 CET 2013

On Wed, 16 Jan 2013, Karel Gardas wrote:

> On 01/16/13 08:12 PM, roconnor at wrote:
>> On Wed, 16 Jan 2013, Karel Gardas wrote:
>>> Good! So the patch I already provided is working fine at least w.r.t.
>>> change in configure. I've tested it here on my raspbian chroot on
>>> pandaboard where I've hacked config.guess to print exactly what you
>>> get on real rpi.
>>> Now, I'm curious if the hack in DriverPipeline.hs helps too.
>>> Were you able to merge the patch into your GHC? And rebuild? What was
>>> the result?
>> I'm still trying to figure out the correct usage of
>> -optlc-float-abi=hard in mk/ I've ben getting a lot of errors
>> about two occurances of the float-abi=hard flag.
> You should not IMHO. My patch should solve all your issues. :-) The only 
> issue you may get is that your distro ghc will compile for soft-float ABI and 
> your compiled GHC will compile to hard-float and object files will get mixed 
> somewhere. But I trust your distro ghc builders that this is not the case so 
> both GHCs should compile using hard-float. So issue solved, at least should 
> be. Now I'm just waiting if you verify this or not so I'm either able to 
> submit the patch for inclusion or hack it more...

The first run of the stage2 compilier fails with a segfault:

   HC [stage 2] utils/ghctags/dist-install/build/Main.o
/bin/sh: line 1: 30064 Segmentation fault      "inplace/bin/ghc-stage2" -H64m -Rghc-timing -optc-mfloat-abi=hard -optc-march=armv6 -optc-mfpu=vfp -optlc=-mattr=+vfp2 -i -iutils/ghctags/. -iutils/ghctags/dist-install/build -iutils/ghctags/dist-install/build/autogen -Iutils/ghctags/dist-install/build -Iutils/ghctags/dist-install/build/autogen -package ghc -no-user-package-db -rtsopts -odir utils/ghctags/dist-install/build -hidir utils/ghctags/dist-install/build -stubdir utils/ghctags/dist-install/build -hisuf hi -osuf o -hcsuf hc -c utils/ghctags/./Main.hs -o utils/ghctags/dist-install/build/Main.o
make[1]: *** [utils/ghctags/dist-install/build/Main.o] Error 139
make: *** [all] Error 2


SRC_HC_OPTS        = -H64m -Rghc-timing -optc-mfloat-abi=hard -optc-march=armv6 -optc-mfpu=vfp -optlc=-mattr=+vfp2 
GhcStage1HcOpts    = -O -fllvm 
GhcStage2HcOpts    = -O0 -fllvm
GhcLibHcOpts       = -O -fllvm

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