X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdocs%2Fusers_guide%2Finstalling.sgml;h=7040cade646fa7073a7c217645bd9243c136d919;hb=7b5a612ecf91668374b22db0da002e92040b4f97;hp=3a99821698eceb7f9791b91036648a3fa13e2e1f;hpb=0221fd81257a71943e2d059ad4b58a6c18ffa4fe;p=ghc-hetmet.git diff --git a/ghc/docs/users_guide/installing.sgml b/ghc/docs/users_guide/installing.sgml index 3a99821..7040cad 100644 --- a/ghc/docs/users_guide/installing.sgml +++ b/ghc/docs/users_guide/installing.sgml @@ -5,13 +5,12 @@ Installing from binary distributions is easiest, and recommended! -(Why binaries? Because GHC is a Haskell compiler written in Haskell, -so you've got to “bootstrap” it, somehow. We provide +(Why binaries? Because GHC is a Haskell compiler written in Haskell, +so you've got to bootstrap it somehow. We provide machine-generated C-files-from-Haskell for this purpose, but it's really quite a pain to use them. If you must build GHC from its sources, using a binary-distributed GHC to do so is a sensible way to -proceed. For the other fptools programs, many are written in Haskell, -so binary distributions allow you to install them without having a Haskell compiler.) +proceed. For the other fptools programs, many are written in Haskell, so binary distributions allow you to install them without having a Haskell compiler.) This guide is in two parts: installing on Unix-a-likes, and installing on Windows. @@ -508,14 +507,13 @@ with a binary distribution, or in source form in Getting the Glasgow Haskell Compiler (GHC) to run on Windows platforms can be a bit of a trying experience. This document tries to simplify the task by enumerating the steps you need to follow in order to set up and configure -your machine to run GHC (at least that's the intention ;-) +your machine to run GHC. System requirements -An installation of GHC requires ca. 200M of disk space, which is split -roughly 50-50 between GHC and the supporting software. To run GHC +An installation of GHC requires about 50M of disk space (which can be lowered by choosing a “compact” installation). The Cygwin support tools take another 200M or so (though if you really need to this can be halved by installing only the following packages: bash, binutils, cygwin, diff, fileutils, findutils, gcc, grep, make, perl, mingw, sed, textutils, w32api; however, it's fiddly and not recommended). To run GHC comfortably, your machine should have at least 64M of memory. @@ -528,14 +526,13 @@ comfortably, your machine should have at least 64M of memory. You need two chunks of software other than GHC itself: the Cygwin toolchain, and Perl. Here's how to get and install them. -The cygwin toolchain (1.1) +The Cygwin toolchain (1.1.x) -GHC depends at the moment on the cygwin tools to operate, which -dresses up the Win32 environment into something more UNIX-like. -(notably, it provides gcc, as and ld), -so you'll need to install these tools first. You also need -Cygwin to use CVS. (We don't yet support later versions of Cygwin.) +At the moment you'll need Cygwin to use GHC. Cygwin dresses up the Win32 +environment into something more UNIX-like; (notably, it provides +gcc, as and ld). +You also need Cygwin to use CVS. @@ -573,38 +570,24 @@ Here's how to install Cygwin. -Install Cygwin 1.1 from -sources.redhat.com -Install this somewhere locally. Despite the warnings, things seem to work better if you install Cygwin into the root directory rather than cygwin, which is the default. If you're upgrading from Cygwin B20.1, running mount --import-old-mounts immediately after installation may help. Either way, you want to end up with your main drive mounted in textmode, and only the bin directories mounted in binmode. - - - - - -Create the following directories (if they aren't already there; substitute the drive you installed Cygwin on for c:): - +Install the latest Cygwin 1.1.x from sources.redhat.com/cygwin. +If you have a pre-1.1 version, you should deinstall this first. Choose DOS +text mode. After installation, start up a Cygwin shell and issue the +following command: - -c:/etc -c:/bin -c:/usr/local/bin - + +mount -f c: / - -(using mkdir -p /bin, etc.) +assuming you installed Cygwin at C:\cygwin; otherwise +change the drive and directory as appropriate. -Copy bash.exe from the bin -directory of the cygwin tree -(cygwin/bin/bash.exe) to -/bin as sh.exe. You might -think that it was easier to use bash directly from it original Cygwin -directory, but (a) some UNIX utils have got -/bin/sh hardwired in, and (b) the path following -#! is limited to 32 characters. +Create C:/Temp if it doesn't already exist; substitute +the drive you installed Cygwin on for C:). @@ -636,7 +619,7 @@ variable (for example), do the following: Press Environment Variables Under System Variables, select PATH Press Edit -Add ";C:/whatever/" to the end of the string (for example) +Add ";C:\whatever" to the end of the string (for example) Press OK @@ -658,7 +641,7 @@ it invokes cvs.exe without going via bash. On a Win9x machine you need to edit autoexec.bat using -Windows/system/Sysedit. You must reboot to make +Windows/System/Sysedit. You must reboot to make the new settings take effect. @@ -677,14 +660,9 @@ The following environment variables must be set: PATH System -Add C:/cygnus/cygwin-b20/H-i586-cygwin32/bin. -bash needs this, and when it is invoked from -/bin it can't find it. c:/bin and -c:/usr/local/bin should also be added. These should all -come before the Windows system directories (e.g. -WINNT\system32). You might want to set them in your -.bashrc rather than in the system-wide -PATH. +Add C:\usr\bin. +This should come before the Windows system directories +(e.g. \WINNT\system32). @@ -692,7 +670,7 @@ come before the Windows system directories (e.g. SHELL User -c:/bin/sh. +C:/usr/bin/bash. @@ -700,7 +678,8 @@ come before the Windows system directories (e.g. HOME User -Set to point to your home directory. This is where, for example, +Set to point to your home directory (normally under +C:/WINNT/Profiles on Win2k). This is where, for example, bash will look for your .bashrc file. @@ -711,7 +690,7 @@ file. User Set to UNIX. If you don't do -this you get very weird messages when you type `make', such as: +this you get very weird messages when you type make, such as: /c: /c: No such file or directory @@ -720,13 +699,13 @@ this you get very weird messages when you type `make', such a TMPDIR User -Set to c:/tmp (note the forward slash). For some reason, Win2k invisibly sets this variable to point to a temporary directory in your profile, that contains embedded spaces. If GHC sees the TMPDIR variable set, it tries to use it for temporary files, but Cygwin doesn't grok filenames with spaces, so disaster results. +Set to C:/Temp. For some reason, Win2k invisibly sets this variable to point to a temporary directory in your profile, that contains embedded spaces. If GHC sees the TMPDIR variable set, it tries to use it for temporary files, but Cygwin doesn't grok filenames with spaces, so disaster results. Furthermore, it seems that TMPDIR must be set to a directory in the same file system in which you invoke GHC. Otherwise you get very weird messages when you invoke GHC, such as: does not exist Action: openFile -Reason: file does not exist /tmp/ghc11068.cpp +Reason: file does not exist /Temp/ghc11068.cpp We think this is due to a bug in Cygwin. @@ -747,38 +726,26 @@ environment variables. Known culprits from the past include - -Perl5 - - -The driver script is written in Perl, so you'll need to have this -installed too. However, the ghc binary distribution includes a -perl binary for you to make use of, should you not already have a -cygwin compatible one. Note: GHC does not -work with the ActiveState port of perl. - - - - Installing GHC -Download a GHC distribution: +Download the latest GHC distribution: -ghc-4.08—InstallShield installer, 20M: http +ghc-4.08 InstallShield installer, 15M: http -(The version number may change.) It is packaged up using an installer that should be familiar-looking to Windows users. +It is packaged up using an installer that should be familiar-looking to +Windows users. @@ -790,11 +757,9 @@ in /Program Files/!) When the installer has completed, make sure you add the location of the -ghc bin/ directory to your path (i.e. -/path/to/wherever/ghc-4.08/bin ). -You need to do this in order to bring the various GHC DLLs into scope; -if not, then you need to copy the DLLs into a directory that is (the -system directory, for example). +ghc bin/ directory to your path (e.g. +/ghc/ghc-4.08/bin ). +You need to do this in order to bring the various GHC binaries into scope. @@ -811,7 +776,7 @@ before continuing—the installer will not currently do this. Make sure that you set all the environment variables described above -under Cygwin installation, including TMPDIR +under Cygwin installation, including TMPDIR. To test the fruits of your labour, try now to compile a simple @@ -823,7 +788,7 @@ bash$ cat main.hs module Main(main) where main = putStrLn "Hello, world!" -bash$ /path/to/the/ghc/bin/directory/ghc-4.08 -o main main.hs +bash$ ghc -o main main.hs .. bash$ ./main Hello, world! @@ -852,30 +817,6 @@ manual. -Invoking ghc doesn't seem to do anything, it immediately returns without having compiled the input file. - - - - - -One cause of this is that /bin/sh is missing. To verify, open up a -bash session and type ls -l /bin/sh.exe. If sh.exe is -reported as not being there, copy bash.exe (which you'll find -inside the cygwin installation tree as H-i586-cygwin32/bin/bash.exe) -to /bin/sh.exe. - - - -All being well, ghc should then start to function. - - - - - - - - - I'm having trouble with symlinks. @@ -894,23 +835,7 @@ work with symlinks. -I'm having trouble with . - - - - - -Static linking is no longer supported under Windows, and probably won't work. - - - - - - - - - -I'm getting ``permission denied'' messages from rm or +I'm getting “permission denied” messages from rm or mv. @@ -941,73 +866,21 @@ unfortunately. Anyway, better to install 4.08 binaries and use those. - + @@ -1054,9 +927,12 @@ just make a symlink from It's a good idea to use Norman Walsh's installation -notes as a guide. You should get version -3.1 of DocBook, and note that his file test.sgm won't -work, as it needs version 3.0. You should unpack Jade into \Jade, along with the entities, DocBook into \docbook, and the DocBook stylesheets into \docbook\stylesheets (so they actually end up in \docbook\stylesheets\docbook). +notes as a guide. You should get version 3.1 of DocBook, and note +that his file test.sgm won't work, as it needs version +3.0. You should unpack Jade into \Jade, along with the +entities, DocBook into \docbook, and the DocBook +stylesheets into \docbook\stylesheets (so they actually +end up in \docbook\stylesheets\docbook).