Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-11 Thread Yves Parès
So is this possible now to have a desktop PC compile your program using
template haskell into llvm bytecode and then run it on ARM?
If not, is it definitely impossible (as I said, I don't know much about
llvm) or is it yet to be done?

Le 10 avril 2012 19:03, Joey Hess j...@kitenet.net a écrit :

 Joachim Breitner wrote:
  Most of these architectures do not have a native code generator (so they
  are compiled via C) and are unregisterized, i.e. GHC knows nothing about
  their registers. Both cause a performance penalty; I don’t know numbers.
  I assume this is what Joey refers to. But maybe also that ARM machines
  tend to be slower :-)

 Both of course. The rare times I need to build a fairly big haskell
 program like git-annex on arm, it can easily take an hour or so with -O0.

 BTW, the other problem with Haskell on arm is that AFAIK there is no
 ghci, and so also no Template Haskell, and so if you're writing Real
 World utilities that you want to be maximally portable, this means you
 have to avoid using an increasing number of libraries. This rules Yesod
 right out; I've avoided using lenses as I'd have to write much manual
 boilerplate, etc.

 --
 see shy jo

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-10 Thread Karel Gardas

On 04/ 9/12 01:03 AM, Francesco Mazzoli wrote:

No, it is not possible to build GHC without GHC. Building GHC on ARM is
going to be extremely tricky (I'm not sure anyone has ever done it).


It's not that tricky at the end. Just install LLVM 3.0 and some OS 
supplied unregisterised GHC. Grab 7.4.1. sources and attempt to compile. 
This should produce even registerised build for you as a result of 
project initiated last summer by Stephen Blackheath. If you are curious 
about its history read some posts on http://ghcarm.wordpress.com/


Cheers,
Karel

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-10 Thread Karel Gardas

On 04/ 9/12 10:35 AM, Graham Klyne wrote:

It ships with Debian, along with the full Haskell Platform built for ARM
and lots of other libraries. Other than speed, it's fine.


Hmmm... I wonder if it will squeeze onto a Raspberry Pi :)


It should, if not report a bug since I regularly test on ARMv7 (even GHC 
buildbot is using ARMv7) (side note: GHC HEAD currently broken), but 
Raspberry Pi provides just Broadcom BCM2835 which should be ARM1176JZFS, 
i.e. ARMv5. But rest assured, ARMv5 should be supported by GHC...


Karel

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-10 Thread Francesco Mazzoli

On 10/04/12 07:28, Karel Gardas wrote:

On 04/ 9/12 01:03 AM, Francesco Mazzoli wrote:

No, it is not possible to build GHC without GHC. Building GHC on ARM is
going to be extremely tricky (I'm not sure anyone has ever done it).


It's not that tricky at the end. Just install LLVM 3.0 and some OS
supplied unregisterised GHC. Grab 7.4.1. sources and attempt to compile.
This should produce even registerised build for you as a result of
project initiated last summer by Stephen Blackheath. If you are curious
about its history read some posts on http://ghcarm.wordpress.com/

Cheers,
Karel


Oh, I didn't notice that 7.4.1 shipped with this! Great stuff.

Francesco.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-10 Thread Yves Parès
 Other than speed, it's fine.

Do we know what speed issues are due to?

Plus, I believed some had used GHC for smartphones?

Le 9 avril 2012 01:45, Joey Hess j...@kitenet.net a écrit :

 Thomas DuBuisson wrote:
  On Sun, Apr 8, 2012 at 4:03 PM, Francesco Mazzoli f...@mazzo.li wrote:
   No, it is not possible to build GHC without GHC. Building GHC on ARM is
   going to be extremely tricky (I'm not sure anyone has ever done it).
 
  I used to use an unregistered build of GHC built by someone in the
  Debian community - it worked well enough.

 It ships with Debian, along with the full Haskell Platform built for ARM
 and lots of other libraries. Other than speed, it's fine.

 --
 see shy jo

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-10 Thread Joachim Breitner
Hi,

Am Dienstag, den 10.04.2012, 11:00 +0200 schrieb Yves Parès:
 Plus, I believed some had used GHC for smartphones? 

do you refer to
http://www.joachim-breitner.de/blog/archives/300-Xmonad-on-my-mobile-phone.html
or something more serious?

Greetings,
Joachim

-- 
Joachim nomeata Breitner
  m...@joachim-breitner.de  |  nome...@debian.org  |  GPG: 0x4743206C
  xmpp: nome...@joachim-breitner.de | http://www.joachim-breitner.de/



signature.asc
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-10 Thread Yves Parès
For instance, yes.
I think I had seen some times on this mailing list or on blog posts (
http://ghcarm.wordpress.com/) people having used GHC on ARM platform.
I distinctly remember having seen on the mailing list that cross-compiling
wasn't working but that we now can compile with GHC on ARM, which means GHC
can be compiled for ARM.

Le 10 avril 2012 12:27, Joachim Breitner m...@joachim-breitner.de a écrit
:

 Hi,

 Am Dienstag, den 10.04.2012, 11:00 +0200 schrieb Yves Parès:
  Plus, I believed some had used GHC for smartphones?

 do you refer to

 http://www.joachim-breitner.de/blog/archives/300-Xmonad-on-my-mobile-phone.html
 or something more serious?

 Greetings,
 Joachim

 --
 Joachim nomeata Breitner
  m...@joachim-breitner.de  |  nome...@debian.org  |  GPG: 0x4743206C
  xmpp: nome...@joachim-breitner.de | http://www.joachim-breitner.de/


 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-10 Thread Joachim Breitner
Hi,

Am Dienstag, den 10.04.2012, 12:36 +0200 schrieb Yves Parès:
 For instance, yes.
 I think I had seen some times on this mailing list or on blog posts
 (http://ghcarm.wordpress.com/) people having used GHC on ARM platform.
 I distinctly remember having seen on the mailing list that
 cross-compiling wasn't working but that we now can compile with GHC on
 ARM, which means GHC can be compiled for ARM.

I’m not sure what the news are here: Debian has provided ghc6 on arm at
least since Debian etch in 2006 (GHC 6.6), and the first Debian release
with ghc6 (Debian sarge) ships it on alpha hppa i386 ia64 m68k powerpc
s390 and sparc (GHC 6.2). All these are not cross-compiled, but natively
compiled on the repective architecture, and I don’t think it is easily
possible to cross-compile GHC itself even today. (All data from
http://archive.debian.net/)

Greetings,
Joachim



-- 
Joachim nomeata Breitner
  m...@joachim-breitner.de  |  nome...@debian.org  |  GPG: 0x4743206C
  xmpp: nome...@joachim-breitner.de | http://www.joachim-breitner.de/



signature.asc
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-10 Thread Yves Parès
 All these are not cross-compiled, but natively
 compiled on the repective architecture, and I don’t think it is easily
 possible to cross-compile GHC itself even today.

So how did they get compiled the first time? How do you get a GHC working
on *or* for an ARM platform if you don't use Debian?
And why was Joey Hess talking about performance issues?
(I'll be eventually interested, as Graham Klyne suggested earlier, in
compiling for Raspberry Pi, if the hardware suits).


Le 10 avril 2012 12:49, Joachim Breitner m...@joachim-breitner.de a écrit
:

 Hi,

 Am Dienstag, den 10.04.2012, 12:36 +0200 schrieb Yves Parès:
  For instance, yes.
  I think I had seen some times on this mailing list or on blog posts
  (http://ghcarm.wordpress.com/) people having used GHC on ARM platform.
  I distinctly remember having seen on the mailing list that
  cross-compiling wasn't working but that we now can compile with GHC on
  ARM, which means GHC can be compiled for ARM.

 I’m not sure what the news are here: Debian has provided ghc6 on arm at
 least since Debian etch in 2006 (GHC 6.6), and the first Debian release
 with ghc6 (Debian sarge) ships it on alpha hppa i386 ia64 m68k powerpc
 s390 and sparc (GHC 6.2). All these are not cross-compiled, but natively
 compiled on the repective architecture, and I don’t think it is easily
 possible to cross-compile GHC itself even today. (All data from
 http://archive.debian.net/)

 Greetings,
 Joachim



 --
 Joachim nomeata Breitner
  m...@joachim-breitner.de  |  nome...@debian.org  |  GPG: 0x4743206C
  xmpp: nome...@joachim-breitner.de | http://www.joachim-breitner.de/


 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-10 Thread Joachim Breitner
Hi,

Am Dienstag, den 10.04.2012, 13:04 +0200 schrieb Yves Parès:
  All these are not cross-compiled, but natively
  compiled on the repective architecture, and I don’t think it is
 easily
  possible to cross-compile GHC itself even today. 
 
 So how did they get compiled the first time? How do you get a GHC
 working on or for an ARM platform if you don't use Debian?
 And why was Joey Hess talking about performance issues?
 (I'll be eventually interested, as Graham Klyne suggested earlier, in
 compiling for Raspberry Pi, if the hardware suits).

well, GHC was more portable in version 6.8 and before (this is not
cross-compiling, at least not really:
http://hackage.haskell.org/trac/ghc/wiki/Building/Porting

When I ported GHC to s390x half a year ago, I think I started with
porting 6.8 and then kept building the next released version with the
previous. It would be great, though, if porting current versions
directly would become possible again.

Most of these architectures do not have a native code generator (so they
are compiled via C) and are unregisterized, i.e. GHC knows nothing about
their registers. Both cause a performance penalty; I don’t know numbers.
I assume this is what Joey refers to. But maybe also that ARM machines
tend to be slower :-)

I’m happily running git-annex on a NSLU2 (266MHz/23MB RAM ARM NAS
device) and have done so before it was registerized, so it is definitely
a useful target for Haskell.

Greetings,
Joachim

-- 
Joachim Breitner
  e-Mail: m...@joachim-breitner.de
  Homepage: http://www.joachim-breitner.de
  Jabber-ID: nome...@joachim-breitner.de


signature.asc
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-10 Thread Yves Parès
Okay, thanks for the explanation.
But that does not completely answer the original question: now, using
branch 7 of GHC what can you do to get a haskell program compiled on/for an
ARM platform without using Debian? You have to use LLVM? So you have to
compile your program on a regular x86/x64 PC for LLVM backend and then use
that bytecode on your ARM platform, is that it? Is LLVM bytecode that
portable? I don't much about LLVM, so sorry if those questions feel a bit
dumb ;)
ghcarm speaks about the Pandaboard and LLVM in a post:
http://ghcarm.wordpress.com/2011/07/03/llvm-on-arm-testing

And thanks for the information about git-annex, I'm checking that out, it
looks interesting ;)
Actually, bottomline I would be interested in running a web app (preferably
using Yesod) on a Raspberry Pi (or similar, but more expensive), but this
use case is cool too.

Le 10 avril 2012 13:13, Joachim Breitner m...@joachim-breitner.de a écrit
:

 Hi,

 Am Dienstag, den 10.04.2012, 13:04 +0200 schrieb Yves Parès:
   All these are not cross-compiled, but natively
   compiled on the repective architecture, and I don’t think it is
  easily
   possible to cross-compile GHC itself even today.
 
  So how did they get compiled the first time? How do you get a GHC
  working on or for an ARM platform if you don't use Debian?
  And why was Joey Hess talking about performance issues?
  (I'll be eventually interested, as Graham Klyne suggested earlier, in
  compiling for Raspberry Pi, if the hardware suits).

 well, GHC was more portable in version 6.8 and before (this is not
 cross-compiling, at least not really:
 http://hackage.haskell.org/trac/ghc/wiki/Building/Porting

 When I ported GHC to s390x half a year ago, I think I started with
 porting 6.8 and then kept building the next released version with the
 previous. It would be great, though, if porting current versions
 directly would become possible again.

 Most of these architectures do not have a native code generator (so they
 are compiled via C) and are unregisterized, i.e. GHC knows nothing about
 their registers. Both cause a performance penalty; I don’t know numbers.
 I assume this is what Joey refers to. But maybe also that ARM machines
 tend to be slower :-)

 I’m happily running git-annex on a NSLU2 (266MHz/23MB RAM ARM NAS
 device) and have done so before it was registerized, so it is definitely
 a useful target for Haskell.

 Greetings,
 Joachim

 --
 Joachim Breitner
  e-Mail: m...@joachim-breitner.de
  Homepage: http://www.joachim-breitner.de
  Jabber-ID: nome...@joachim-breitner.de

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-10 Thread Joey Hess
Joachim Breitner wrote:
 Most of these architectures do not have a native code generator (so they
 are compiled via C) and are unregisterized, i.e. GHC knows nothing about
 their registers. Both cause a performance penalty; I don’t know numbers.
 I assume this is what Joey refers to. But maybe also that ARM machines
 tend to be slower :-)

Both of course. The rare times I need to build a fairly big haskell
program like git-annex on arm, it can easily take an hour or so with -O0.

BTW, the other problem with Haskell on arm is that AFAIK there is no
ghci, and so also no Template Haskell, and so if you're writing Real
World utilities that you want to be maximally portable, this means you
have to avoid using an increasing number of libraries. This rules Yesod
right out; I've avoided using lenses as I'd have to write much manual
boilerplate, etc.

-- 
see shy jo


signature.asc
Description: Digital signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-10 Thread Karel Gardas

On 04/10/12 07:03 PM, Joey Hess wrote:

BTW, the other problem with Haskell on arm is that AFAIK there is no
ghci, and so also no Template Haskell, and so if you're writing Real
World utilities that you want to be maximally portable, this means you
have to avoid using an increasing number of libraries. This rules Yesod
right out; I've avoided using lenses as I'd have to write much manual
boilerplate, etc.


Ben Gamari already submitted his ARM/Linker support so GHCi is already 
kind of working, i.e. is built but at least on my setup still fails on 
majority of tests so there are still some outstanding issues probably. 
Anyway, things are moving forward...


Karel

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-09 Thread Graham Klyne

On 09/04/2012 00:45, Joey Hess wrote:

Thomas DuBuisson wrote:

On Sun, Apr 8, 2012 at 4:03 PM, Francesco Mazzolif...@mazzo.li  wrote:

No, it is not possible to build GHC without GHC. Building GHC on ARM is
going to be extremely tricky (I'm not sure anyone has ever done it).


I used to use an unregistered build of GHC built by someone in the
Debian community - it worked well enough.


It ships with Debian, along with the full Haskell Platform built for ARM
and lots of other libraries. Other than speed, it's fine.


Hmmm... I wonder if it will squeeze onto a Raspberry Pi :)

#g
--


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] building ghc on arch linux ARM?

2012-04-08 Thread .
Hi Cafe,
I hope this is the right place to ask this kind of stuff.
I would like to try ghc on a panda board (armv7l) with arch linux.
There is apparently no pre-built package, so I was trying the
instructions to build, from here:
http://hackage.haskell.org/trac/ghc/wiki/Building/Porting.

However, I still seem to need a ghc and ghc-pkg installed: I am getting
this error message:

checking for tar... /bin/tar
checking for gpatch... no
checking for patch... /usr/bin/patch
checking for dtrace... no
checking for HsColour... no
checking for xmllint... no
configure: WARNING: cannot find xmllint in your PATH, you will not be
able to validate your documentation
checking for xsltproc... no
configure: WARNING: cannot find xsltproc in your PATH, you will not be
able to build the HTML documentation
checking for dblatex... no
configure: WARNING: cannot find dblatex in your PATH, you will not be
able to build the PDF and PS documentation
checking for ghc-pkg matching ... configure: error: Cannot find matching
ghc-pkg

-

Does anyone know if it is possible to build ghc without ghc on this
platform?
I was using the tarball sources for ghc 7.4.1.


Thanks,
Christian



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-08 Thread Francesco Mazzoli
No, it is not possible to build GHC without GHC. Building GHC on ARM is 
going to be extremely tricky (I'm not sure anyone has ever done it).


What you should be able to do easily with the next release is 
cross-compile to ARM through the LLVM backend.


Francesco.

On 08/04/12 23:28, . wrote:

Hi Cafe,
I hope this is the right place to ask this kind of stuff.
I would like to try ghc on a panda board (armv7l) with arch linux.
There is apparently no pre-built package, so I was trying the
instructions to build, from here:
http://hackage.haskell.org/trac/ghc/wiki/Building/Porting.

However, I still seem to need a ghc and ghc-pkg installed: I am getting
this error message:

checking for tar... /bin/tar
checking for gpatch... no
checking for patch... /usr/bin/patch
checking for dtrace... no
checking for HsColour... no
checking for xmllint... no
configure: WARNING: cannot find xmllint in your PATH, you will not be
able to validate your documentation
checking for xsltproc... no
configure: WARNING: cannot find xsltproc in your PATH, you will not be
able to build the HTML documentation
checking for dblatex... no
configure: WARNING: cannot find dblatex in your PATH, you will not be
able to build the PDF and PS documentation
checking for ghc-pkg matching ... configure: error: Cannot find matching
ghc-pkg

-

Does anyone know if it is possible to build ghc without ghc on this
platform?
I was using the tarball sources for ghc 7.4.1.


Thanks,
Christian



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-08 Thread Thomas DuBuisson
On Sun, Apr 8, 2012 at 4:03 PM, Francesco Mazzoli f...@mazzo.li wrote:
 No, it is not possible to build GHC without GHC. Building GHC on ARM is
 going to be extremely tricky (I'm not sure anyone has ever done it).

I used to use an unregistered build of GHC built by someone in the
Debian community - it worked well enough.

Cheers,
Thomas


 What you should be able to do easily with the next release is cross-compile
 to ARM through the LLVM backend.

 Francesco.


 On 08/04/12 23:28, . wrote:

 Hi Cafe,
 I hope this is the right place to ask this kind of stuff.
 I would like to try ghc on a panda board (armv7l) with arch linux.
 There is apparently no pre-built package, so I was trying the
 instructions to build, from here:
 http://hackage.haskell.org/trac/ghc/wiki/Building/Porting.

 However, I still seem to need a ghc and ghc-pkg installed: I am getting
 this error message:
 
 checking for tar... /bin/tar
 checking for gpatch... no
 checking for patch... /usr/bin/patch
 checking for dtrace... no
 checking for HsColour... no
 checking for xmllint... no
 configure: WARNING: cannot find xmllint in your PATH, you will not be
 able to validate your documentation
 checking for xsltproc... no
 configure: WARNING: cannot find xsltproc in your PATH, you will not be
 able to build the HTML documentation
 checking for dblatex... no
 configure: WARNING: cannot find dblatex in your PATH, you will not be
 able to build the PDF and PS documentation
 checking for ghc-pkg matching ... configure: error: Cannot find matching
 ghc-pkg

 -

 Does anyone know if it is possible to build ghc without ghc on this
 platform?
 I was using the tarball sources for ghc 7.4.1.


 Thanks,
 Christian



 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe



 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] building ghc on arch linux ARM?

2012-04-08 Thread Joey Hess
Thomas DuBuisson wrote:
 On Sun, Apr 8, 2012 at 4:03 PM, Francesco Mazzoli f...@mazzo.li wrote:
  No, it is not possible to build GHC without GHC. Building GHC on ARM is
  going to be extremely tricky (I'm not sure anyone has ever done it).
 
 I used to use an unregistered build of GHC built by someone in the
 Debian community - it worked well enough.

It ships with Debian, along with the full Haskell Platform built for ARM
and lots of other libraries. Other than speed, it's fine.

-- 
see shy jo


signature.asc
Description: Digital signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe