Error building ghc on raspberry pi.

roconnor at roconnor at
Mon Jan 14 17:30:07 CET 2013

On Thu, 10 Jan 2013, Karel Gardas wrote:

> Hmm, are you using Raspbian? I.e. hard-float abi caught my eye in case of 
> ARMv6/ARM11 chip here...
> I'm afraid LLVM is not well guided in your case so could you be so kind and 
> test if adding -optlc=-mattr=+vfp2 helps? You need to add it to your 
> probably and you will need to rebuild everything again...

No change with

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

I still get the error:

===--- building final phase
make -r --no-print-directory -f phase=final all
   LD libraries/ghc-prim/dist-install/build/HSghc-prim-
/usr/bin/ld: error: libraries/ghc-prim/dist-install/build/cbits/debug.o uses VFP register arguments, libraries/ghc-prim/dist-install/build/HSghc-prim- does not
/usr/bin/ld: failed to merge target specific data of file libraries/ghc-prim/dist-install/build/cbits/debug.o

I don't really understand what is going on here.  The file 
libraries/ghc-prim/dist-install/build/HSghc-prim- doesn't even 
exist, so when I manually run /usr/bin/ld I get:

$ /usr/bin/ld libraries/ghc-prim/dist-install/build/HSghc-prim-
/usr/bin/ld: cannot find libraries/ghc-prim/dist-install/build/HSghc-prim- No such file or directory

What is make really doing here?

My research suggests that this error is a symptom of trying to link 
something without the hard-float ABI together with something with a 
soft-float ABI.  But I don't know where 
libraries/ghc-prim/dist-install/build/HSghc-prim- is coming from.

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