
Hello, I've been trying to learn Haskell. Some software isn't user friendly. But I think that a compiler requiring itself to compile is actively user hostile. I've spent over a week trying to get GHC to work on my Solaris workstation and I've concluded that it just isn't going to happen. I tried to compile GHC but it said taht it needed GHC to compile. I read the README trying to find out what people without ghc are supposed to do to install ghc. But no instructions are found. I check the website, hoping to find a binary. I find an old binary, but it just won't work. Something about libgcc_s.so.1. After a lot of work, I got another Haskell compiler, NHC98. Hoping that would do, I tried to compile GHC again. No luck. I read something about .hc files. I look everywhere in the source distribution, but no .hc files are to be found. I go back to the website. Read the building guide section on "porting" Why would I read that? I don't want to port it, I just want to compile it on a platform it's already been ported to. The porting page says that the source distribution has ANNOUNCE files that tell me where to get the .hc files. I wonder why it didn't just tell me directly, but oh well, I go back to the source distribution. It turns out the building guide was lying. The ANNOUCE file doesn't say anything about .hc files or where to get them. I find the file distrib/hc-build. I figure I might as well try it. Nothing to lose. But nope, that didn't do it either. At this point I really wonder why the compiler was designed this way instead of doing the configure; make; make install that everyone else does. It's not often that it takes me more than a week to compile a program. At this point I decide that I'll teach people Python instead of Haskell. I don't particularly like Python, but hey, it works. Best, Daniel.

Daniel While I'm sure many understand and sympathise with your pain I wonder if you're being a little harsh. I mean <controversial> who's really using Solaris these days? </controversial> :-p ok,ok, lots of people (but will they really continue to - we dropped it from our labs long ago). Having said that, how many people don't have access to a Windoze or Linux / <platforms GHC runs on> box - very few. GHC works like a dream 'straight out of the box' on the supported platforms and the GHC team put a lot of effort in to making sure this is so!
Some software isn't user friendly. But I think that a compiler requiring itself to compile is actively user hostile.
While this might be true, having a compiler compile itself is massively important - many like to say (and I completely agree) that you are 'forced to eat your own dog food'. What better way to stress your compiler and optimiser?
At this point I decide that I'll teach people Python instead of Haskell. I don't particularly like Python, but hey, it works.
It'd really depend on the purpose for which you are 'teaching' people as to which language makes more sense... I for one am very glad that I was taught Miranda (Haskell has now replaced it here at Imperial) with it's clean functional syntax... Cheers Andy ********************************************************************* * Andrew Cheadle email: a.cheadle@doc.ic.ac.uk * * Department of Computing http://www.doc.ic.ac.uk/~amc4/ * * Imperial College * * University of London * *********************************************************************

Andrew Cheadle wrote:
:-p ok,ok, lots of people (but will they really continue to - we dropped it from our labs long ago). Having said that, how many people don't have access to a Windoze or Linux
I don't have access to Win or Linux. But that's besides the point. I think it's reasonable to expect to compile ghc on a "standard unix" system.
While this might be true, having a compiler compile itself is massively important
Having the compiler able to compile itself, yes. Making that the only way to compile it, that's another thing. Daniel.

Well Robert Dockins gave you an excellent explanation. You're just unlucky at the moment with 6.4. 6.2.2 is excellent - for various reasons I've had to stick with it for completion of some of my research.
Having the compiler able to compile itself, yes. Making that the only way to compile it, that's another thing.
The .hc files exist for this reason. However for a popular platforms this isn't usually a problem, someone does the port quite quickly. You're just particularly unlucky with 6.4 since there has been substantial reworking of the internals. Andy ********************************************************************* * Andrew Cheadle email: a.cheadle@doc.ic.ac.uk * * Department of Computing http://www.doc.ic.ac.uk/~amc4/ * * Imperial College * * University of London * *********************************************************************

Daniel Carrera wrote:
Hello,
I've been trying to learn Haskell.
Some software isn't user friendly. But I think that a compiler requiring itself to compile is actively user hostile.
Perhaps. Nonetheless it is common practice for compilers to be written in the target language and to be compiled via bootstrapping. Ever take a look at the GCC sources? You guessed it: C.
I check the website, hoping to find a binary. I find an old binary, but it just won't work. Something about libgcc_s.so.1.
The newest version of GHC (6.4) does not work on Solaris for reasons that are known but as-yet unsolved because the development team lacks a Solaris guru. Version 6.2.2 has a Solaris build available: http://www.haskell.org/ghc/download_ghc_622.html#sparcsolaris From the site: NOTE: you must use GCC 2.95 or 3.4+ on Sparc. There is a known bug with GCC versions between 3.0-3.3 which causes incorrect code to be generated. If this is the binary you found, it is possible you have an incorrect version of GCC. With some more information (version numbers would be a good start), it may be possible for some of the other Solaris users on this list to help.
At this point I really wonder why the compiler was designed this way instead of doing the configure; make; make install that everyone else does. It's not often that it takes me more than a week to compile a program.
At this point I decide that I'll teach people Python instead of Haskell. I don't particularly like Python, but hey, it works.
Your choice, of course. Robert Dockins

robert dockins addresses this to -
Daniel Carrera wrote:
Hello,
I've been trying to learn Haskell.
.......
At this point I decide that I'll teach people Python instead of Haskell. I don't particularly like Python, but hey, it works.
Your choice, of course.
I'll say more. You may buy to your kids a hamburger instead of ice cream. Your freedom, of course. But, please, don't say "instead", it has a rather limited sense... Jerzy Karczmarczuk

robert dockins wrote:
Perhaps. Nonetheless it is common practice for compilers to be written in the target language and to be compiled via bootstrapping. Ever take a look at the GCC sources? You guessed it: C.
Please don't confuse the compiler being written in the target language with the compiler requiring itself. It should be possible to compile it with a compiler for a /different/ language. You can compile gcc with Sun's CC. You should be able to compile ghc with nh98.
If this is the binary you found, it is possible you have an incorrect version of GCC.
No, that's not it. I have 2.95 $ gcc --version 2.95.3 Best, Daniel.

On 10/05/2005, at 1:03 AM, Daniel Carrera wrote:
You can compile gcc with Sun's CC. You should be able to compile ghc with nh98.
Unfortunately, GHC isn't written in standard Haskell 98: GHC's written in Haskell 98 with GHC extensions, sometimes referred to as "Glasgow Haskell". You can probably deduce that the only compiler that'll compile Glasgow Haskell is GHC. As Robert said, 6.2.2 is available as a binary from the GHC site, but GHC currently lacks a Sparc/Solaris maintainer which is why 6.4 isn't available; there's not much anyone can do about that, besides hope for a new Sparc maintainer. However, hopefully the documentation will be updated by one of the GHC hackers so that what you experienced won't happen again! -- % Andre Pang : trust.in.love.to.save http://www.algorithm.com.au/

Daniel Carrera writes:
It's not often that it takes me more than a week to compile a program.
You should have posted a short message to the list, asking whether anyone happened to have a tar.gz archive with Solaris binaries lying around that he can send you. I'm willing to bet that would have been a lot faster than trying to bootstrap the software yourself for a _week_, because the "you need GHC to compile GHC" problem virtually ceases to exist once you _have_ GHC.
At this point I decide that I'll teach people Python instead of Haskell. I don't particularly like Python, but hey, it works.
Why don't you use the NHC98 compiler you had already running? Or Hugs98, which is self-contained? I think it's a shame that your students don't get the chance to learn a purely functional language just because the GHC team doesn't have a volunteer to provide Solaris binaries. Hint, hint. ;-) Peter

On Mon, 2005-05-09 at 09:54 -0400, Daniel Carrera wrote:
Hello,
I've been trying to learn Haskell.
Some software isn't user friendly. But I think that a compiler requiring itself to compile is actively user hostile. I've spent over a week trying to get GHC to work on my Solaris workstation and I've concluded that it just isn't going to happen.
We use Solaris on our student workstations at my university. We've got version of ghc going back as far as ghc 0.29! We currently use 6.2.2.
I tried to compile GHC but it said taht it needed GHC to compile.
I read the README trying to find out what people without ghc are supposed to do to install ghc. But no instructions are found.
I check the website, hoping to find a binary. I find an old binary, but it just won't work. Something about libgcc_s.so.1.
This route is going to be your best bet. Find any binary version of ghc that works on your Solaris and then from there you've broken the GHC<->GHC dep cycle. So once you've got any binary version of GHC installed (going back as far as 4.08.x) then you can build the version you want from source. As other peole have said, you want version 6.2.2 since this is a very stable/bug-free version and it works just fine on Solaris. Another quick way to get something to teach Haskell is to just use Hugs. We've used Hugs for years for teaching students. It's only now that we're finally switching to ghc/ghci. If you do still find that you're completely stuck in getting a binary version working I'm sure you/we could persuade the IT people in my department to send you a binary snapshot (so long as it is for some educational purpose/institution). Duncan

Duncan Coutts wrote:
This route is going to be your best bet. Find any binary version of ghc that works on your Solaris and then from there you've broken the GHC<->GHC dep cycle.
Okay. Is there a version that's more likely to work than others? Or should I try them sequentially from most recent, then go backwards? Best, Daniel.

On Mon, 2005-05-09 at 12:32 -0400, Daniel Carrera wrote:
Duncan Coutts wrote:
This route is going to be your best bet. Find any binary version of ghc that works on your Solaris and then from there you've broken the GHC<->GHC dep cycle.
Okay. Is there a version that's more likely to work than others? Or should I try them sequentially from most recent, then go backwards?
I don't know of a 'best' version, so probably just try them in order. I've not actually compiled ghc on Solaris myself the IT people did that (though I have boostrapped from a binary snapshot on Sparc Linux which has most of the same issues as Sparc Solaris). Duncan

On 5/9/05, Daniel Carrera
I've been trying to learn Haskell.
Great... We are on the same boat :)
I tried to compile GHC but it said taht it needed GHC to compile.
Yes, looks like GHC is a little picky to build, to say the least (i'm working on OS X and i'm lucky, there are people interested enough to make ghc 6.4 build fine on this platform).
At this point I decide that I'll teach people Python instead of Haskell. I don't particularly like Python, but hey, it works.
Actually, i've had the same choice to do: i have to prepare a intro to functional programming course. I've discovered Haskell and find it particulary suited to my needs and tastes but when it comes to I/O i was rather afraid (monads are not so easy to understand and there's not documentation/tutorial in my natural tongue). So, i've considered Python, too (because it had comprehension lists and first order function, plus a simple print/read stance). But Python is not a pure functional langage and i know what it will happen if i use it: my students will be tempted by the procedural way. Plus, they loose the opportunity to "think different". So, i will go with Haskell. There are very good books/docs about it (i'm currently the Thomson) and, forget the monads, i will simply speak about IO and do... Have you considered Hugs98? (don't know if it works on you platform), but it's a great environment (compilation is not particularly needed to learn a language). -- Jaco
participants (8)
-
Andre Pang
-
Andrew Cheadle
-
Daniel Carrera
-
Duncan Coutts
-
Jerzy Karczmarczuk
-
Peter Simons
-
robert dockins
-
Éric Jacoboni