[Haskell-cafe] Needed: A repeatable process for installing GHC on Windows

Simon Marlow marlowsd at gmail.com
Sun Jan 16 23:08:58 CET 2011


On 15/01/11 15:26, Claus Reinke wrote:
>>>> Earlier today I was trying to set up a Windows build bot for the
>>>> 'network' package. That turned out to be quite difficult. Too much
>>>> playing with PATHs, different gcc versions, etc. Does anyone have a
>>>> repeatable, step-by-step process to install GHC and get a build
>>>> environment (where I could build network) going?
>
> If you don't need to build GHC yourself, then the binary installers
> (or daily snapshot builds) should come with their own copy of GCC tools.
> So you only need some shell/autoconf environment on top
> (either cygwin or MSYS). Fewer things to go wrong than in the past,
> but cygwin's configure scripts tend to think they're on unix, and
> for MSYS, it can be difficult to get the right pieces together.
>
> Snapshots should appear as installers and tar-balls here:
>
> http://www.haskell.org/ghc/download#snapshots
>
> but windows build failures tend to go unnoticed for a while,
> so you might have to send a heads-up to cvs-ghc at .. if you need up to
> date builds.
>
>> No, but I used to (and sadly can't find it any more). I used to have a
>> script called ghcsetup which built GHC on Windows, and importantly
>> validated the setup was correct (the right gcc was first in the path
>> etc) and took actions to correct it.
>>
>> I am sure there used to be a great web page on the GHC wiki, saying
>> the exact steps to build (written by Claus), but I can't find it any
>> more. Perhaps Claus knows where it has gone?
>
> Yes, I ran into this so often that I made a record of the "build
> your own GHC" steps one time, together with a cygwin package
> description that recorded the cygwin packages needed for such
> builds. Both cygwin and GHC have moved since then, and I guess
> someone decided it was too much trouble to keep the step-by-step
> guide up to date, or perhaps it was no longer needed (check with GHC HQ
> to be sure)?

Yes, a while back I swept out all the old Windows build instructions 
from the wiki and replaced them with a simplified tested process.  I 
think we can now simplify it even further - we can use the Haskell 
Platform rather than installing Happy & Alex separately, and MSYS looks 
like it might be easier to install these days too.

> If you do need to build your own GHC head, the GHC wiki building guide
> has a page on
> "Setting up a Windows system for building GHC"
> http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/Windows
>
> which not only claims to list suitable MSYS versions, but holds
> copies (so you don't have to hunt for the MSYS packages), as well
> as links to other necessary tools (python, alex, happy, darcs). What
> I do not know is whether the versions are still up to date (check
> with GHC HQ).
>
> As usual, if the wiki page instructions are not working anymore,
> please add a note, and include any improvements you figure out;-)

By all means add a note, but also send us an email - we'll probably miss 
a wiki edit otherwise.

Cheers,
	Simon


> Claus
>
> PS. GHC no longer uses buildbot, it has its own builder, so if
> you really want to set up a build bot, you can probably copy
> GHC HQ's setup for the purpose?




More information about the Haskell-Cafe mailing list