Changes between Version 4 and Version 5 of Building/Windows/Cygwin


Ignore:
Timestamp:
Nov 18, 2011 10:23:41 AM (2 years ago)
Author:
dterei
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Building/Windows/Cygwin

    v4 v5  
    1717   {{{ghc-depends}}} package, which is kept at [http://haskell.org/ghc/cygwin]. When the Cygwin installer asks you to "Choose a Download Site", choose one of the offered mirror sites; and then type "http://haskell.org/ghc/cygwin" into the "User URL" box and click "Add"; now two sites are selected. (The Cygwin installer remembers this for next time.) Click "Next". In the "Select Packages" dialogue box that follows, click the "+" sign by "Devel", scroll down to the end of the "Devel" packages, and choose {{{ghc-depends}}}. 
    1818 
    19 Now set the following user environment variables: 
     193. Now set the following user environment variables: 
    2020 * Add {{{c:/cygwin/bin}}} and {{{c:/cygwin/usr/bin}}} to your {{{PATH}}} 
    21  * Make sure the MinGW `gcc` and `ld` are in your `PATH` before the Cygwin `gcc` (hopefully this requirement will go away at some point; see #2966) 
    22  * Set {{{MAKE_MODE}}} to {{{UNIX}}}. If you 
    23    don't do this you get very weird messages when you type 
    24    {{{make}}}, such as: 
     21 * Set {{{MAKE_MODE}}} to {{{UNIX}}}. If you don't do this you get very weird messages when you type {{{make}}}, such as: 
    2522   {{{ 
    2623/c: /c: No such file or directory 
    2724}}} 
    28  * Set {{{SHELL}}} to 
    29    {{{c:/cygwin/bin/bash}}}. When you invoke a shell in Emacs, this 
    30    {{{SHELL}}} is what you get. 
    31  * Set {{{HOME}}} to point to your  
    32    home directory.  This is where, for example, 
    33    {{{bash}}} will look for your {{{.bashrc}}} 
    34    file.  Ditto {{{emacs}}} looking for {{{.emacsrc}}} 
     25 * Set {{{SHELL}}} to {{{c:/cygwin/bin/bash}}}. When you invoke a shell in Emacs, this {{{SHELL}}} is what you get. 
     26 * Set {{{HOME}}} to point to your home directory.  This is where, for example, {{{bash}}} will look for your {{{.bashrc}}} file. Ditto {{{emacs}}} looking for {{{.emacsrc}}} 
    3527 
    3628Here are some things to be aware of when using Cygwin: 
    3729 
    38  * Cygwin implements a symbolic link as a text file with some 
    39    magical text in it.  So other programs that don't use Cygwin's 
    40    I/O libraries won't recognise such files as symlinks.   
    41    In particular, programs compiled by GHC are meant to be runnable 
    42    without having Cygwin, so they don't use the Cygwin library, so 
    43    they don't recognise symlinks. 
    44  * Some script files used in the make system start with "{{{#!/bin/perl}}}", 
    45    (and similarly for {{{sh}}}).  Notice the hardwired path! 
    46    So you need to ensure that your {{{/bin}}} directory has at least 
    47    {{{sh}}}, {{{perl}}}, and {{{cat}}} in it. 
    48    All these come in Cygwin's {{{bin}}} directory, which you probably have 
    49    installed as {{{c:/cygwin/bin}}}.  By default Cygwin mounts "{{{/}}}" as 
    50    {{{c:/cygwin}}}, so if you just take the defaults it'll all work ok. 
    51    (You can discover where your Cygwin 
    52    root directory {{{/}}} is by typing {{{mount}}}.) 
    53    Provided {{{/bin}}} points to the Cygwin {{{bin}}} 
    54    directory, there's no need to copy anything.  If not, copy these binaries from the {{{cygwin/bin}}} 
    55    directory (after fixing the {{{sh.exe}}} stuff mentioned in the previous bullet). 
     30 * Cygwin implements a symbolic link as a text file with some magical text in it.  So other programs that don't use Cygwin's I/O libraries won't recognise such files as symlinks. In particular, programs compiled by GHC are meant to be runnable without having Cygwin, so they don't use the Cygwin library, so they don't recognise symlinks. 
     31 
     32 * Some script files used in the make system start with "{{{#!/bin/perl}}}", (and similarly for {{{sh}}}).  Notice the hardwired path! So you need to ensure that your {{{/bin}}} directory has at least {{{sh}}}, {{{perl}}}, and {{{cat}}} in it. All these come in Cygwin's {{{bin}}} directory, which you probably have installed as {{{c:/cygwin/bin}}}.  By default Cygwin mounts "{{{/}}}" as {{{c:/cygwin}}}, so if you just take the defaults it'll all work ok. (You can discover where your Cygwin root directory {{{/}}} is by typing {{{mount}}}.) Provided {{{/bin}}} points to the Cygwin {{{bin}}} directory, there's no need to copy anything.  If not, copy these binaries from the {{{cygwin/bin}}} directory (after fixing the {{{sh.exe}}} stuff mentioned in the previous bullet).