roconnor | 3 Jan 02:32 2013
Picon

Error building ghc on raspberry pi.

I'm trying to build ghc-7.4.1 using ghc-7.4.1 on my raspberry pi (armv6l) 
and I get the following error:

"inplace/bin/ghc-stage1"   -H32m -O    -package-name ghc-prim-0.2.0.0 -hide-all-packages -i
-ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-install/build
-ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/dist-install/build
-Ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/.    -optP-include
-optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h -package rts-1.0 
-package-name ghc-prim -XHaskell98 -XCPP -XMagicHash -XForeignFunctionInterface
-XUnliftedFFITypes -XUnboxedTuples -XEmptyDataDecls -XNoImplicitPrelude -O2 
-no-user-package-conf -rtsopts     -odir libraries/ghc-prim/dist-install/build -hidir
libraries/ghc-prim/dist-install/build -stubdir libraries/ghc-prim/dist-install/build -hisuf
hi -osuf  o -hcsuf hc -c libraries/ghc-prim/./GHC/
 Types.hs -o libraries/ghc-prim/dist-install/build/GHC/Types.o
Stack dump:
0.      Program arguments: llc -O3 -relocation-model=static /tmp/ghc6324_0/ghc6324_0.bc -o
/tmp/ghc6324_0/ghc6324_0.lm_s 
1.      Running pass 'Function Pass Manager' on module '/tmp/ghc6324_0/ghc6324_0.bc'.
2.      Running pass 'ARM Instruction Selection' on function ' <at> ghczmprim_GHCziTypes_Czh_info'
/tmp/ghc6324_0/ghc6324_0.lm_s: openBinaryFile: does not exist (No such file or directory)
make[1]: *** [libraries/ghc-prim/dist-install/build/GHC/Types.o] Error 1
make: *** [all] Error 2

Anyone have any thoughts on what might be the matter and what I can do to 
fix it.  (If only openBinaryFile said which file doesn't exist.)

--

-- 
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
(Continue reading)

Jeremy Shaw | 3 Jan 02:40 2013

Re: Error building ghc on raspberry pi.

My random guess is that /tmp is mounted using tmpfs (aka a RAM drive)
and it got full. Try remounting /tmp to use the sdcard instead ?

On Wed, Jan 2, 2013 at 7:32 PM,  <roconnor <at> theorem.ca> wrote:
> I'm trying to build ghc-7.4.1 using ghc-7.4.1 on my raspberry pi (armv6l)
> and I get the following error:
>
> "inplace/bin/ghc-stage1"   -H32m -O    -package-name ghc-prim-0.2.0.0
> -hide-all-packages -i -ilibraries/ghc-prim/.
> -ilibraries/ghc-prim/dist-install/build
> -ilibraries/ghc-prim/dist-install/build/autogen
> -Ilibraries/ghc-prim/dist-install/build
> -Ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/.
> -optP-include
> -optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h -package
> rts-1.0  -package-name ghc-prim -XHaskell98 -XCPP -XMagicHash
> -XForeignFunctionInterface -XUnliftedFFITypes -XUnboxedTuples
> -XEmptyDataDecls -XNoImplicitPrelude -O2  -no-user-package-conf -rtsopts
> -odir libraries/ghc-prim/dist-install/build -hidir
> libraries/ghc-prim/dist-install/build -stubdir
> libraries/ghc-prim/dist-install/build -hisuf hi -osuf  o -hcsuf hc -c
> libraries/ghc-prim/./GHC/Types.hs -o
> libraries/ghc-prim/dist-install/build/GHC/Types.o
> Stack dump:
> 0.      Program arguments: llc -O3 -relocation-model=static
> /tmp/ghc6324_0/ghc6324_0.bc -o /tmp/ghc6324_0/ghc6324_0.lm_s 1.      Running
> pass 'Function Pass Manager' on module '/tmp/ghc6324_0/ghc6324_0.bc'.
> 2.      Running pass 'ARM Instruction Selection' on function
> ' <at> ghczmprim_GHCziTypes_Czh_info'
> /tmp/ghc6324_0/ghc6324_0.lm_s: openBinaryFile: does not exist (No such file
(Continue reading)

roconnor | 3 Jan 05:13 2013
Picon

Re: Error building ghc on raspberry pi.

Thanks for your help, but unfortunately this isn't the issue

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       924G  584G  294G  67% /tmp

So there is pleanty of room on temp.

BTW, I also tried building it twice and I got the same error at the same 
place.

On Wed, 2 Jan 2013, Jeremy Shaw wrote:

> My random guess is that /tmp is mounted using tmpfs (aka a RAM drive)
> and it got full. Try remounting /tmp to use the sdcard instead ?
>
> On Wed, Jan 2, 2013 at 7:32 PM,  <roconnor <at> theorem.ca> wrote:
>> I'm trying to build ghc-7.4.1 using ghc-7.4.1 on my raspberry pi (armv6l)
>> and I get the following error:
>>
>> "inplace/bin/ghc-stage1"   -H32m -O    -package-name ghc-prim-0.2.0.0
>> -hide-all-packages -i -ilibraries/ghc-prim/.
>> -ilibraries/ghc-prim/dist-install/build
>> -ilibraries/ghc-prim/dist-install/build/autogen
>> -Ilibraries/ghc-prim/dist-install/build
>> -Ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/.
>> -optP-include
>> -optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h -package
>> rts-1.0  -package-name ghc-prim -XHaskell98 -XCPP -XMagicHash
>> -XForeignFunctionInterface -XUnliftedFFITypes -XUnboxedTuples
>> -XEmptyDataDecls -XNoImplicitPrelude -O2  -no-user-package-conf -rtsopts
(Continue reading)

roconnor | 3 Jan 05:38 2013
Picon

Re: Error building ghc on raspberry pi.

Some further information it seems that llc is segfaulting:

pi <at> raspberrypi /tmp/ghc-7.4.1 $ llc -O3 -relocation-model=static /tmp/ghc7189_0/ghc7189_0.bc -o
/tmp/ghc7189_0/ghc7189_0.lm_s 
Stack dump:
0.      Program arguments: llc -O3 -relocation-model=static /tmp/ghc7189_0/ghc7189_0.bc -o
/tmp/ghc7189_0/ghc7189_0.lm_s 
1.      Running pass 'Function Pass Manager' on module '/tmp/ghc7189_0/ghc7189_0.bc'.
2.      Running pass 'ARM Instruction Selection' on function ' <at> ghczmprim_GHCziTypes_Czh_info'
Segmentation fault
pi <at> raspberrypi /tmp/ghc-7.4.1 $ llc --version
Low Level Virtual Machine (http://llvm.org/):
   llvm version 3.0
    (Debian 3.0-10)Optimized build.
   Built Jul 26 2012 (20:20:52).
   Host: arm-unknown-linux-gnueabihf
   Host CPU: (unknown)

   Registered Targets:
     alpha    - Alpha [experimental]
     arm      - ARM
     bfin     - Analog Devices Blackfin [experimental]
     c        - C backend
     cellspu  - STI CBEA Cell SPU [experimental]
     cpp      - C++ backend
     mblaze   - MBlaze
     mips     - Mips
     mips64   - Mips64 [experimental]
     mips64el - Mips64el [experimental]
     mipsel   - Mipsel
(Continue reading)

Ben Gamari | 3 Jan 15:35 2013
Picon

Re: Error building ghc on raspberry pi.

roconnor <at> theorem.ca writes:

> Some further information it seems that llc is segfaulting:
>
Where did you get your LLVM build from? Did you try running the LLVM
testsuite? IIRC, LLVM 3.0 was less than stellar on ARM.

- Ben
Thijs Alkemade | 3 Jan 10:53 2013
Picon

Re: Error building ghc on raspberry pi.

(Sorry, forgot to CC the list)

-------- Original Message --------
From: Thijs Alkemade <me <at> thijsalkema.de>
Sent: Thu Jan 03 10:31:50 CET 2013
To: roconnor <at> theorem.ca
Subject: Re: Error building ghc on raspberry pi.

roconnor <at> theorem.ca wrote:

>Some further information it seems that llc is segfaulting:
>
>pi <at> raspberrypi /tmp/ghc-7.4.1 $ llc -O3 -relocation-model=static
>/tmp/ghc7189_0/ghc7189_0.bc -o /tmp/ghc7189_0/ghc7189_0.lm_s 
>Stack dump:
>0.      Program arguments: llc -O3 -relocation-model=static
>/tmp/ghc7189_0/ghc7189_0.bc -o /tmp/ghc7189_0/ghc7189_0.lm_s 
>1.      Running pass 'Function Pass Manager' on module
>'/tmp/ghc7189_0/ghc7189_0.bc'.
>2.      Running pass 'ARM Instruction Selection' on function
>' <at> ghczmprim_GHCziTypes_Czh_info'
>Segmentation fault
>pi <at> raspberrypi /tmp/ghc-7.4.1 $ llc --version
>Low Level Virtual Machine (http://llvm.org/):
>   llvm version 3.0
>    (Debian 3.0-10)Optimized build.
>   Built Jul 26 2012 (20:20:52).
>   Host: arm-unknown-linux-gnueabihf
>   Host CPU: (unknown)
>
(Continue reading)


Gmane