From: Simon Marlow Date: Wed, 1 Apr 2009 10:34:18 +0000 (+0000) Subject: Remove the "Installing GHC" section X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=0390f0a7c9c217ca17ccd40f4c85c010ba9886d3 Remove the "Installing GHC" section 1. it was out of date in various ways 2. this is not the place people look for installation instructions 3. we have installation instructions elsewhere (e.g. the INSTALL file in a binary distribution) 4. the section "layout of installed files" is now on the wiki under Building/Installing. --- diff --git a/docs/users_guide/installing.xml b/docs/users_guide/installing.xml deleted file mode 100644 index 36213ad..0000000 --- a/docs/users_guide/installing.xml +++ /dev/null @@ -1,532 +0,0 @@ - - - Installing GHC -binary installations -installation, of binaries - - -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 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.) - - -This guide is in several parts: - - - - Installing on Unix-a-likes (). - - - Installing on Windows (). - - - The layout of installed files (). You don't need to know this to - install GHC, but it's useful if you are changing the - implementation. - - - - Installing on Unix-a-likes - - - When a platform-specific package is available - - Most common OSes provide GHC binaries packaged - using the native package format for the platform. This is - likely to be by far the best way to install GHC for your - platform if one of these packages is available, since - dependencies will automatically be handled and the package - system normally provides a way to uninstall the package at a - later date. - - Check the distribution packages page to see if there is a package available for your platform. - - - -GHC binary distributions - - -bundles of binary stuff - - - -Binary distributions come in “bundles,” called -ghc-version-platform.tar.bz2. (See the building guide for the definition of a platform.) Suppose that you untar a binary-distribution bundle, thus: - - - - -% cd /your/scratch/space -% bunzip2 < ghc-version-platform.tar.bz2 | tar xvf - - - - -Then you should find the bundle contents inside a single directory, -ghc-version. - - - -Installing - - -OK, so let's assume that you have unpacked your chosen bundles. What -next? Well, you will first need to -configureconfigure -the bundle by -changing to the bundle's top-level directory -and typing ./configure. That should convert -Makefile-vars.in to Makefile-vars. - - - -The configure script takes a number of flags. The most -commonly used is the ---prefix=/path/to/install/in -flag, which tells the bundle that you want it to be installed in -/path/to/install/in rather than the default -location (/usr/local). -To see all the flags that configure accepts, run -configure --help. - - - -Then do the following: - - - - - - - - -Run make install. This -should work with ordinary Unix -make—no need for fancy stuff like GNU -make. - - - - - -If appropriate, add the bin directory to your PATH, as instructed. - - - - - -You may need to run rehash (t?csh or zsh users), in -order for your shell to see the new stuff in your bin directory. - - - - - - Once done, test your “installation” as suggested in -. Be sure to use a -v -option, so you can see exactly what pathnames it's using. -If things don't work as expected, check the list of known pitfalls in -the building guide. - - - - - - - - - -link, installed as ghc -When installing the user-invokable binaries, this installation -procedure will install GHC as ghc-x.xx where x.xx is the version -number of GHC. It will also make a link (in the binary installation -directory) from ghc to ghc-x.xx. If you install multiple versions -of GHC then the last one “wins”, and “ghc” will invoke the last -one installed. You can change this manually if you want. But -regardless, ghc-x.xx should always invoke GHC version x.xx. - - - - - - -Testing that GHC seems to be working - - - -testing a new GHC - - - -The way to do this is, of course, to compile and run this program -(in a file Main.hs): - - - - - -main = putStr "Hello, world!\n" - - - - - -Compile the program, using the -v (verbose) flag to verify that -libraries, etc., are being found properly: - - -% ghc -v -o hello Main.hs - - - - -Now run it: - - -% ./hello -Hello, world! - - - -For more information on how to “drive” GHC, read -on... - - - - - - - - -Installing on Windows - - -Getting the Glasgow Haskell Compiler (post 5.02) to run on Windows platforms is -a snap: the installer does everything you need. - - -Installing GHC on Windows - - -To install GHC, use the following steps: - - -Download the installer -from the -GHC download page. - - -Run the installer. -On Windows, all of GHC's files are installed in a single directory. -You can override it, but by default this directory is -c:/ghc/ghc-version. -The executable binary for GHC will be installed in the -bin/ sub-directory of the installation directory. -If you want to invoke GHC from a command line, add this -to your $PATH environment variable. - - -When installation is complete, you should find GHCi and the GHC -documentation are available in your Start menu under -"Start/All Programs/GHC/ghc-version". - - - - -GHC needs a directory in which to create, and later delete, temporary files. -It uses the standard Windows procedure GetTempPath() to -find a suitable directory. This procedure returns: - -The path in the environment variable TMP, -if TMP is set. -Otherwise, the path in the environment variable TEMP, -if TEMP is set. -Otherwise, there is a per-user default which varies -between versions of Windows. On NT and XP-ish versions, it might -be: -c:\Documents and Settings\<username>\Local Settings\Temp. - - -The main point is that if you don't do anything GHC will work fine, -but if you want to control where the directory is, you can do so by -setting TMP or TEMP. - - - - -To test the fruits of your labour, try now to compile a simple -Haskell program: - - - -bash$ cat main.hs -module Main(main) where - -main = putStrLn "Hello, world!" -bash$ ghc -o main main.hs -.. -bash$ ./main -Hello, world! -bash$ - - - - -You do not need the Cygwin toolchain, or anything -else, to install and run GHC. - - -An installation of GHC requires about 365M of disk space. -To run GHC comfortably, your machine should have at least -64M of memory. - - - -Moving GHC around - -Once GHC is installed, you can freely move the entire GHC tree just by copying -the c:/ghc/ghc-version -directory. (You will need to fix up -the links in "Start/All Programs/GHC/ghc-version" -if you do this.) - - -It is OK to put GHC tree in a directory whose path involves spaces. However, -don't do this if you use want to use GHC with the Cygwin tools, -because Cygwin can get confused when this happens. -We haven't quite got to the bottom of this, but so far as we know it's not -a problem with GHC itself. Nevertheless, just to keep life simple we usually -put GHC in a place with a space-free path. - - - - -Installing ghc-win32 FAQ - - - - I'm having trouble with symlinks. - - Symlinks only work under Cygwin (), - so binaries not linked to the Cygwin - DLL, in particular those built for Mingwin, will not work with - symlinks. - - - - - I'm getting “permission denied” messages from the - rm or mv. - - This can have various causes: trying to rename a directory - when an Explorer window is open on it tends to fail. Closing the - window generally cures the problem, but sometimes its cause is - more mysterious, and logging off and back on or rebooting may be - the quickest cure. - - - - - - - - -The layout of installed files - - -This section describes what files get installed where. You don't need to know it -if you are simply installing GHC, but it is vital information if you are changing -the implementation. - - GHC is installed in two directory trees: - - -Library directory, - known as $(libdir), holds all the -support files needed to run GHC. On Unix, this -directory is usually something like /usr/lib/ghc/ghc-5.02. - - - -Binary directory - known as $(bindir), holds executables that -the user is expected to invoke. -Notably, it contains -ghc and ghci. On Unix, this directory -can be anywhere, but is typically something like /usr/local/bin. On Windows, -however, this directory must be $(libdir)/bin. - - - - - - -When GHC runs, it must know where its library directory is. -It finds this out in one of two ways: - - - - -$(libdir) is passed to GHC using the flag. -On Unix (but not Windows), the installed ghc is just a one-line -shell script that invokes the real GHC, passing a suitable flag. -[All the user-supplied flags -follow, and a later flag overrides an earlier one, so a user-supplied -one wins.] - - - - On Windows (but not Unix), if no flag is given, GHC uses a system -call to find the directory in which the running GHC executable lives, and derives -$(libdir) from that. [Unix lacks such a system call.] -That is why $(bindir) must be $(libdir)/bin. - - - - - The binary directory - -The binary directory, $(bindir), contains user-visible -executables, notably ghc and ghci. -You should add it to your $PATH. - - -On Unix, the user-invokable ghc invokes $(libdir)/ghc-version, -passing a suitable flag to tell ghc-version where -$(libdir) is. -Similarly ghci, except the extra flag --interactive is passed. - - -On Win32, the user-invokable ghc binary -is the Real Thing (no intervening -shell scripts or .bat files). -Reason: we sometimes invoke GHC with very long command lines, -and cmd.exe (which executes .bat files) -truncates them. Similarly ghci is a C wrapper program that invokes ghc --interactive -(passing on all other arguments), not a .bat file. - - - - - - The library directory - -The layout of the library directory, $(libdir), -is almost identical on -Windows and Unix, as follows. Differences between Windows and Unix -are annotated [Win32 only] and are commented below. - - - $(libdir)/ - package.conf GHC package configuration - ghc-usage.txt Message displayed by ghc ––help - ghci-usage.txt Message displayed by ghci ––help - - bin/ [Win32 only] User-visible binaries - ghc.exe - ghci.exe - - unlit Remove literate markup - - touchy.exe [Win32 only] - perl.exe [Win32 only] - gcc.exe [Win32 only] - - ghc-x.xx GHC executable [Unix only] - - ghc-split Asm code splitter - ghc-asm Asm code mangler - - gcc-lib/ [Win32 only] Support files for gcc - specs gcc configuration - - cpp0.exe gcc support binaries - as.exe - ld.exe - - crt0.o Standard - ..etc.. binaries - - libmingw32.a Standard - ..etc.. libraries - - *.h Include files - - hslibs-imports/ GHC interface files for the... - ghc/*.hi ...'ghc' library - - include/ C header files - StgMacros.h GHC-specific - ..etc.. header files - - mingw/*.h [Win32 only] Mingwin header files - - lib/ GHC's library - base-2.1 - ..etc.. - - libHSrts*.a GHC RTS archive - libHSghc.a GHC package archive - - HSrts.o GHC RTS linkable, used by ghci - HSghc.o GHC package linkable, used by ghci - - -Note that: - - - - $(libdir) also contains support - binaries. These are not expected to be - on the user's PATH, but are invoked - directly by GHC. In the Makefile system, this directory is - also called $(libexecdir), but - you are not free to change it. It must - be the same as $(libdir). - - - -We distribute gcc with the Win32 distribution of GHC, so that users -don't need to install gcc, nor need to care about which version it is. -All gcc's support files are kept in $(libdir)/gcc-lib/. - - - - -Similarly, we distribute perl and a touch -replacement (touchy.exe) -with the Win32 distribution of GHC. - - - - The support programs ghc-split - and ghc-asm are Perl scripts. The - first line says #!/usr/bin/perl; on Unix, the - script is indeed invoked as a shell script, which invokes - Perl; on Windows, GHC invokes - $(libdir)/perl.exe directly, which - treats the #!/usr/bin/perl as a comment. - Reason: on Windows we want to invoke the Perl distributed - with GHC, rather than assume some installed one. - - - - - - - - - - - diff --git a/docs/users_guide/ug-book.xml.in b/docs/users_guide/ug-book.xml.in index c44f07f..8c1e1b1 100644 --- a/docs/users_guide/ug-book.xml.in +++ b/docs/users_guide/ug-book.xml.in @@ -9,7 +9,6 @@ &license; &intro; -&installing; &ghci; &runghc; &using; diff --git a/docs/users_guide/ug-ent.xml b/docs/users_guide/ug-ent.xml index d0903ff..02ea31b 100644 --- a/docs/users_guide/ug-ent.xml +++ b/docs/users_guide/ug-ent.xml @@ -4,7 +4,6 @@ -