Re: Error building ghc on raspberry pi.

2013-01-27 Thread roconnor

On Mon, 21 Jan 2013, rocon...@theorem.ca wrote:


On Mon, 21 Jan 2013, Karel Gardas wrote:


On 01/21/13 12:49 AM, rocon...@theorem.ca 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@raspberrypi /tmp/bindist $ bin/ghc --make Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
pi@raspberrypi /tmp/bindist $ ./Main
Segmentation fault
pi@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@raspberrypi /tmp $ ghc-7.6.1c/inplace/bin/ghc-stage2 Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
pi@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 settings.in 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.


I replaced the lib/ghc-7.6.1/settings built from the binary-dist which 
read:


[("GCC extra via C opts", " -fwrapv"),
 ("C compiler command", "/usr/bin/gcc"),
 ("C compiler flags", " -fno-stack-protector "),
 ("ar command", "/usr/bin/ar"),
 ("ar flags", "q"),
 ("ar supports at file", "@ArSupportsAtFile@"),
 ("touch command", "touch"),
 ("dllwrap command", "/bin/false"),
 ("windres command", "/bin/false"),
 ("perl command", "/usr/bin/perl"),
 ("target os", "OSLinux"),
 ("target arch", "ArchARM {armISA = ARMv6, armISAExt = [VFPv2], armABI = 
HARD}"),
 ("target word size", "4"),
 ("target has GNU nonexec stack", "False"),
 ("target has .ident directive", "True"),
 ("target has subsections via symbols", "False"),
 ("LLVM llc command", "llc"),
 ("LLVM opt command", "opt")
 ]

With the settings file from the build:

[("GCC extra via C opts", " -fwrapv"),
 ("C compiler command", "/usr/bin/gcc"),
 ("C compiler flags", " -fno-stack-protector  -Wl,--hash-size=31 
-Wl,--reduce-memory-overheads"),
 ("ar command", "/usr/bin/ar"),
 ("ar flags", "q"),
 ("ar supports at file", "YES"),
 ("touch command", "touch"),
 ("dllwrap command", "/bin/false"),
 ("windres command", "/bin/false"),
 ("perl command", "/usr/bin/perl"),
 ("target os", "OSLinux"),
 ("target arch", "ArchARM {armISA = ARMv6, armISAExt = [VFPv2], armABI = 
HARD}"),
 ("target word size", "4"),
 ("target has GNU nonexec stack", "False"),
 ("target has .ident directive", "True"),
 ("target has subsections via symbols", "False"),
 ("LLVM llc command", "/usr/bin/llc-3.0"),
 ("LLVM opt command", "/usr/bin/opt-3.0")
 ]

and now ghc builds executables that do not segfault!

It seem that the configure program in the binary-dist needs some patching.

--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-25 Thread Neil Davies
That's good to hear - we've got AFS and the dev-RPi's are using it…

Neil
On 25 Jan 2013, at 12:20, Simon Marlow  wrote:

> On 25/01/13 11:23, Neil Davies wrote:
>> Simon
>> 
>> Looking at the wiki - I take it that the stage 1 compiler can now be used as 
>> "native" compiler on the RPi? (last line of entry)?
> 
> Do you mean the stage 2 compiler?  If so yes - in principle.  But in practice 
> the binary-dist machinery doesn't work properly for cross-compilers yet, so 
> it's hard to install it on the RPi.  If you have a shared network filesystem 
> then perhaps 'make install' works, or if you copy the build tree to your RPi 
> at the same location as your build machine, then maybe it will work.
> 
> Cheers,
>   Simon
> 
> 
> 
>> Neil
>> 
>> On 25 Jan 2013, at 10:46, Simon Marlow  wrote:
>> 
>>> FYI, I created a wiki page for cross-compiling to Raspberry Pi:
>>> 
>>> http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/RaspberryPi
>>> 
>>> I have an unregisterised build using LLVM working now (it just worked, 
>>> modulo the tiny fix for #7622).
>>> 
>>> Cheers,
>>> Simon
>>> 
>>> On 21/01/13 16:06, Karel Gardas wrote:
 On 01/21/13 04:43 PM, rocon...@theorem.ca wrote:
> So the binary-dist has a settings.in file. It is the configure step in
> the binary-dist that generates the corrupt settings file.
 
 Perhaps you've forgotten to regenerate bin-dist configure as you did
 with build tree configure after applying my patch?
 
> I'll try to poke around to see where and why the stage2 compiler and the
> binary-dist compiler differ.
 
 Please post your findings here, I'm really curious what is the culprit
 here...
 
 Karel
 
 
 
 ___
 Glasgow-haskell-users mailing list
 Glasgow-haskell-users@haskell.org
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>>> 
>>> 
>>> ___
>>> Glasgow-haskell-users mailing list
>>> Glasgow-haskell-users@haskell.org
>>> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>> 
> 


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-25 Thread Simon Marlow

On 25/01/13 11:23, Neil Davies wrote:

Simon

Looking at the wiki - I take it that the stage 1 compiler can now be used as 
"native" compiler on the RPi? (last line of entry)?


Do you mean the stage 2 compiler?  If so yes - in principle.  But in 
practice the binary-dist machinery doesn't work properly for 
cross-compilers yet, so it's hard to install it on the RPi.  If you have 
a shared network filesystem then perhaps 'make install' works, or if you 
copy the build tree to your RPi at the same location as your build 
machine, then maybe it will work.


Cheers,
Simon




Neil

On 25 Jan 2013, at 10:46, Simon Marlow  wrote:


FYI, I created a wiki page for cross-compiling to Raspberry Pi:

http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/RaspberryPi

I have an unregisterised build using LLVM working now (it just worked, modulo 
the tiny fix for #7622).

Cheers,
Simon

On 21/01/13 16:06, Karel Gardas wrote:

On 01/21/13 04:43 PM, rocon...@theorem.ca wrote:

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


Perhaps you've forgotten to regenerate bin-dist configure as you did
with build tree configure after applying my patch?


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


Please post your findings here, I'm really curious what is the culprit
here...

Karel



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users





___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-25 Thread Neil Davies
Simon

Looking at the wiki - I take it that the stage 1 compiler can now be used as 
"native" compiler on the RPi? (last line of entry)?

Neil

On 25 Jan 2013, at 10:46, Simon Marlow  wrote:

> FYI, I created a wiki page for cross-compiling to Raspberry Pi:
> 
> http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/RaspberryPi
> 
> I have an unregisterised build using LLVM working now (it just worked, modulo 
> the tiny fix for #7622).
> 
> Cheers,
>   Simon
> 
> On 21/01/13 16:06, Karel Gardas wrote:
>> On 01/21/13 04:43 PM, rocon...@theorem.ca wrote:
>>> So the binary-dist has a settings.in file. It is the configure step in
>>> the binary-dist that generates the corrupt settings file.
>> 
>> Perhaps you've forgotten to regenerate bin-dist configure as you did
>> with build tree configure after applying my patch?
>> 
>>> I'll try to poke around to see where and why the stage2 compiler and the
>>> binary-dist compiler differ.
>> 
>> Please post your findings here, I'm really curious what is the culprit
>> here...
>> 
>> Karel
>> 
>> 
>> 
>> ___
>> Glasgow-haskell-users mailing list
>> Glasgow-haskell-users@haskell.org
>> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
> 
> 
> ___
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-25 Thread Simon Marlow

FYI, I created a wiki page for cross-compiling to Raspberry Pi:

http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/RaspberryPi

I have an unregisterised build using LLVM working now (it just worked, 
modulo the tiny fix for #7622).


Cheers,
Simon

On 21/01/13 16:06, Karel Gardas wrote:

On 01/21/13 04:43 PM, rocon...@theorem.ca wrote:

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


Perhaps you've forgotten to regenerate bin-dist configure as you did
with build tree configure after applying my patch?


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


Please post your findings here, I'm really curious what is the culprit
here...

Karel



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-21 Thread Karel Gardas

On 01/21/13 04:43 PM, rocon...@theorem.ca wrote:

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


Perhaps you've forgotten to regenerate bin-dist configure as you did 
with build tree configure after applying my patch?



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


Please post your findings here, I'm really curious what is the culprit 
here...


Karel



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-21 Thread roconnor

On Mon, 21 Jan 2013, Karel Gardas wrote:


On 01/21/13 12:49 AM, rocon...@theorem.ca 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@raspberrypi /tmp/bindist $ bin/ghc --make Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
pi@raspberrypi /tmp/bindist $ ./Main
Segmentation fault
pi@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@raspberrypi /tmp $ ghc-7.6.1c/inplace/bin/ghc-stage2 Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
pi@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 settings.in 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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-20 Thread Karel Gardas

On 01/21/13 12:49 AM, rocon...@theorem.ca 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@raspberrypi /tmp/bindist $ bin/ghc --make Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
pi@raspberrypi /tmp/bindist $ ./Main
Segmentation fault
pi@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@raspberrypi /tmp $ ghc-7.6.1c/inplace/bin/ghc-stage2 Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
pi@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! :-)


Karel


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-20 Thread roconnor

On Sun, 20 Jan 2013, Karel Gardas wrote:


On 01/20/13 08:27 PM, rocon...@theorem.ca wrote:

Looks like you do have corrupted settings file. Recover it by adding
"HARD" following "armABI = ", so result should be:

ArchARM {armISA = ARMv6, armISAExt = [VFPv2], armABI = HARD}"


Okay, I patched the settings filed generted by ./configure in the
binary-dist and rank make install which completed. However,

pi@raspberrypi /tmp/bindist $ bin/ghc --make Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
pi@raspberrypi /tmp/bindist $ ./Main
Segmentation fault
pi@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?


Main.hs is

main = putStrLn "Hello World."

--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-20 Thread roconnor

On Sun, 20 Jan 2013, Karel Gardas wrote:


On 01/20/13 08:27 PM, rocon...@theorem.ca wrote:

Looks like you do have corrupted settings file. Recover it by adding
"HARD" following "armABI = ", so result should be:

ArchARM {armISA = ARMv6, armISAExt = [VFPv2], armABI = HARD}"


Okay, I patched the settings filed generted by ./configure in the
binary-dist and rank make install which completed. However,

pi@raspberrypi /tmp/bindist $ bin/ghc --make Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
pi@raspberrypi /tmp/bindist $ ./Main
Segmentation fault
pi@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@raspberrypi /tmp $ ghc-7.6.1c/inplace/bin/ghc-stage2 Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
pi@raspberrypi /tmp $ ./Main
Hello World.

The stage2 compiler works fine inplace.

--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-20 Thread Karel Gardas

On 01/20/13 08:27 PM, rocon...@theorem.ca wrote:

Looks like you do have corrupted settings file. Recover it by adding
"HARD" following "armABI = ", so result should be:

ArchARM {armISA = ARMv6, armISAExt = [VFPv2], armABI = HARD}"


Okay, I patched the settings filed generted by ./configure in the
binary-dist and rank make install which completed. However,

pi@raspberrypi /tmp/bindist $ bin/ghc --make Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
pi@raspberrypi /tmp/bindist $ ./Main
Segmentation fault
pi@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?


Thanks!
Karel


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-20 Thread roconnor

On Sun, 20 Jan 2013, Karel Gardas wrote:


On 01/20/13 07:17 PM, rocon...@theorem.ca wrote:

On Wed, 16 Jan 2013, Karel Gardas wrote:


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...


I switched to using llvm-3.0 from rasbian, and made a lot of progress.
(In retrospect I built llvm-3.1 using nix, and it was in a completely
different toolchain than the rest of the build. I should have known that
it wouldn't work).


Ehm, building LLVM on your own is always a risky business. See my blog[1] for 
more details especially find the post where I compare quality of various LLVM 
builds using various optimization options...




I was able to complete the build of ghc-7.6.1 using Karel's patch and

./configure --with-llc=/usr/bin/llc-3.0 --with-opt=/usr/bin/opt-3.0

I was able to make binary-dist after doing

mkdir compiler/stage2/doc

However after unpacking the binary distribution and doing a make install
I get:

Installing library in /tmp/bindist/lib/ghc-7.6.1/ghc-prim-0.3.0.0
ghc-cabal: Failed to read "target arch" value "ArchARM {armISA = ARMv6,
armISAExt = [VFPv2], armABI = }"
make[1]: *** [install_packages] Error 1
make: *** [install] Error 2

And in particular the installed ghc gives the error:

$ bin/ghc
Failed to read "target arch" value "ArchARM {armISA = ARMv6, armISAExt =
[VFPv2], armABI = }"

Sounds to me like Karel's patch is almost, but not quite there.


Looks like you do have corrupted settings file. Recover it by adding "HARD" 
following "armABI = ", so result should be:


ArchARM {armISA = ARMv6, armISAExt = [VFPv2], armABI = HARD}"


Okay, I patched the settings filed generted by ./configure in the 
binary-dist and rank make install which completed.  However,


pi@raspberrypi /tmp/bindist $ bin/ghc --make Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
pi@raspberrypi /tmp/bindist $ ./Main
Segmentation fault
pi@raspberrypi /tmp/bindist $ cat Main.hs
main = putStrLn "Hello World."

Damn it.  So close.  I don't know how make install succeded without 
segfaulting.


--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-20 Thread roconnor

On Sun, 20 Jan 2013, Karel Gardas wrote:


On 01/20/13 07:50 PM, rocon...@theorem.ca wrote:

Karel, maybe you should try deploying a binary-dist on your panda board?


Sorry? What's "binary-dist"? And why I should do that? And what
exactly do you mean by "deploying"? And on what OS? Ubuntu or Raspbian
run in Ubuntu chroot?


What I'm suggesting is that if you want to try to reproduce my corrupt
setting file error and ammend your patch for including in GHC, you
should after making ghc-7.6.1 (or whatever version you are building) do a

make binary-dist # this will product a
ghc-7.6.1-arm-unknown-linux.tar.bz2 file

extract ghc-7.6.1-arm-unknown-linux.tar.bz2 in some temporary directory.

in that extracted directory run

./configue --prefix=
make install


Aha, I understand, but could you be so kind and first verify that the 
settings file you do have inside your build tree is the same exactly like the 
settings file distributed with your bin dist? If not, then make binary-dist 
is somehow buggy. If yes, then the configure is buggy and its surprising 
you've been able to build ghc at all...


both the settings and inplace/lib/settings are correct in my build tree. 
This suggests taht binary-dist is buggy.


Sorry, I cannot test it here as my 7.6.1 build on ARM is already gone due to 
hard-drive space constraints here as it freed space for GHC i386/x64 solaris 
cross-compilation tests...


Thanks,
Karel



--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-20 Thread Karel Gardas

On 01/20/13 07:50 PM, rocon...@theorem.ca wrote:

Karel, maybe you should try deploying a binary-dist on your panda board?


Sorry? What's "binary-dist"? And why I should do that? And what
exactly do you mean by "deploying"? And on what OS? Ubuntu or Raspbian
run in Ubuntu chroot?


What I'm suggesting is that if you want to try to reproduce my corrupt
setting file error and ammend your patch for including in GHC, you
should after making ghc-7.6.1 (or whatever version you are building) do a

make binary-dist # this will product a
ghc-7.6.1-arm-unknown-linux.tar.bz2 file

extract ghc-7.6.1-arm-unknown-linux.tar.bz2 in some temporary directory.

in that extracted directory run

./configue --prefix=
make install


Aha, I understand, but could you be so kind and first verify that the 
settings file you do have inside your build tree is the same exactly 
like the settings file distributed with your bin dist? If not, then make 
binary-dist is somehow buggy. If yes, then the configure is buggy and 
its surprising you've been able to build ghc at all...


Sorry, I cannot test it here as my 7.6.1 build on ARM is already gone 
due to hard-drive space constraints here as it freed space for GHC 
i386/x64 solaris cross-compilation tests...


Thanks,
Karel


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-20 Thread roconnor

On Sun, 20 Jan 2013, Karel Gardas wrote:


On 01/20/13 07:17 PM, rocon...@theorem.ca wrote:

On Wed, 16 Jan 2013, Karel Gardas wrote:


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...


I switched to using llvm-3.0 from rasbian, and made a lot of progress.
(In retrospect I built llvm-3.1 using nix, and it was in a completely
different toolchain than the rest of the build. I should have known that
it wouldn't work).


Ehm, building LLVM on your own is always a risky business. See my blog[1] for 
more details especially find the post where I compare quality of various LLVM 
builds using various optimization options...




I was able to complete the build of ghc-7.6.1 using Karel's patch and

./configure --with-llc=/usr/bin/llc-3.0 --with-opt=/usr/bin/opt-3.0

I was able to make binary-dist after doing

mkdir compiler/stage2/doc

However after unpacking the binary distribution and doing a make install
I get:

Installing library in /tmp/bindist/lib/ghc-7.6.1/ghc-prim-0.3.0.0
ghc-cabal: Failed to read "target arch" value "ArchARM {armISA = ARMv6,
armISAExt = [VFPv2], armABI = }"
make[1]: *** [install_packages] Error 1
make: *** [install] Error 2

And in particular the installed ghc gives the error:

$ bin/ghc
Failed to read "target arch" value "ArchARM {armISA = ARMv6, armISAExt =
[VFPv2], armABI = }"

Sounds to me like Karel's patch is almost, but not quite there.


Looks like you do have corrupted settings file. Recover it by adding "HARD" 
following "armABI = ", so result should be:


ArchARM {armISA = ARMv6, armISAExt = [VFPv2], armABI = HARD}"

That's all what's needed, honestly speaking I don't know why it's screwed on 
your board.



Karel, maybe you should try deploying a binary-dist on your panda board?


Sorry? What's "binary-dist"? And why I should do that? And what exactly do 
you mean by "deploying"? And on what OS? Ubuntu or Raspbian run in Ubuntu 
chroot?


What I'm suggesting is that if you want to try to reproduce my corrupt 
setting file error and ammend your patch for including in GHC, you should 
after making ghc-7.6.1 (or whatever version you are building) do a


make binary-dist  # this will product a ghc-7.6.1-arm-unknown-linux.tar.bz2 file

extract ghc-7.6.1-arm-unknown-linux.tar.bz2 in some temporary directory.

in that extracted directory run

./configue --prefix=
make install



Karel
[1]: https://ghcarm.wordpress.com/



--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-20 Thread Karel Gardas

On 01/20/13 07:17 PM, rocon...@theorem.ca wrote:

On Wed, 16 Jan 2013, Karel Gardas wrote:


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...


I switched to using llvm-3.0 from rasbian, and made a lot of progress.
(In retrospect I built llvm-3.1 using nix, and it was in a completely
different toolchain than the rest of the build. I should have known that
it wouldn't work).


Ehm, building LLVM on your own is always a risky business. See my 
blog[1] for more details especially find the post where I compare 
quality of various LLVM builds using various optimization options...




I was able to complete the build of ghc-7.6.1 using Karel's patch and

./configure --with-llc=/usr/bin/llc-3.0 --with-opt=/usr/bin/opt-3.0

I was able to make binary-dist after doing

mkdir compiler/stage2/doc

However after unpacking the binary distribution and doing a make install
I get:

Installing library in /tmp/bindist/lib/ghc-7.6.1/ghc-prim-0.3.0.0
ghc-cabal: Failed to read "target arch" value "ArchARM {armISA = ARMv6,
armISAExt = [VFPv2], armABI = }"
make[1]: *** [install_packages] Error 1
make: *** [install] Error 2

And in particular the installed ghc gives the error:

$ bin/ghc
Failed to read "target arch" value "ArchARM {armISA = ARMv6, armISAExt =
[VFPv2], armABI = }"

Sounds to me like Karel's patch is almost, but not quite there.


Looks like you do have corrupted settings file. Recover it by adding 
"HARD" following "armABI = ", so result should be:


ArchARM {armISA = ARMv6, armISAExt = [VFPv2], armABI = HARD}"

That's all what's needed, honestly speaking I don't know why it's 
screwed on your board.



Karel, maybe you should try deploying a binary-dist on your panda board?


Sorry? What's "binary-dist"? And why I should do that? And what exactly 
do you mean by "deploying"? And on what OS? Ubuntu or Raspbian run in 
Ubuntu chroot?


Karel
[1]: https://ghcarm.wordpress.com/

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-20 Thread roconnor

On Wed, 16 Jan 2013, Karel Gardas wrote:

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...


I switched to using llvm-3.0 from rasbian, and made a lot of progress. (In 
retrospect I built llvm-3.1 using nix, and it was in a completely 
different toolchain than the rest of the build.  I should have known that 
it wouldn't work).


I was able to complete the build of ghc-7.6.1 using Karel's patch and

./configure --with-llc=/usr/bin/llc-3.0 --with-opt=/usr/bin/opt-3.0

I was able to make binary-dist after doing

mkdir compiler/stage2/doc

However after unpacking the binary distribution and doing a make install I 
get:


Installing library in /tmp/bindist/lib/ghc-7.6.1/ghc-prim-0.3.0.0
ghc-cabal: Failed to read "target arch" value "ArchARM {armISA = ARMv6,
armISAExt = [VFPv2], armABI = }"
make[1]: *** [install_packages] Error 1
make: *** [install] Error 2

And in particular the installed ghc gives the error:

$ bin/ghc
Failed to read "target arch" value "ArchARM {armISA = ARMv6, armISAExt = 
[VFPv2], armABI = }"


Sounds to me like Karel's patch is almost, but not quite there.

Karel, maybe you should try deploying a binary-dist on your panda board?

--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-18 Thread roconnor

On Fri, 18 Jan 2013, Karel Gardas wrote:


On 01/18/13 05:49 PM, rocon...@theorem.ca wrote:

I don't know much about gdb, but

$ /usr/bin/gdb /tmp/Main
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
For bug reporting instructions, please see:
...
Reading symbols from /tmp/Main...done.
(gdb) run
Starting program: /tmp/Main [Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/arm-linux-gnueabihf/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x003a732c in stg_returnToStackTop ()


And here you need to use `bt' command to show us a call stack which leads to 
crash.


(gdb) run
Starting program: /tmp/Main 
[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x003a732c in stg_returnToStackTop ()
(gdb) bt
#0  0x003a732c in stg_returnToStackTop ()
#1  0x0042f6d0 in MainCapability ()
#2  0x0042f6d0 in MainCapability ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) quit

--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-18 Thread Karel Gardas

On 01/18/13 05:49 PM, rocon...@theorem.ca wrote:

I don't know much about gdb, but

$ /usr/bin/gdb /tmp/Main
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
For bug reporting instructions, please see:
...
Reading symbols from /tmp/Main...done.
(gdb) run
Starting program: /tmp/Main [Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/arm-linux-gnueabihf/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x003a732c in stg_returnToStackTop ()


And here you need to use `bt' command to show us a call stack which 
leads to crash.


Thanks,
Karel

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-18 Thread roconnor

On Thu, 17 Jan 2013, rocon...@theorem.ca wrote:


On Thu, 17 Jan 2013, Austin Seipp wrote:


There have been a few of these bugs recently it seems. If you could:
use the stage1 compiler to compile a simple executable, like 'main =
return ()' or hello world or whatever.

The stage1 compiler can be located in the build directory, under
'inplace/bin/ghc-stage1'. So something like:

/inplace/bin/ghc-stage1 -fforce-recomp hello_world.hs

Check if the output executable crashes immediately. If it does, then
it is likely a miscompilation of the runtime or libraries somewhere.
Otherwise, we'll have to narrow down another way.


$ inplace/bin/ghc-stage1 -fforce-recomp /tmp/Main.hs
[1 of 1] Compiling Main ( /tmp/Main.hs, /tmp/Main.o )
Linking /tmp/Main ...
$ /tmp/Main
Segmentation fault


If it does fail, please use GDB on the executable, and give a
backtrace from the crash (using the 'bt' command, after the program
has crashed.)


I'll get back to you on this.


I don't know much about gdb, but

$ /usr/bin/gdb /tmp/Main
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
For bug reporting instructions, please see:
...
Reading symbols from /tmp/Main...done.
(gdb) run
Starting program: /tmp/Main 
[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x003a732c in stg_returnToStackTop ()
(gdb) quit
A debugging session is active.

Inferior 1 [process 17097] will be killed.

Quit anyway? (y or n) y


You can also try linking with the debug RTS, by passing the -debug and
-rtsopts flag to ghc-stage1. Then run again, and see if something else
was tripped. You can see all the sanity checks you can enable, if you
run the executable using './program.exe +RTS --help'. The debug flags
are named things like '-Ds' and '-Da', etc and should be passed to the
RTS.





--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-17 Thread roconnor

On Thu, 17 Jan 2013, Austin Seipp wrote:


There have been a few of these bugs recently it seems. If you could:
use the stage1 compiler to compile a simple executable, like 'main =
return ()' or hello world or whatever.

The stage1 compiler can be located in the build directory, under
'inplace/bin/ghc-stage1'. So something like:

/inplace/bin/ghc-stage1 -fforce-recomp hello_world.hs

Check if the output executable crashes immediately. If it does, then
it is likely a miscompilation of the runtime or libraries somewhere.
Otherwise, we'll have to narrow down another way.


$ inplace/bin/ghc-stage1 -fforce-recomp /tmp/Main.hs
[1 of 1] Compiling Main ( /tmp/Main.hs, /tmp/Main.o )
Linking /tmp/Main ...
$ /tmp/Main
Segmentation fault


If it does fail, please use GDB on the executable, and give a
backtrace from the crash (using the 'bt' command, after the program
has crashed.)


I'll get back to you on this.


You can also try linking with the debug RTS, by passing the -debug and
-rtsopts flag to ghc-stage1. Then run again, and see if something else
was tripped. You can see all the sanity checks you can enable, if you
run the executable using './program.exe +RTS --help'. The debug flags
are named things like '-Ds' and '-Da', etc and should be passed to the
RTS.


--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-17 Thread Austin Seipp
There have been a few of these bugs recently it seems. If you could:
use the stage1 compiler to compile a simple executable, like 'main =
return ()' or hello world or whatever.

The stage1 compiler can be located in the build directory, under
'inplace/bin/ghc-stage1'. So something like:

/inplace/bin/ghc-stage1 -fforce-recomp hello_world.hs

Check if the output executable crashes immediately. If it does, then
it is likely a miscompilation of the runtime or libraries somewhere.
Otherwise, we'll have to narrow down another way.

If it does fail, please use GDB on the executable, and give a
backtrace from the crash (using the 'bt' command, after the program
has crashed.)

You can also try linking with the debug RTS, by passing the -debug and
-rtsopts flag to ghc-stage1. Then run again, and see if something else
was tripped. You can see all the sanity checks you can enable, if you
run the executable using './program.exe +RTS --help'. The debug flags
are named things like '-Ds' and '-Da', etc and should be passed to the
RTS.

On Thu, Jan 17, 2013 at 1:11 PM,   wrote:
> On Wed, 16 Jan 2013, Karel Gardas wrote:
>
>> On 01/16/13 08:12 PM, rocon...@theorem.ca 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/build.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
>
> using
>
>
> 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.''
>
> ___
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



-- 
Regards,
Austin

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-17 Thread roconnor

On Wed, 16 Jan 2013, Karel Gardas wrote:


On 01/16/13 08:12 PM, rocon...@theorem.ca 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/build.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

using

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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-16 Thread Karel Gardas

On 01/16/13 08:12 PM, rocon...@theorem.ca 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/build.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...


Karel


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-16 Thread roconnor

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/build.mk.  I've ben getting a lot of errors about two occurances of 
the float-abi=hard flag.



Thanks,
Karel

On 01/16/13 08:02 PM, rocon...@theorem.ca wrote:

On Wed, 16 Jan 2013, Karel Gardas wrote:



Guys,

I've installed raspbian into ubuntu chroot on my panda. Now to
simulate what GHC detects on your hardware, could you be so kind and
send me output of:

uname -m


armv6l


uname -r


3.6.11+


uname -s


Linux


uname -v


#346 PREEMPT Fri Dec 28 00:50:33 GMT 2012


this looks like a needed info for config.guess to detect machine
hardware well.

Also if you send me output of:

sh config.guess


armv6l-unknown-linux-gnueabihf


it would be great.

Everything of course run on your rpi board!

Thanks,
Karel






--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-16 Thread Karel Gardas


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?


Thanks,
Karel

On 01/16/13 08:02 PM, rocon...@theorem.ca wrote:

On Wed, 16 Jan 2013, Karel Gardas wrote:



Guys,

I've installed raspbian into ubuntu chroot on my panda. Now to
simulate what GHC detects on your hardware, could you be so kind and
send me output of:

uname -m


armv6l


uname -r


3.6.11+


uname -s


Linux


uname -v


#346 PREEMPT Fri Dec 28 00:50:33 GMT 2012


this looks like a needed info for config.guess to detect machine
hardware well.

Also if you send me output of:

sh config.guess


armv6l-unknown-linux-gnueabihf


it would be great.

Everything of course run on your rpi board!

Thanks,
Karel





___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-16 Thread roconnor

On Wed, 16 Jan 2013, Karel Gardas wrote:



Guys,

I've installed raspbian into ubuntu chroot on my panda. Now to simulate what 
GHC detects on your hardware, could you be so kind and send me output of:


uname -m


armv6l


uname -r


3.6.11+


uname -s


Linux


uname -v


#346 PREEMPT Fri Dec 28 00:50:33 GMT 2012

this looks like a needed info for config.guess to detect machine hardware 
well.


Also if you send me output of:

sh config.guess


armv6l-unknown-linux-gnueabihf


it would be great.

Everything of course run on your rpi board!

Thanks,
Karel


--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-16 Thread Neil Davies
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.dav...@pnsol.com)

Neil


On 15 Jan 2013, at 17:16, Karel Gardas  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, rocon...@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, rocon...@theorem.ca wrote:
>>> 
 On Mon, 14 Jan 2013, Thijs Alkemade wrote:
 
> Op 14 jan. 2013, om 17:30 heeft rocon...@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
>>>

Re: Error building ghc on raspberry pi.

2013-01-16 Thread Neil Davies
I looked at that route - the issue is that the emulator only has 256M of RAM 
(and that's not changeable) - so there are going to be build issues with the 
GHC tool chain - it was then that I moved to "real" hardware.

Neil

On 15 Jan 2013, at 17:01, rocon...@theorem.ca wrote:

> On Tue, 15 Jan 2013, Thijs Alkemade wrote:
> 
>> 
>> Op 15 jan. 2013, om 17:36 heeft rocon...@theorem.ca het volgende geschreven:
>> 
>>> 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
>> ...
>> 
>> Did you do a `make clean` first? If not, try removing just (some of) the 
>> offending .o files, and see if rebuilding just those results in the same 
>> error.
> 
> I did a make clean first I'm afarid.
> 
> -- 
> 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.''
> 
> ___
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-16 Thread Karel Gardas


Guys,

I've installed raspbian into ubuntu chroot on my panda. Now to simulate 
what GHC detects on your hardware, could you be so kind and send me 
output of:


uname -m
uname -r
uname -s
uname -v

this looks like a needed info for config.guess to detect machine 
hardware well.


Also if you send me output of:

sh config.guess

it would be great.

Everything of course run on your rpi board!

Thanks,
Karel

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-15 Thread Karel Gardas

On 01/15/13 08:56 PM, Thijs Alkemade wrote:


Op 15 jan. 2013, om 18:16 heeft Karel Gardas  het 
volgende geschreven:


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


This might be helpful, it's a guide to emulate a raspberry pi using qemu, which 
I was using to (try to) build GHC:

http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/

While I haven't done any real measurements, it seemed somewhat faster too on my 
machine.


Indeed, that may be the way. The other may be to debootstrap rasbian 
into ubuntu chroot on ARMv7 machine for example. I'm curious what 
configure will report then, i.e. if this will look really like ARMv6 or 
ARMv7 at the end... Also 1 GHz OMAP4 is still faster in executing ARm 
code than Qemu/ARM running on my Intel box... :-)


Karel



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-15 Thread Thijs Alkemade

Op 15 jan. 2013, om 18:16 heeft Karel Gardas  het 
volgende geschreven:

> 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

This might be helpful, it's a guide to emulate a raspberry pi using qemu, which 
I was using to (try to) build GHC:

http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/

While I haven't done any real measurements, it seemed somewhat faster too on my 
machine.

Thijs
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-15 Thread Karel Gardas


Well, just wild guessing what's needed on RPi, but could you who do have 
this board attempt to use attached patch? Don't forget to ./boot as this 
change configure. Also testing it on completely clean tree may be wise 
idea. Also after configure run please check that you do have VFPv2 in 
the ext list. -- this is indeed a wild guess for ARMv6, but as we do the 
same for ARMv7 (guessing VFPv3) I don't think this is show-stopper now...


Please let me know if this is working...

Karel

On 01/15/13 06:25 PM, Ben Gamari wrote:

rocon...@theorem.ca writes:


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


I found this as well and have been unable to figure out what in the
build system needs to be tweaked. This is ultimately where I gave up on
7.4.

Anyone have any ideas what flags this is built with? It seems that
neither GhcStage2HcOpts nor GhcLibHcOpts make it to the compiler here,

 "inplace/bin/ghc-stage1"   -H64m -Rghc-timing -v-hide-all-packages -i 
-iutils/hsc2hs/. -iutils/hsc2hs/dist-install/build 
-iutils/hsc2hs/dist-install/build/autogen -Iutils/hsc2hs/dist-install/build -Iutils/hsc2
 hs/dist-install/build/autogen -optP-include 
-optPutils/hsc2hs/dist-install/build/autogen/cabal_macros.h -package 
base-4.5.1.0 -package containers-0.4.2.1 -package directory-1.1.0.2 -package 
process-1.1.0.1  -X
 Haskell98 -XCPP -XForeignFunctionInterface  -no-user-package-conf -rtsopts 
-odir utils/hsc2hs/dist-install/build -hidir 
utils/hsc2hs/dist-install/build -stubdir utils/hsc2hs/dist-install/build -hisuf 
hi -osuf
  o -hcsuf hc -c utils/hsc2hs/./Main.hs -o 
utils/hsc2hs/dist-install/build/Main.o


Cheers,

  - Ben

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



diff --git a/aclocal.m4 b/aclocal.m4
index 127f528..a2db986 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -356,7 +356,7 @@ AC_DEFUN([GET_ARM_ISA],
 [AC_DEFINE(arm_HOST_ARCH_PRE_ARMv7, 1, [ARM pre v7])
  changequote(, )dnl
  ARM_ISA=ARMv6
- ARM_ISA_EXT="[]"
+ ARM_ISA_EXT="[VFPv2]"
  changequote([, ])dnl
 ],
 [changequote(, )dnl
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index b128c1f..c71546c 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1453,14 +1453,17 @@ runPhase LlvmLlc input_fn dflags
   else if (elem VFPv3D16 ext)
then ["-mattr=+v7,+vfp3,+d16"]
else []
+   ArchARM ARMv6 ext _ -> if (elem VFPv2 ext)
+  then ["-mattr=+v6,+vfp2"]
+  else ["-mattr=+v6"]
_ -> []
 -- On Ubuntu/Debian with ARM hard float ABI, LLVM's llc still
 -- compiles into soft-float ABI. We need to explicitly set abi
 -- to hard
 abiOpts = case platformArch (targetPlatform dflags) of
-ArchARM ARMv7 _ HARD -> ["-float-abi=hard"]
-ArchARM ARMv7 _ _-> []
-_-> []
+ArchARM _ _ HARD -> ["-float-abi=hard"]
+ArchARM _ _ _-> []
+_-> []
 
 -
 -- LlvmMangle phase
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-15 Thread Ben Gamari
rocon...@theorem.ca writes:

> 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

I found this as well and have been unable to figure out what in the
build system needs to be tweaked. This is ultimately where I gave up on
7.4.

Anyone have any ideas what flags this is built with? It seems that
neither GhcStage2HcOpts nor GhcLibHcOpts make it to the compiler here,

"inplace/bin/ghc-stage1"   -H64m -Rghc-timing -v-hide-all-packages -i 
-iutils/hsc2hs/. -iutils/hsc2hs/dist-install/build 
-iutils/hsc2hs/dist-install/build/autogen -Iutils/hsc2hs/dist-install/build 
-Iutils/hsc2
hs/dist-install/build/autogen -optP-include 
-optPutils/hsc2hs/dist-install/build/autogen/cabal_macros.h -package 
base-4.5.1.0 -package containers-0.4.2.1 -package directory-1.1.0.2 -package 
process-1.1.0.1  -X
Haskell98 -XCPP -XForeignFunctionInterface  -no-user-package-conf -rtsopts  
   -odir utils/hsc2hs/dist-install/build -hidir utils/hsc2hs/dist-install/build 
-stubdir utils/hsc2hs/dist-install/build -hisuf hi -osuf 
 o -hcsuf hc -c utils/hsc2hs/./Main.hs -o 
utils/hsc2hs/dist-install/build/Main.o


Cheers,

 - Ben

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-15 Thread Karel Gardas


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, rocon...@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, rocon...@theorem.ca wrote:


On Mon, 14 Jan 2013, Thijs Alkemade wrote:


Op 14 jan. 2013, om 17:30 heeft rocon...@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: faile

Re: Error building ghc on raspberry pi.

2013-01-15 Thread roconnor
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, rocon...@theorem.ca wrote:


On Mon, 14 Jan 2013, Thijs Alkemade wrote:


Op 14 jan. 2013, om 17:30 heeft rocon...@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/tm

Re: Error building ghc on raspberry pi.

2013-01-15 Thread roconnor

On Tue, 15 Jan 2013, Thijs Alkemade wrote:



Op 15 jan. 2013, om 17:36 heeft rocon...@theorem.ca het volgende geschreven:


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

...

Did you do a `make clean` first? If not, try removing just (some of) the 
offending .o files, and see if rebuilding just those results in the same error.


I did a make clean first I'm afarid.

--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-15 Thread Neil Davies
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, rocon...@theorem.ca wrote:

> On Mon, 14 Jan 2013, Thijs Alkemade wrote:
> 
>> Op 14 jan. 2013, om 17:30 heeft rocon...@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/hsc

Re: Error building ghc on raspberry pi.

2013-01-15 Thread Thijs Alkemade

Op 15 jan. 2013, om 17:36 heeft rocon...@theorem.ca het volgende geschreven:

> 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
...

Did you do a `make clean` first? If not, try removing just (some of) the 
offending .o files, and see if rebuilding just those results in the same error.

Thijs
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-15 Thread roconnor

On Mon, 14 Jan 2013, Thijs Alkemade wrote:


Op 14 jan. 2013, om 17:30 heeft rocon...@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 VF

Re: Error building ghc on raspberry pi.

2013-01-14 Thread Thijs Alkemade

Op 14 jan. 2013, om 17:30 heeft rocon...@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.

Thijs
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-14 Thread roconnor

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.


--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Building ghc on raspberry pi.

2013-01-13 Thread Neil Davies
Understood

I've got another RPi supposed to arrive this week - would more computation 
power help anyone out there?

Neil

On 13 Jan 2013, at 15:59, rocon...@theorem.ca wrote:

> On Sun, 13 Jan 2013, Neil Davies wrote:
> 
>> Sounds like we're close - I must admit I've slightly lost track of the 
>> things that need to be done.
>> 
>> Can we start collecting the pre-conditionds and steps, when each complete 
>> build takes best part of a day, its difficult to keep the context.
>> 
>> So - taking the ghc 7.4.1 that is part of raspian wheezy (pkg version 
>> 7.4.1-4+rpi1) which depends upon (amongst others) llvm-3.0 (pkg version 
>> 3.0-10), can we capture the changes?
>> 
>> 
>> Which version of LLVM is being used?
> 
> I'm using LLVM 3.1 and gcc 4.6.3 and ghc 7.4.1.
> 
>> Which ghc source(s) are you starting from?
> 
> ghc-7.6.1 with 
> http://hackage.haskell.org/trac/ghc/attachment/ticket/5914/0001-add-support-for-ARM-hard-float-ABI-fixes-5914.patch
> applied, fixing the hunks in compiler/main/DriverPipeline.hs by hand.
> 
>> What files did you need to touch in the make process?  Please supply diffs
> 
> I've been fiddling with various parmameters in mk/build.mk.
> 
>> Anything else?
> 
> I haven't got it compiling yet.
> 
> Oh I'm currently using the raspian distriubtion with uses the hard-float ABI, 
> but my end-goal is to bootstrap a nix package.
> 
> -- 
> 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.''


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Building ghc on raspberry pi.

2013-01-13 Thread roconnor

On Sun, 13 Jan 2013, Neil Davies wrote:


Sounds like we're close - I must admit I've slightly lost track of the things 
that need to be done.

Can we start collecting the pre-conditionds and steps, when each complete build 
takes best part of a day, its difficult to keep the context.

So - taking the ghc 7.4.1 that is part of raspian wheezy (pkg version 
7.4.1-4+rpi1) which depends upon (amongst others) llvm-3.0 (pkg version 
3.0-10), can we capture the changes?


Which version of LLVM is being used?


I'm using LLVM 3.1 and gcc 4.6.3 and ghc 7.4.1.


Which ghc source(s) are you starting from?


ghc-7.6.1 with 
http://hackage.haskell.org/trac/ghc/attachment/ticket/5914/0001-add-support-for-ARM-hard-float-ABI-fixes-5914.patch

applied, fixing the hunks in compiler/main/DriverPipeline.hs by hand.


What files did you need to touch in the make process?  Please supply diffs


I've been fiddling with various parmameters in mk/build.mk.


Anything else?


I haven't got it compiling yet.

Oh I'm currently using the raspian distriubtion with uses the hard-float 
ABI, but my end-goal is to bootstrap a nix package.


--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Building ghc on raspberry pi.

2013-01-13 Thread Neil Davies
Sounds like we're close - I must admit I've slightly lost track of the things 
that need to be done.

Can we start collecting the pre-conditionds and steps, when each complete build 
takes best part of a day, its difficult to keep the context.

So - taking the ghc 7.4.1 that is part of raspian wheezy (pkg version 
7.4.1-4+rpi1) which depends upon (amongst others) llvm-3.0 (pkg version 
3.0-10), can we capture the changes?


Which version of LLVM is being used?

Which ghc source(s) are you starting from?

What files did you need to touch in the make process?  Please supply diffs

Anything else?

Neil
 


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-12 Thread Austin Seipp
On Sat, Jan 12, 2013 at 10:29 PM, Austin Seipp  wrote:
>
> The first one passes the options onto LLVM's code generator tool,
> 'llc', so it also gets the ABI options right.

s/first/second/

-- 
Regards,
Austin

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-12 Thread Austin Seipp
On Sat, Jan 12, 2013 at 10:23 PM,   wrote:
>>
>>GhcLibHcOpts   = -O -fllvm -optc-mfloat-abi=hard -optc-mcpu=cortex-a9 
>> -optlc-float-abi=hard -optlc-mcpu=cortex-a9
>
>
> You've written "-optc-mfloat-abi=hard -optc-mcpu=cortex-a9" twice in your
> GhcLibHcOpts.
>

Not quite. Notice the difference between '-optc-...' and '-optlc-...'

The first one will pass options onto the C compiler (since you use the
GHC executable to compile the RTS and other things, this is
necessary.)

The first one passes the options onto LLVM's code generator tool,
'llc', so it also gets the ABI options right.

-- 
Regards,
Austin

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-12 Thread Ben Gamari
rocon...@theorem.ca writes:

> On Sat, 12 Jan 2013, Ben Gamari wrote:
>
>>SRC_HC_OPTS= -H64m -Rghc-timing
>>GhcStage1HcOpts= -O -fvia-C
>>GhcStage2HcOpts= -O0 -fllvm -keep-llvm-files -debug -DDEBUG 
>> -optc-mfloat-abi=hard -optc-mcpu=cortex-a9 -optlc-float-abi=hard 
>> -optlc-mcpu=cortex-a9
>>GhcLibHcOpts   = -O -fllvm -optc-mfloat-abi=hard -optc-mcpu=cortex-a9 
>> -optlc-float-abi=hard -optlc-mcpu=cortex-a9
>
> You've written "-optc-mfloat-abi=hard -optc-mcpu=cortex-a9" twice in your 
> GhcLibHcOpts.
>
Not quite, one is -optc (apparently passed to gcc) and the other is
-optlc (passed to llc). 

Cheers,

- Ben


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-12 Thread roconnor

On Sat, 12 Jan 2013, Ben Gamari wrote:


rocon...@theorem.ca writes:


What version of GHC did you build?


This was building from the ghc-7.4 branch. That being said, after this
build finished I noticed that the resulting stage 2 compiler wasn't
invoking llc with the correct parameters, resulting in the same linker
error when doing builds.

This might have been due to the fact that I changed `build.mk` several
times mid-build. I'm currently waiting for a clean rebuild. However, I'm
now using a more specific configuration as passing `-optlc-float-abi=hard`
in `HC_SRC_OPTS` caused the stage 0 build to fail with,

   ...
   *** LLVM Compiler:
   'llc-3.0' '-O1' '-relocation-model=static' '/tmp/ghc25792_0/ghc25792_0.bc' 
'-o' '/tmp/ghc25792_0/ghc25792_0.lm_s' '-float-abi=hard' '-mcpu=cortex-a9' 
'-mattr=+v7,+vfp3,+d16' '-float-abi=hard'
   llc-3.0: for the -float-abi option: may only occur zero or one times!

I'm not really sure where this second `-float-abi=hard` is coming from,
but using the following in `build.mk` works around the issue,

   SRC_HC_OPTS= -H64m -Rghc-timing
   GhcStage1HcOpts= -O -fvia-C
   GhcStage2HcOpts= -O0 -fllvm -keep-llvm-files -debug -DDEBUG 
-optc-mfloat-abi=hard -optc-mcpu=cortex-a9 -optlc-float-abi=hard 
-optlc-mcpu=cortex-a9
   GhcLibHcOpts   = -O -fllvm -optc-mfloat-abi=hard -optc-mcpu=cortex-a9 
-optlc-float-abi=hard -optlc-mcpu=cortex-a9


You've written "-optc-mfloat-abi=hard -optc-mcpu=cortex-a9" twice in your 
GhcLibHcOpts.


--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-12 Thread Ben Gamari
rocon...@theorem.ca writes:

> What version of GHC did you build?
>
This was building from the ghc-7.4 branch. That being said, after this
build finished I noticed that the resulting stage 2 compiler wasn't
invoking llc with the correct parameters, resulting in the same linker
error when doing builds.

This might have been due to the fact that I changed `build.mk` several
times mid-build. I'm currently waiting for a clean rebuild. However, I'm
now using a more specific configuration as passing `-optlc-float-abi=hard`
in `HC_SRC_OPTS` caused the stage 0 build to fail with,

...
*** LLVM Compiler:
'llc-3.0' '-O1' '-relocation-model=static' '/tmp/ghc25792_0/ghc25792_0.bc' 
'-o' '/tmp/ghc25792_0/ghc25792_0.lm_s' '-float-abi=hard' '-mcpu=cortex-a9' 
'-mattr=+v7,+vfp3,+d16' '-float-abi=hard'
llc-3.0: for the -float-abi option: may only occur zero or one times!

I'm not really sure where this second `-float-abi=hard` is coming from,
but using the following in `build.mk` works around the issue,

SRC_HC_OPTS= -H64m -Rghc-timing
GhcStage1HcOpts= -O -fvia-C
GhcStage2HcOpts= -O0 -fllvm -keep-llvm-files -debug -DDEBUG 
-optc-mfloat-abi=hard -optc-mcpu=cortex-a9 -optlc-float-abi=hard 
-optlc-mcpu=cortex-a9
GhcLibHcOpts   = -O -fllvm -optc-mfloat-abi=hard -optc-mcpu=cortex-a9 
-optlc-float-abi=hard -optlc-mcpu=cortex-a9

The build is still in stage 1 so it is unclear whether this will fix the
original linker error.

Cheers,

- Ben


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-12 Thread roconnor

What version of GHC did you build?

On Sat, 12 Jan 2013, Ben Gamari wrote:


Karel Gardas  writes:


On 01/11/13 09:25 PM, rocon...@theorem.ca wrote:

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...


Add it to the GhcLibHcOpts?


Probably too, I'm not the expert here, just make sure you use this
option for any ghc invocation which invokes llc to get consistent vfp
usage in your object files...


I've been struggling with this class of error recently as well.

After several failed builds I arrived at the following on my Pandaboard,

   SRC_HC_OPTS = -H64m -Rghc-timing -optc-mfloat-abi=hard -optc-mcpu=cortex-a9 
-optlc-float-abi=hard -optlc-mcpu=cortex-a9

I've found it's best to set both gcc and llc arguments as they tend to
disagree when you least expect it. I'm not sure whether SRC_HC_OPTS is
too large a hammer, but it seems to work for me.

Cheers,

- Ben



--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-12 Thread roconnor

On Sat, 12 Jan 2013, rocon...@theorem.ca wrote:


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...


Done.  What would you like to see?


Wait, never mind, I somehow failed to apply your option during the build. 
I will try again.


--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-12 Thread roconnor

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...


Done.  What would you like to see?

--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-12 Thread Ben Gamari
Karel Gardas  writes:

> On 01/11/13 09:25 PM, rocon...@theorem.ca wrote:
>> 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...
>>
>> Add it to the GhcLibHcOpts?
>
> Probably too, I'm not the expert here, just make sure you use this 
> option for any ghc invocation which invokes llc to get consistent vfp 
> usage in your object files...
>
I've been struggling with this class of error recently as well.

After several failed builds I arrived at the following on my Pandaboard,

SRC_HC_OPTS = -H64m -Rghc-timing -optc-mfloat-abi=hard -optc-mcpu=cortex-a9 
-optlc-float-abi=hard -optlc-mcpu=cortex-a9

I've found it's best to set both gcc and llc arguments as they tend to
disagree when you least expect it. I'm not sure whether SRC_HC_OPTS is
too large a hammer, but it seems to work for me.

Cheers,

- Ben


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-12 Thread Neil Davies
If there is anything useful I can do - shout.

Given the time it takes to do each rebuild on a raspberry pi - this is real 
dedication!

Neil

On 12 Jan 2013, at 17:01, rocon...@theorem.ca wrote:

> I've tried to build 6.12.3, 7.4.1, 7.4.2, and 7.6.1, with a few various 
> patches, and I'm stuck in the final stage with errors like:
> 
> /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
> 
> I'm rebuilding with Karel's latest suggestion now.
> 
> 
> On Sat, 12 Jan 2013, Neil Davies wrote:
> 
>> Hi
>> 
>> I've found myself wanting to get GHC 7.4.2 (need TemplateHaskell for 
>> something) working on the rapberry pi - can you (or anyone out there) share 
>> where you are at?
>> 
>> My starting point is the raspian image of 2012-12-18-wheezy-raspian that has 
>> GHC 7.4.1 on it...
>> 
>> Neil
>> 
>> On 11 Jan 2013, at 20:25, rocon...@theorem.ca wrote:
>> 
>>> 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...
>>> 
>>> Add it to the GhcLibHcOpts?
>>> 
 Cheers,
 Karel
>>> 
>>> --
>>> 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.''
>>> 
>>> ___
>>> Glasgow-haskell-users mailing list
>>> Glasgow-haskell-users@haskell.org
>>> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>> 
> 
> -- 
> 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.''


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-12 Thread roconnor
I've tried to build 6.12.3, 7.4.1, 7.4.2, and 7.6.1, with a few various 
patches, and I'm stuck in the final stage with errors like:


/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

I'm rebuilding with Karel's latest suggestion now.


On Sat, 12 Jan 2013, Neil Davies wrote:


Hi

I've found myself wanting to get GHC 7.4.2 (need TemplateHaskell for something) 
working on the rapberry pi - can you (or anyone out there) share where you are 
at?

My starting point is the raspian image of 2012-12-18-wheezy-raspian that has 
GHC 7.4.1 on it...

Neil

On 11 Jan 2013, at 20:25, rocon...@theorem.ca wrote:


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...


Add it to the GhcLibHcOpts?


Cheers,
Karel


--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users




--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-12 Thread Neil Davies
Hi 

I've found myself wanting to get GHC 7.4.2 (need TemplateHaskell for something) 
working on the rapberry pi - can you (or anyone out there) share where you are 
at?

My starting point is the raspian image of 2012-12-18-wheezy-raspian that has 
GHC 7.4.1 on it...

Neil

On 11 Jan 2013, at 20:25, rocon...@theorem.ca wrote:

> 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...
> 
> Add it to the GhcLibHcOpts?
> 
>> Cheers,
>> Karel
> 
> -- 
> 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.''
> 
> ___
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-11 Thread Karel Gardas

On 01/11/13 09:25 PM, rocon...@theorem.ca wrote:

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...


Add it to the GhcLibHcOpts?


Probably too, I'm not the expert here, just make sure you use this 
option for any ghc invocation which invokes llc to get consistent vfp 
usage in your object files...


Once you test it and if succeed we can hack ghc to support it.

Karel


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-11 Thread roconnor

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...


Add it to the GhcLibHcOpts?


Cheers,
Karel


--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-10 Thread Karel Gardas


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...


Cheers,
Karel

On 01/10/13 03:11 AM, rocon...@theorem.ca wrote:

This is the settingings file:

$ cat settings
[("GCC extra via C opts", " -fwrapv"),
("C compiler command", "/usr/bin/gcc"),
("C compiler flags", " -fno-stack-protector -Wl,--hash-size=31
-Wl,--reduce-memory-overheads"),
("ar command", "/usr/bin/ar"),
("ar flags", "q"),
("ar supports at file", "YES"),
("touch command", "touch"),
("dllwrap command", "/bin/false"),
("windres command", "/bin/false"),
("perl command", "/usr/bin/perl"),
("target os", "OSLinux"),
("target arch", "ArchARM {armISA = ARMv6, armISAExt = [], armABI = HARD}"),
("target word size", "4"),
("target has GNU nonexec stack", "False"),
("target has .ident directive", "True"),
("target has subsections via symbols", "False"),
("LLVM llc command", "/home/pi/.nix-profile/bin/llc"),
("LLVM opt command", "/home/pi/.nix-profile/bin/opt")
]

On Wed, 9 Jan 2013, Karel Gardas wrote:



Hi,

find ghc's generated settings file. What FPU is used there?

Thanks,
Karel

On 01/ 9/13 09:47 PM, rocon...@theorem.ca wrote:

Thanks for the advice; However, it had little effect.

I now have the errors:

===--- 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/GHC/PrimopWrappers.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/GHC/PrimopWrappers.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
/usr/bin/ld: error:
libraries/ghc-prim/dist-install/build/cbits/longlong.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/longlong.o
/usr/bin/ld: error: libraries/ghc-prim/dist-install/build/cbits/popcnt.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/popcnt.o
make[1]: ***
[libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o] Error 1

Anyone else building GHC on a pi?

On Tue, 8 Jan 2013, Thijs Alkemade wrote:



Op 8 jan. 2013, om 05:16 heeft rocon...@theorem.ca het volgende
geschreven:


On Thu, 3 Jan 2013, Thijs Alkemade wrote:


I believe I had the same problem, which disappeared after upgrading
llvm from 3.0 to 3.1, and using that instead for ./configure.

Hope this helps,
Thijs


Thanks, using LLVM 3.1 seems to have improved the siutation, but I'm
running into a new error.

Here is the error I get when trying to build GHC 7.6.1 from 7.4.1

===--- 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/cjjbits/debug.o
/usr/bin/ld: error:
libraries/ghc-prim/dist-install/build/cbits/longlong.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/longlong.o
/usr/bin/ld: error:
libraries/ghc-prim/dist-install/build/cbits/popcnt.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/popcnt.o
make[1]: ***
[libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o] Error 1

I get similar errors when building GHC 7.4.1 (patched with
http://hackage.haskell.org/trac/ghc/attachment/ticket/5914/0001-add-support-for-ARM-hard-float-ABI-fixes-5914.patch).



Any of you encountered this problem before?



Yeah, I had a lot of these. The problem was that GHC has a lot of
different "CFLAGS",
so finding the right way to pass "-float-abi=hard" to every one of
them took some time, but
eventually I ended up with the following change to mk/build.mk:

ifeq "$(BuildFlavour)" "quick"

SRC_HC_OPTS = -H64m -O0 -fasm
GhcStage1HcOpts = -O -fasm
GhcStage2HcOpts = -O0 -fasm
Gh

Re: Error building ghc on raspberry pi.

2013-01-09 Thread roconnor

This is the settingings file:

$ cat settings
[("GCC extra via C opts", " -fwrapv"),
 ("C compiler command", "/usr/bin/gcc"),
 ("C compiler flags", " -fno-stack-protector  -Wl,--hash-size=31 
-Wl,--reduce-memory-overheads"),
 ("ar command", "/usr/bin/ar"),
 ("ar flags", "q"),
 ("ar supports at file", "YES"),
 ("touch command", "touch"),
 ("dllwrap command", "/bin/false"),
 ("windres command", "/bin/false"),
 ("perl command", "/usr/bin/perl"),
 ("target os", "OSLinux"),
 ("target arch", "ArchARM {armISA = ARMv6, armISAExt = [], armABI = HARD}"),
 ("target word size", "4"),
 ("target has GNU nonexec stack", "False"),
 ("target has .ident directive", "True"),
 ("target has subsections via symbols", "False"),
 ("LLVM llc command", "/home/pi/.nix-profile/bin/llc"),
 ("LLVM opt command", "/home/pi/.nix-profile/bin/opt")
 ]

On Wed, 9 Jan 2013, Karel Gardas wrote:



Hi,

find ghc's generated settings file. What FPU is used there?

Thanks,
Karel

On 01/ 9/13 09:47 PM, rocon...@theorem.ca wrote:

Thanks for the advice; However, it had little effect.

I now have the errors:

===--- 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/GHC/PrimopWrappers.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/GHC/PrimopWrappers.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
/usr/bin/ld: error:
libraries/ghc-prim/dist-install/build/cbits/longlong.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/longlong.o
/usr/bin/ld: error: libraries/ghc-prim/dist-install/build/cbits/popcnt.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/popcnt.o
make[1]: ***
[libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o] Error 1

Anyone else building GHC on a pi?

On Tue, 8 Jan 2013, Thijs Alkemade wrote:



Op 8 jan. 2013, om 05:16 heeft rocon...@theorem.ca het volgende
geschreven:


On Thu, 3 Jan 2013, Thijs Alkemade wrote:


I believe I had the same problem, which disappeared after upgrading
llvm from 3.0 to 3.1, and using that instead for ./configure.

Hope this helps,
Thijs


Thanks, using LLVM 3.1 seems to have improved the siutation, but I'm
running into a new error.

Here is the error I get when trying to build GHC 7.6.1 from 7.4.1

===--- 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/cjjbits/debug.o
/usr/bin/ld: error:
libraries/ghc-prim/dist-install/build/cbits/longlong.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/longlong.o
/usr/bin/ld: error:
libraries/ghc-prim/dist-install/build/cbits/popcnt.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/popcnt.o
make[1]: ***
[libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o] Error 1

I get similar errors when building GHC 7.4.1 (patched with
http://hackage.haskell.org/trac/ghc/attachment/ticket/5914/0001-add-support-for-ARM-hard-float-ABI-fixes-5914.patch).


Any of you encountered this problem before?



Yeah, I had a lot of these. The problem was that GHC has a lot of
different "CFLAGS",
so finding the right way to pass "-float-abi=hard" to every one of
them took some time, but
eventually I ended up with the following change to mk/build.mk:

ifeq "$(BuildFlavour)" "quick"

SRC_HC_OPTS = -H64m -O0 -fasm
GhcStage1HcOpts = -O -fasm
GhcStage2HcOpts = -O0 -fasm
GhcLibHcOpts = -O -fasm -optlc-float-abi=hard
SplitObjs = NO
HADDOCK_DOCS = NO
BUILD_DOCBOOK_HTML = NO
BUILD_DOCBOOK_PS = NO
BUILD_DOCBOOK_PDF = NO

endif

(Change the build flavor you are using, of course)

And I ran configure as:

LDFLAGS="-marm -mfloat-abi=hard -mfpu=vfp" CFLAGS="-marm
-mfloat-abi=hard -mfpu=vfp" ./configure --with-opt=/usr/bin/opt-3.1
--with-ll

Re: Error building ghc on raspberry pi.

2013-01-09 Thread Karel Gardas


Hi,

find ghc's generated settings file. What FPU is used there?

Thanks,
Karel

On 01/ 9/13 09:47 PM, rocon...@theorem.ca wrote:

Thanks for the advice; However, it had little effect.

I now have the errors:

===--- 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/GHC/PrimopWrappers.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/GHC/PrimopWrappers.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
/usr/bin/ld: error:
libraries/ghc-prim/dist-install/build/cbits/longlong.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/longlong.o
/usr/bin/ld: error: libraries/ghc-prim/dist-install/build/cbits/popcnt.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/popcnt.o
make[1]: ***
[libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o] Error 1

Anyone else building GHC on a pi?

On Tue, 8 Jan 2013, Thijs Alkemade wrote:



Op 8 jan. 2013, om 05:16 heeft rocon...@theorem.ca het volgende
geschreven:


On Thu, 3 Jan 2013, Thijs Alkemade wrote:


I believe I had the same problem, which disappeared after upgrading
llvm from 3.0 to 3.1, and using that instead for ./configure.

Hope this helps,
Thijs


Thanks, using LLVM 3.1 seems to have improved the siutation, but I'm
running into a new error.

Here is the error I get when trying to build GHC 7.6.1 from 7.4.1

===--- 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/cjjbits/debug.o
/usr/bin/ld: error:
libraries/ghc-prim/dist-install/build/cbits/longlong.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/longlong.o
/usr/bin/ld: error:
libraries/ghc-prim/dist-install/build/cbits/popcnt.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/popcnt.o
make[1]: ***
[libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o] Error 1

I get similar errors when building GHC 7.4.1 (patched with
http://hackage.haskell.org/trac/ghc/attachment/ticket/5914/0001-add-support-for-ARM-hard-float-ABI-fixes-5914.patch).


Any of you encountered this problem before?



Yeah, I had a lot of these. The problem was that GHC has a lot of
different "CFLAGS",
so finding the right way to pass "-float-abi=hard" to every one of
them took some time, but
eventually I ended up with the following change to mk/build.mk:

ifeq "$(BuildFlavour)" "quick"

SRC_HC_OPTS = -H64m -O0 -fasm
GhcStage1HcOpts = -O -fasm
GhcStage2HcOpts = -O0 -fasm
GhcLibHcOpts = -O -fasm -optlc-float-abi=hard
SplitObjs = NO
HADDOCK_DOCS = NO
BUILD_DOCBOOK_HTML = NO
BUILD_DOCBOOK_PS = NO
BUILD_DOCBOOK_PDF = NO

endif

(Change the build flavor you are using, of course)

And I ran configure as:

LDFLAGS="-marm -mfloat-abi=hard -mfpu=vfp" CFLAGS="-marm
-mfloat-abi=hard -mfpu=vfp" ./configure --with-opt=/usr/bin/opt-3.1
--with-llc=/usr/bin/llc-3.1 --with-ld=`which ld.gold`

(I switched to the gold linker, because ld was running out of RAM often.)

I did eventually finish building stage2, but the final executable
segfaulted on start.
I haven't investigated much why that happened, the days it takes to
rebuild it just
made me give up.

Hope this helps,
Thijs





___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-09 Thread roconnor

Thanks for the advice;  However, it had little effect.

I now have the errors:

===--- 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/GHC/PrimopWrappers.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/GHC/PrimopWrappers.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
/usr/bin/ld: error: libraries/ghc-prim/dist-install/build/cbits/longlong.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/longlong.o
/usr/bin/ld: error: libraries/ghc-prim/dist-install/build/cbits/popcnt.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/popcnt.o
make[1]: *** [libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o] Error 
1

Anyone else building GHC on a pi?

On Tue, 8 Jan 2013, Thijs Alkemade wrote:



Op 8 jan. 2013, om 05:16 heeft rocon...@theorem.ca het volgende geschreven:


On Thu, 3 Jan 2013, Thijs Alkemade wrote:


I believe I had the same problem, which disappeared after upgrading llvm from 
3.0 to 3.1, and using that instead for ./configure.

Hope this helps,
Thijs


Thanks, using LLVM 3.1 seems to have improved the siutation, but I'm running 
into a new error.

Here is the error I get when trying to build GHC 7.6.1 from 7.4.1

===--- 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/cjjbits/debug.o
/usr/bin/ld: error: libraries/ghc-prim/dist-install/build/cbits/longlong.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/longlong.o
/usr/bin/ld: error: libraries/ghc-prim/dist-install/build/cbits/popcnt.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/popcnt.o
make[1]: *** [libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o] Error 
1

I get similar errors when building GHC 7.4.1 (patched with 
http://hackage.haskell.org/trac/ghc/attachment/ticket/5914/0001-add-support-for-ARM-hard-float-ABI-fixes-5914.patch).

Any of you encountered this problem before?



Yeah, I had a lot of these. The problem was that GHC has a lot of different 
"CFLAGS",
so finding the right way to pass "-float-abi=hard" to every one of them took 
some time, but
eventually I ended up with the following change to mk/build.mk:

ifeq "$(BuildFlavour)" "quick"

SRC_HC_OPTS= -H64m -O0 -fasm
GhcStage1HcOpts= -O -fasm
GhcStage2HcOpts= -O0 -fasm
GhcLibHcOpts   = -O -fasm -optlc-float-abi=hard
SplitObjs  = NO
HADDOCK_DOCS   = NO
BUILD_DOCBOOK_HTML = NO
BUILD_DOCBOOK_PS   = NO
BUILD_DOCBOOK_PDF  = NO

endif

(Change the build flavor you are using, of course)

And I ran configure as:

LDFLAGS="-marm -mfloat-abi=hard -mfpu=vfp" CFLAGS="-marm -mfloat-abi=hard 
-mfpu=vfp" ./configure --with-opt=/usr/bin/opt-3.1 --with-llc=/usr/bin/llc-3.1 
--with-ld=`which ld.gold`

(I switched to the gold linker, because ld was running out of RAM often.)

I did eventually finish building stage2, but the final executable segfaulted on 
start.
I haven't investigated much why that happened, the days it takes to rebuild it 
just
made me give up.

Hope this helps,
Thijs


--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-08 Thread Thijs Alkemade

Op 8 jan. 2013, om 05:16 heeft rocon...@theorem.ca het volgende geschreven:

> On Thu, 3 Jan 2013, Thijs Alkemade wrote:
> 
>> I believe I had the same problem, which disappeared after upgrading llvm 
>> from 3.0 to 3.1, and using that instead for ./configure.
>> 
>> Hope this helps,
>> Thijs
> 
> Thanks, using LLVM 3.1 seems to have improved the siutation, but I'm running 
> into a new error.
> 
> Here is the error I get when trying to build GHC 7.6.1 from 7.4.1
> 
> ===--- 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
> /usr/bin/ld: error: libraries/ghc-prim/dist-install/build/cbits/longlong.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/longlong.o
> /usr/bin/ld: error: libraries/ghc-prim/dist-install/build/cbits/popcnt.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/popcnt.o
> make[1]: *** [libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o] 
> Error 1
> 
> I get similar errors when building GHC 7.4.1 (patched with 
> http://hackage.haskell.org/trac/ghc/attachment/ticket/5914/0001-add-support-for-ARM-hard-float-ABI-fixes-5914.patch).
> 
> Any of you encountered this problem before?
> 

Yeah, I had a lot of these. The problem was that GHC has a lot of different 
"CFLAGS",
so finding the right way to pass "-float-abi=hard" to every one of them took 
some time, but
eventually I ended up with the following change to mk/build.mk:

ifeq "$(BuildFlavour)" "quick"

SRC_HC_OPTS= -H64m -O0 -fasm
GhcStage1HcOpts= -O -fasm
GhcStage2HcOpts= -O0 -fasm
GhcLibHcOpts   = -O -fasm -optlc-float-abi=hard
SplitObjs  = NO
HADDOCK_DOCS   = NO
BUILD_DOCBOOK_HTML = NO
BUILD_DOCBOOK_PS   = NO
BUILD_DOCBOOK_PDF  = NO

endif

(Change the build flavor you are using, of course)

And I ran configure as:

LDFLAGS="-marm -mfloat-abi=hard -mfpu=vfp" CFLAGS="-marm -mfloat-abi=hard 
-mfpu=vfp" ./configure --with-opt=/usr/bin/opt-3.1 --with-llc=/usr/bin/llc-3.1 
--with-ld=`which ld.gold`

(I switched to the gold linker, because ld was running out of RAM often.)

I did eventually finish building stage2, but the final executable segfaulted on 
start.
I haven't investigated much why that happened, the days it takes to rebuild it 
just
made me give up.

Hope this helps,
Thijs
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-07 Thread roconnor

On Thu, 3 Jan 2013, Thijs Alkemade wrote:


I believe I had the same problem, which disappeared after upgrading llvm from 
3.0 to 3.1, and using that instead for ./configure.

Hope this helps,
Thijs


Thanks, using LLVM 3.1 seems to have improved the siutation, but I'm 
running into a new error.


Here is the error I get when trying to build GHC 7.6.1 from 7.4.1

===--- 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
/usr/bin/ld: error: libraries/ghc-prim/dist-install/build/cbits/longlong.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/longlong.o
/usr/bin/ld: error: libraries/ghc-prim/dist-install/build/cbits/popcnt.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/popcnt.o
make[1]: *** [libraries/ghc-prim/dist-install/build/HSghc-prim-0.3.0.0.o] Error 
1

I get similar errors when building GHC 7.4.1 (patched with 
http://hackage.haskell.org/trac/ghc/attachment/ticket/5914/0001-add-support-for-ARM-hard-float-ABI-fixes-5914.patch).


Any of you encountered this problem before?

--
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.''


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-03 Thread Ben Gamari
rocon...@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


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-03 Thread Thijs Alkemade
(Sorry, forgot to CC the list)


 Original Message 
From: Thijs Alkemade 
Sent: Thu Jan 03 10:31:50 CET 2013
To: rocon...@theorem.ca
Subject: Re: Error building ghc on raspberry pi.

rocon...@theorem.ca wrote:

>Some further information it seems that llc is segfaulting:
>
>pi@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
>'@ghczmprim_GHCziTypes_Czh_info'
>Segmentation fault
>pi@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
> msp430   - MSP430 [experimental]
> ppc32- PowerPC 32
> ppc64- PowerPC 64
> ptx32- PTX (32-bit) [Experimental]
> ptx64- PTX (64-bit) [Experimental]
> sparc- Sparc
> sparcv9  - Sparc V9
> systemz  - SystemZ
> thumb- Thumb
> x86  - 32-bit X86: Pentium-Pro and above
> x86-64   - 64-bit X86: EM64T and AMD64
> xcore- XCore
>
>On Wed, 2 Jan 2013, rocon...@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 
>> '@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.)
>>
>>

I believe I had the same problem, which disappeared after upgrading llvm from 
3.0 to 3.1, and using that instead for ./configure.

Hope this helps,
Thijs

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-02 Thread roconnor

Some further information it seems that llc is segfaulting:

pi@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 
'@ghczmprim_GHCziTypes_Czh_info'
Segmentation fault
pi@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
msp430   - MSP430 [experimental]
ppc32- PowerPC 32
ppc64- PowerPC 64
ptx32- PTX (32-bit) [Experimental]
ptx64- PTX (64-bit) [Experimental]
sparc- Sparc
sparcv9  - Sparc V9
systemz  - SystemZ
thumb- Thumb
x86  - 32-bit X86: Pentium-Pro and above
x86-64   - 64-bit X86: EM64T and AMD64
xcore- XCore

On Wed, 2 Jan 2013, rocon...@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 
'@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  
``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@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-02 Thread roconnor

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,   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
'@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  
``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@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users




--
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.''

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error building ghc on raspberry pi.

2013-01-02 Thread Jeremy Shaw
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,   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
> '@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  
> ``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@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Error building ghc on raspberry pi.

2013-01-02 Thread roconnor
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 
'@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  
``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@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users