From 85311082c808db940a88bcf897c54c88121986f7 Mon Sep 17 00:00:00 2001 From: rrt Date: Fri, 20 Apr 2001 15:20:34 +0000 Subject: [PATCH] [project @ 2001-04-20 15:20:34 by rrt] Drastically simplify the Windows installation instructions, now that we don't need Cygwin. --- ghc/docs/users_guide/installing.sgml | 264 +++------------------------------- 1 file changed, 16 insertions(+), 248 deletions(-) diff --git a/ghc/docs/users_guide/installing.sgml b/ghc/docs/users_guide/installing.sgml index 5267e20..ab60299 100644 --- a/ghc/docs/users_guide/installing.sgml +++ b/ghc/docs/users_guide/installing.sgml @@ -520,251 +520,31 @@ on... 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. - - -System requirements - - -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, and if you're trying to -build rather than just use GHC, you need many more, so you might as well -install the lot). To run GHC -comfortably, your machine should have at least 64M of memory. - - - - - -Software required - - -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.x) - - -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. - - - -Important grungy information about Cygwin: - - - - - - -Cygwin doesn't deal well with filenames that include -spaces. "Program Files" and "Local files" are -common gotchas. - - - - - -Cygwin implements a symbolic link as a text file with some -magical text in it. So 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. - - - - - - -Here's how to install Cygwin. - - - - - - -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 file type. - - - - - -Create C:/Temp if it doesn't already exist; substitute -the drive you installed Cygwin on for C:. - - - - - -If you're an Emacs user and want to be able to run bash -from within a shell buffer, see the NT Emacs home page for -instructions on how to set this up. - - - - - - - - -Environment variables - - -In case you don't already know how to set environment variables on a Windows -machine, here's how. On WinNT/Win2k, to edit your PATH -variable (for example), do the following: - - - -Press Start/Settings/Control Panels -Double-click System -Press Advanced -Press Environment Variables -Under System Variables, select PATH -Press Edit -Add ";C:\whatever" to the end of the string (for example) -Press OK - - - -Some environment variables are “user variables” and -some are “system variables”. I'm not sure of the difference -but both are changed though the same dialogue. - - - -In addition, when running bash -you can set environment variables in your .bashrc file. -But it is better to set your environment variables from the -control panel (they get inherited by bash) because then they are visible -to applications that aren't started by bash. For example, -when you're invoking CVS (and ssh) via Emacs keybindings; -it invokes cvs.exe without going via bash. +be a bit of a trying experience. It should be much easier now than in the +past, since all the software required to build and use GHC is included in +the InstallShield. -On a Win9x machine you need to edit autoexec.bat using -Windows/System/Sysedit. You must reboot to make -the new settings take effect. +An installation of GHC requires about 70M of disk space (which can be +reduced by choosing a “compact” installation). +To run GHC comfortably, your machine should have at least +64M of memory. - -The following environment variables must be set: - - - - - - - - - - -PATH -System - -Add C:\usr\bin. -This should come before the Windows system directories -(e.g. \WINNT\system32). - - - - -SHELL -User - -C:/usr/bin/bash. - - - - -HOME -User - -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. - - - - -MAKE_MODE -User - -Set to UNIX. If you don't do -this you get very weird messages when you type make, such as: - -/c: /c: No such file or directory - - - -TMPDIR -User - -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 /Temp/ghc11068.cpp -We think this is due to a bug in Cygwin. - - - - - - - - - -In addition, we've had problems in the past with certain environment -variables being set that seem to have bad effects on GHC. If you have -installed other systems ported from Unix, you might too. If you get weird -inexplicable failures to build GHC, then it might be worth weeding out unused -environment variables. Known culprits from the past include -GCC_EXEC_PREFIX and INCLUDE. - - - - - - Installing GHC -Download the latest GHC distribution: - - - - - -ghc-4.08 InstallShield installer, 15M: http - - - - It is packaged up using an installer that should be familiar-looking to Windows users. -Note: The cygwin support for long file names containing +Note: The Cygwin support for long file names containing spaces is not 100%, so make sure that you install ghc in a directory that has no embedded spaces (i.e., resist the temptation to put it in /Program Files/!) @@ -775,25 +555,11 @@ When the installer has completed, make sure you add the location of the 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. +Also, if the directory C:/TEMP doesn't already exist, +you should create it. -Note: If you haven't got perl already installed, you will have to manually -copy the perl.exe binary from the ghc -bin/ into your /bin directory -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. - - To test the fruits of your labour, try now to compile a simple Haskell program: @@ -814,12 +580,14 @@ OK, assuming that worked, you're all set. Go forth and write useful Haskell programs :-) If not, consult the installation FAQ (); if that still doesn't help then please report the problems you're experiencing (see ). - Further information on using GHC under Windows can be found in +Further information on using GHC under Windows can be found in Sigbjørn Finne's pages. Note: ignore the installation instructions, which are rather out of date; the Miscellaneous section at the bottom of the page is of most interest, covering topics beyond the scope of this -manual. +manual. + -- 1.7.10.4