From 514e08bf98f37826fffda05a0f1a6e7f05273a85 Mon Sep 17 00:00:00 2001 From: rrt Date: Wed, 10 Jan 2001 11:50:43 +0000 Subject: [PATCH] [project @ 2001-01-10 11:50:43 by rrt] Improved Windows installation instructions, thanks to a test drive by Andrew Tolmach. --- ghc/docs/users_guide/installing.sgml | 188 ++++++++-------------------------- 1 file changed, 41 insertions(+), 147 deletions(-) diff --git a/ghc/docs/users_guide/installing.sgml b/ghc/docs/users_guide/installing.sgml index 930ae81..758dc26 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,15 +570,14 @@ Here's how to install Cygwin. -Install Cygwin 1.1 from sources.redhat.com. If you -have an earlier version, you must deinstall this first. Choose DOS text -mode. After installation, start up a Cygwin shell and issue the following -commands: +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: -mount -f c: / -mount c:\\cygwin\\usr\\include /usr/include +mount -f c: / assuming you installed Cygwin at C:\cygwin; otherwise change the drive and directory as appropriate. @@ -590,19 +586,8 @@ change the drive and directory as appropriate. -Create the following directories (if they aren't already there; substitute -the drive you installed Cygwin on for c:): - - - -c:/Temp -c:/etc -c:/bin -c:/usr/local/bin - - - -(using mkdir -p /bin, etc.) +Create C:/Temp if it doesn't already exist; substitute +the drive you installed Cygwin on for C:). @@ -634,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 @@ -656,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. @@ -675,11 +660,9 @@ The following environment variables must be set: PATH System -Add c:/bin and c:/usr/local/bin. -These should 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). @@ -687,7 +670,7 @@ your .bashrc rather than in the system-wide SHELL User -c:/bin/sh. +C:/usr/bin/bash. @@ -695,7 +678,8 @@ your .bashrc rather than in the system-wide 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. @@ -706,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 @@ -715,13 +699,13 @@ this you get very weird messages when you type `make', such a TMPDIR User -Set to c:/tmp. 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. @@ -742,32 +726,19 @@ 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, 15M: ghc-4.08 InstallShield installer, 15M: http @@ -786,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. @@ -807,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 @@ -819,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! @@ -848,29 +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 bin/bash.exe) to -/bin/sh.exe. - - -All being well, ghc should then start to function. - - - - - - - - - I'm having trouble with symlinks. @@ -889,7 +835,7 @@ work with symlinks. -I'm getting ``permission denied'' messages from rm or +I'm getting &ldquote;permission denied&rdquote; messages from rm or mv. @@ -920,73 +866,21 @@ unfortunately. Anyway, better to install 4.08 binaries and use those. - + -- 1.7.10.4