Error building ghc on raspberry pi.
Neil Davies
semanticphilosopher at gmail.com
Wed Jan 16 12:38:37 CET 2013
Ok - I'll put up a machine in a DMZ sometime later today (RPi just arrived by post) .
I'll make it available on an non-standard ssh port - I suggest access via ssh-key only.
If you want to email me the appropriate line for .ssh/authorizedkeys please do. If you want to encrypt it with gpg, that's fine - use key id FF677414 (Neil.Davies at pnsol.com)
Neil
On 15 Jan 2013, at 17:16, Karel Gardas <karel.gardas at centrum.cz> wrote:
>
> Well, if you make some board available in DMZ I'm certainly interested to run at least configure on it from GHC HEAD to see what we need to hack in order to add support for RPi into GHC HEAD.
>
> Unfortunately GHC HEAD is now in a wrong state w.r.t. LLVM based build, but Austin is working on this. I think I can hack support for RPi in the meantime for testing later on fixed GHC HEAD LLVM build...
>
> Karel
>
> On 01/15/13 06:07 PM, roconnor at theorem.ca wrote:
>> In theory we could try a couple variations of builds at the same time.
>> But at the moment, I'm running low on ideas on what to try.
>>
>> I just got the, extensive, raspbian patches for 7.4.1 and I'm going to
>> browse through them when I get time (apt-get source ghc).
>>
>> On Tue, 15 Jan 2013, Neil Davies wrote:
>>
>>> Hi - would another RPi (or even 2 from tomorrow another one arriving)
>>> help?
>>>
>>> I can make them accessible (i.e. in our DMZ) -
>>>
>>> Neil
>>>
>>> On 15 Jan 2013, at 16:36, roconnor at theorem.ca wrote:
>>>
>>>> On Mon, 14 Jan 2013, Thijs Alkemade wrote:
>>>>
>>>>> Op 14 jan. 2013, om 17:30 heeft roconnor at theorem.ca het volgende
>>>>> geschreven:
>>>>>
>>>>>> 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 build.mk 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 ghc.mk phase=final all
>>>>>> LD libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o
>>>>>> /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-0.3.0.0.o 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-0.3.0.0.o 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-0.3.0.0.o
>>>>>> /usr/bin/ld: cannot find
>>>>>> libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o: 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-0.3.0.0.o is
>>>>>> coming from.
>>>>>
>>>>> libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o is the
>>>>> output ld was asked to generate. Apparently, some of the input .o
>>>>> files didn't use VFP register arguments, so ld concluded that the
>>>>> output should also not use VFP register arguments. But then ld
>>>>> encountered a .o file that did use VFP register arguments, and threw
>>>>> an error (something in cbits, so probably built with different CFLAGS).
>>>>>
>>>>> From your flags I'd say you miss -optlc-float-abi=hard. I had it in
>>>>> GhcLibHcOpts, but I'm not sure that is the correct way to ensure it
>>>>> is passed to everything exactly once.
>>>>
>>>> Okay, I tried:
>>>>
>>>> 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 -optlc-float-abi=hard
>>>>
>>>> and I got the same error at a different build step. I'm not sure if
>>>> it is earlier or later.
>>>>
>>>> It seems still not everything is using the hard-float ABI.
>>>>
>>>> ===--- building final phase
>>>> make -r --no-print-directory -f ghc.mk phase=final all
>>>> HC [stage 1] utils/hsc2hs/dist-install/build/tmp/hsc2hs
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments, utils/hsc2hs/dist-install/build/Main.o does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> utils/hsc2hs/dist-install/build/Main.o
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments, utils/hsc2hs/dist-install/build/HSCParser.o
>>>> does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> utils/hsc2hs/dist-install/build/HSCParser.o
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments,
>>>> utils/hsc2hs/dist-install/build/DirectCodegen.o does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> utils/hsc2hs/dist-install/build/DirectCodegen.o
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments,
>>>> utils/hsc2hs/dist-install/build/CrossCodegen.o does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> utils/hsc2hs/dist-install/build/CrossCodegen.o
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments,
>>>> utils/hsc2hs/dist-install/build/UtilsCodegen.o does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> utils/hsc2hs/dist-install/build/UtilsCodegen.o
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments, utils/hsc2hs/dist-install/build/Common.o does
>>>> not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> utils/hsc2hs/dist-install/build/Common.o
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments, utils/hsc2hs/dist-install/build/C.o does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> utils/hsc2hs/dist-install/build/C.o
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments, utils/hsc2hs/dist-install/build/Flags.o does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> utils/hsc2hs/dist-install/build/Flags.o
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments,
>>>> utils/hsc2hs/dist-install/build/Paths_hsc2hs.o does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> utils/hsc2hs/dist-install/build/Paths_hsc2hs.o
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments,
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(Apply.o) does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(Apply.o)
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments,
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(Exception.o) does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(Exception.o)
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments,
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(HeapStackCheck.o) does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(HeapStackCheck.o)
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments,
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(PrimOps.o) does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(PrimOps.o)
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments,
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(StgMiscClosures.o) does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(StgMiscClosures.o)
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments,
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(StgStartup.o) does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(StgStartup.o)
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments,
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(StgStdThunks.o) does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(StgStdThunks.o)
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments,
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(Updates.o) does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(Updates.o)
>>>> /usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses
>>>> VFP register arguments,
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(AutoApply.o) does not
>>>> /usr/bin/ld: failed to merge target specific data of file
>>>> /tmp/ghc-7.6.1b/rts/dist/build/libHSrts.a(AutoApply.o)
>>>> collect2: ld returned 1 exit status
>>>> <<ghc: 10689448 bytes, 2 GCs, 95944/95944 avg/max bytes residency (1
>>>> samples), 62M in use, 0.00 INIT (0.00 elapsed), 0.81 MUT (9.41
>>>> elapsed), 0.13 GC (0.13 elapsed) :ghc>>
>>>> make[1]: *** [utils/hsc2hs/dist-install/build/tmp/hsc2hs] Error 1
>>>> make: *** [all] Error 2
>>>>
>>>> --
>>>> Russell O'Connor <http://r6.ca/>
>>>> ``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.''
>>>>
>>>> _______________________________________________
>>>> Glasgow-haskell-users mailing list
>>>> Glasgow-haskell-users at haskell.org
>>>> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20130116/ef1b5dbc/attachment-0001.htm>
More information about the Glasgow-haskell-users
mailing list