Needed: A repeatable process for installing GHC on Windows

Hi, 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? Johan

On Fri, 14 Jan 2011 23:53:33 +0100, Johan Tibell
Hi,
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?
Johan
A Google search lead to: http://neilmitchell.blogspot.com/2010/12/installing-haskell-network-library-... Regards, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html --

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?
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? Thanks, Neil

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@.. 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)? 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;-) 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?

I've managed to set up a working MinGW/MSYS environment, build the network package, and document the steps here: http://blog.johantibell.com/2011/01/setting-up-haskell-development.html Johan

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@.. 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?
participants (5)
-
Claus Reinke
-
Henk-Jan van Tuyl
-
Johan Tibell
-
Neil Mitchell
-
Simon Marlow