Changes between Version 22 and Version 23 of Building/Preparation/Windows


Ignore:
Timestamp:
Nov 18, 2011 9:39:01 AM (4 years ago)
Author:
dterei
Comment:

Update windows build instructions

Legend:

Unmodified
Added
Removed
Modified
  • Building/Preparation/Windows

    v22 v23  
    11= Setting up a Windows system for building GHC = 
    22 
    3 Installing the following will get you a working build environment with MSYS (alternatively, [wiki:Building/Windows/Cygwin install Cygwin]).  For your convenience we've cached a working set of build tools that you can download.  Note: we recommend not installing anything in a directory that contains spaces. 
     3Installing the following will get you a working build environment with MSYS. The instructions are current for GHC 7.2. An alternatively method for windows is to build GHC, [wiki:Building/Windows/Cygwin using Cygwin]).  Using MSYS is the preferred approach though. 
    44 
    5  * First install a recent stable version of [http://www.haskell.org/ghc/download.html GHC]. 
     51. We don't recommend installing anything into a directory path that contains spaces. 
    66 
    7  * Install MSYS:  
    8    * [http://www.haskell.org/ghc/tools/Win32/MSYS-1.0.11.exe] (originally from http://sourceforge.net/projects/mingw/files/ under "MSYS Base System") 
    9    * [http://www.haskell.org/ghc/tools/Win32/msysDTK-1.0.1.exe] (originally from http://sourceforge.net/projects/mingw/files/ under "MSYS Supplementary Tools") 
    10    * [http://www.haskell.org/ghc/tools/Win32/msysCORE-1.0.11-bin.tar.gz] (originally from http://sourceforge.net/projects/mingw/files/ under "MSYS Base System") (this is a tar file, which you have to unpack in `c:/msys/1.0`, or wherever you installed MSYS.  Note that you can't do that using an MSYS shell, because you can't overwrite the files in use, so make a copy of `c:/msys/1.0`, unpack it there, and then rename the copy back to `c:/msys/1.0`). 
     72. You will need to install the following tools: 
    118 
    12  * Install [http://www.python.org/download/releases/ Python] (version 2.6.2 is a good choice.  2.6.1 causes a problem with the test suite, and we don't support 3.x at this time). 
     9 * [http://hackage.haskell.org/platform/ Haskell Platform] 
     10 * [http://git-scm.com/ Git] 
     11 * [http://python.org/ Python] (Version 2.7 is a good choice, we don't support version 3.x at this time) 
    1312 
    14 The next three are just zip files, you can unpack them wherever you like, but you need to ensure that the programs can be found on your `PATH`.  I usually put all these in `c:/tools` (NB. don't put them anywhere in `c:/msys`, that's special). 
     133. You will need to install the MinGW and MSYS tools: 
    1514 
    16  * Install Happy: [http://www.haskell.org/ghc/tools/Win32/happy-1.17.zip] 
    17  * Install Alex: [http://www.haskell.org/ghc/tools/Win32/alex-2.2.zip] 
    18  * Install Git: [http://git-scm.com/] 
     15 * [http://www.mingw.org/ MinGW with MSYS] 
    1916 
    20 Now set your `PATH`.  We recommend doing this by creating a file `.profile` in your home directory (by default `c:/msys/1.0/home/<username>`).  The contents of your `.profile` should be something like this: 
     17MinGW provides a windows version of GCC while MSYS provides a minimal UNIX environment (e.g bash, make... ect). The website for MinGW is a little confusing, go to the [http://www.mingw.org/wiki/Getting_Started getting started] page and follow the download instructions for the 'mingw-get-inst' installer. This is an easy to use single executable for installing both MinGW and MSYS, make sure when you run it that you select to install MSYS and the MSYS Dev Kit. 
     18 
     194. Launch the shell by starting the 'MinGW Shell' which should be in your start menu. 
     20 
     215. Set your `PATH`.  We recommend doing this by creating a file `.profile` in your home directory (by default `c:/MinGW/msys/1.0/home/<username>`).  The contents of your `.profile` should be something like this: 
    2122 
    2223{{{ 
    23 PATH=/c/mingw/bin:/c/ghc/ghc-6.10.1/bin:/usr/bin:/bin:/c/tools:/c/Python26:/c/windows/system32 
     24# Add Git and Python to path 
     25export PATH=${PATH}:/c/Git/bin:/c/Python27 
    2426}}} 
    2527 
    26 Modify the above according to where you installed things, and change the GHC version appropriately. 
     28Modify the above according to where you installed Git and Python. The Haskell platform installer should have already done the work needed to make GHC available on the path. 
    2729 
    28 === Disable realtime virus-scanning for your build === 
     306. You should now have a working environment for getting the source for GHC and building it! 
     31 
     32== Disable realtime virus-scanning for your build == 
    2933 
    3034Realtime virus scanners are prone to causing weird build failures, typically "permission denied" errors that go away when the build is restarted.  The best way to avoid these problems is to exclude the directory containing your GHC build from realtime virus scanning, if your scanner supports excluding particular directories.  You probably also want to exclude directories in which temporary files are stored, which by default is `C:/Users/<user>/Local Settings/Temp` on Windows Vista and later, `C:/Documents and Settings/<user>/Local Settings/Temp` on Windows XP and older, or `C:/Temp`. 
    3135 
    32 === Building documentation on Windows === 
     36== Building documentation on Windows == 
    3337 
    3438Building GHC's documentation is optional, but in order to build it in Windows you must currently use Cygwin (there isn't a working !DocBook toolchain on MSYS as far as we know). 
    3539 
    36 In the Cygwin installer, just install the complete {{{Doc}}} category. You 
    37 may have to help {{{configure}}} a little bit: Set the 
    38 environment variables {{{XmllintCmd}}} and 
    39 {{{XsltprocCmd}}} to the paths of the Cygwin executables 
    40 {{{xmllint}}} and {{{xsltproc}}}, 
    41 respectively, and set {{{fp_cv_dir_docbook_xsl}}} to the path 
    42 of the directory where the XSL stylesheets are installed, 
    43 e.g. {{{c:/cygwin/usr/share/docbook-xsl}}}.     
     40In the Cygwin installer, just install the complete {{{Doc}}} category. You may have to help {{{configure}}} a little bit: Set the environment variables {{{XmllintCmd}}} and {{{XsltprocCmd}}} to the paths of the Cygwin executables {{{xmllint}}} and {{{xsltproc}}}, respectively, and set {{{fp_cv_dir_docbook_xsl}}} to the path of the directory where the XSL stylesheets are installed, e.g. {{{c:/cygwin/usr/share/docbook-xsl}}}.     
    4441 
    45 If you want to build HTML Help, you have to install the 
    46 [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/hworiHTMLHelpStartPage.asp HTML Help SDK], 
    47 too, and make sure that {{{hhc}}} is in your {{{PATH}}}. 
     42If you want to build HTML Help, you have to install the [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/hworiHTMLHelpStartPage.asp HTML Help SDK], tool, and make sure that {{{hhc}}} is in your {{{PATH}}}.