[project @ 2001-04-12 21:29:43 by lewie]
[ghc-hetmet.git] / ghc / docs / users_guide / installing.sgml
index 758dc26..5267e20 100644 (file)
@@ -1,25 +1,72 @@
 <Chapter id="sec-installing-bin-distrib">
-<Title>Installing from binary distributions</Title>
+  <Title>Installing GHC</Title>
 <IndexTerm><Primary>binary installations</Primary></IndexTerm>
 <IndexTerm><Primary>installation, of binaries</Primary></IndexTerm>
 
 <Para>
 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. For the other <Literal>fptools</Literal> programs, many are written in Haskell, so binary distributions allow you to install them without having a Haskell compiler.)
+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 <Literal>fptools</Literal> programs, many are written in
+Haskell, so binary distributions allow you to install them without
+having a Haskell compiler.)
 </Para>
 
 <Para>This guide is in two parts: installing on Unix-a-likes, and installing on Windows.</Para>
 
 
-<Sect1><Title>Installing on Unix-a-likes</Title>
+  <Sect1><Title>Installing on Unix-a-likes</Title>
+
+    <sect2>
+      <title>When a platform-specific package is available</title>
+      
+      <para>For certain platforms, we 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.</para>
+
+      <para>We generally provide the following packages:</para>
+
+      <variablelist>
+       <varlistentry>
+         <term>RedHat Linux/x86</term>
+         <listitem>
+           <para>RPM source & binary packages for RedHat Linux (x86
+           only) are available for most major releases.</para>
+         </listitem>
+       </varlistentry>
+
+       <varlistentry>
+         <term>Debian Linux/x86</term>
+         <listitem>
+           <para>Debian packages for Linux (x86 only), also for most
+           major releases.</para>
+         </listitem>
+       </varlistentry>
+
+       <varlistentry>
+         <term>FreeBSD/x86</term>
+         <listitem>
+           <para>On FreeBSD/x86, GHC can be installed using either
+           the ports tree (<literal>cd /usr/ports/lang/ghc && make
+           install</literal>) or from a pre-compiled package
+           available from your local FreeBSD mirror.</para>
+         </listitem>
+       </varlistentry>
+      </variablelist>
+      
+      <para>Other platform-specific packages may be available, check
+      the GHC download page for details.</para>
+    </sect2>
 
 <Sect2>
-<Title>Bundle structure</Title>
+<Title>GHC binary distributions</Title>
 
 <Para>
 <IndexTerm><Primary>bundles of binary stuff</Primary></IndexTerm>
@@ -27,7 +74,7 @@ proceed. For the other <Literal>fptools</Literal> programs, many are written in
 
 <Para>
 Binary distributions come in &ldquo;bundles,&rdquo; one bundle per file called
-<Literal>&lt;bundle&gt;-&lt;platform&gt;.tar.gz</Literal>.  (See the building guide for the definition of a platform.)  Suppose that you untar a binary-distribution bundle, thus:
+<literal><replaceable>bundle</replaceable>-<replaceable>platform</replaceable>.tar.gz</Literal>.  (See the building guide for the definition of a platform.)  Suppose that you untar a binary-distribution bundle, thus:
 </Para>
 
 <Para>
@@ -95,7 +142,7 @@ Guide and this file isn't present.
 </Para>
 </ListItem></VarListEntry>
 <VarListEntry>
-<Term><Literal>bin/&lt;platform&gt;</Literal></Term>
+           <Term><Literal>bin/<replaceable>platform</replaceable></Literal></Term>
 <ListItem>
 <Para>
 contains platform-specific executable
@@ -104,7 +151,7 @@ must end up in your path.
 </Para>
 </ListItem></VarListEntry>
 <VarListEntry>
-<Term><Literal>lib/&lt;platform&gt;/</Literal></Term>
+<Term><Literal>lib/<replaceable>platform</replaceable>/</Literal></Term>
 <ListItem>
 <Para>
 contains platform-specific support
@@ -179,41 +226,6 @@ contains Unix manual pages.
 </VariableList>
 </Para>
 
-<Para>
-This structure is designed so that you can unpack multiple bundles
-(including ones from different releases or platforms) into a single
-<Literal>fptools</Literal> directory
-<FOOTNOTE>
-
-<Para>
-this doesn't work at the
-moment
-</Para>
-
-</FOOTNOTE>
-:
-</Para>
-
-<Para>
-
-<Screen>
-% cd /your/scratch/space
-% gunzip &#60; ghc-x.xx-sun-sparc-solaris2.tar.gz | tar xvf -
-% gunzip &#60; happy-x.xx-sun-sparc-sunos4.tar.gz | tar xvf -</Screen>
-
-</Para>
-
-<Para>
-When you do multiple unpacks like this, the top level <Literal>Makefile</Literal>,
-<Literal>README</Literal>, and <Literal>INSTALL</Literal> get overwritten each time.
-That's fine&mdash;they should be the same.  Likewise, the
-<Literal>ANNOUNCE-&lt;bundle&gt;</Literal> and <Literal>NEWS-&lt;bundle&gt;</Literal>
-files will be duplicated across multiple platforms, so they will be
-harmlessly overwritten when you do multiple unpacks.  Finally, the
-<Literal>share/</Literal> stuff will get harmlessly overwritten when you do
-multiple unpacks for one bundle on different platforms.
-</Para>
-
 <Sect3 id="sec-install">
 <Title>Installing</Title>
 
@@ -379,11 +391,12 @@ regardless, <Literal>ghc-x.xx</Literal> should always invoke GHC version <Litera
 <Title>What bundles there are</Title>
 
 <Para>
-<IndexTerm><Primary>bundles, binary</Primary></IndexTerm>
-There are plenty of &ldquo;non-basic&rdquo; GHC bundles.  The files for them are
-called <Literal>ghc-x.xx-&lt;bundle&gt;-&lt;platform&gt;.tar.gz</Literal>, where
-the <Literal>&lt;platform&gt;</Literal> is as above, and <Literal>&lt;bundle&gt;</Literal> is one
-of these:
+<IndexTerm><Primary>bundles, binary</Primary></IndexTerm> There are
+plenty of &ldquo;non-basic&rdquo; GHC bundles.  The files for them are
+called
+<Literal>ghc-x.xx-<replaceable>bundle</replaceable>-<replaceable>platform</replaceable>.tar.gz</Literal>,
+where the <replaceable>platform</replaceable> is as above, and
+<replaceable>bundle</replaceable> is one of these:
 </Para>
 
 <Para>
@@ -438,6 +451,12 @@ binary bundles&mdash;basic, and profiling.  We don't usually make the
 rest, although you can build them yourself from a source distribution.
 </Para>
 
+<para>The various GHC bundles are designed to be unpacked into the
+same directory; then installing as per the directions above will
+install the whole lot in one go.  Note: you <emphasis>must</emphasis>
+at least have the basic GHC binary distribution bundle, these extra
+bundles won't install on their own.</para>
+
 </Sect3>
 
 <Sect3 id="sec-GHC-test">
@@ -487,12 +506,8 @@ Some simple-but-profitable tests are to compile and run the notorious
 distributed in <Literal>ghc/misc/examples/nfib/</Literal> in a source distribution.
 </Para>
 
-<Para>
-For more information on how to &ldquo;drive&rdquo; GHC, either do <Literal>ghc -help</Literal> or
-consult the User's Guide (distributed in several pre-compiled formats
-with a binary distribution, or in source form in
-<Literal>ghc/docs/users&lowbar;guide</Literal> in a source distribution).
-</Para>
+<para>For more information on how to &ldquo;drive&rdquo; GHC, read
+on...</para>
 
 </Sect3>
 
@@ -513,7 +528,14 @@ your machine to run GHC.
 <Sect2><Title>System requirements</Title>
 
 <Para>
-An installation of GHC requires about 50M of disk space (which can be lowered by choosing a &ldquo;compact&rdquo; 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
+An installation of GHC requires about 50M of disk space (which can be
+lowered by choosing a &ldquo;compact&rdquo; 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.
 </Para>
 
@@ -573,21 +595,14 @@ Here's how to install Cygwin.
 Install the latest Cygwin 1.1.x from <ULink
 URL="http://sources.redhat.com/cygwin/">sources.redhat.com/cygwin</ULink>.
 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:
-
-<Screen>
-mount -f c: /</Screen>
-
-assuming you installed Cygwin at <Filename>C:\cygwin</Filename>; otherwise
-change the drive and directory as appropriate.
+text file type.
 </Para>
 </ListItem>
 
 <ListItem>
 <Para>
 Create <Filename>C:/Temp</Filename> if it doesn't already exist; substitute
-the drive you installed Cygwin on for <Filename>C:</Filename>).
+the drive you installed Cygwin on for <Filename>C:</Filename>.
 </Para>
 </ListItem>
 
@@ -835,7 +850,7 @@ work with symlinks.
 
 <Question>
 <Para>
-I'm getting &ldquote;permission denied&rdquote; messages from <Command>rm</Command> or
+I'm getting &ldquo;permission denied&rdquo; messages from <Command>rm</Command> or
 <Command>mv</Command>.
 </Para>
 </Question>
@@ -866,22 +881,6 @@ unfortunately. Anyway, better to install 4.08 binaries and use those.
 
 </QandAEntry>
 
-<QandAEntry>
-
-<Question>
-<Para>
-My programs compile fine but do nothing when run.
-</Para>
-</Question>
-
-<Answer>
-<Para>
-Very recent versions of the mingw package in Cygwin seem to cause this. mingwin version 20001111-1 works fine; you should be able to find it on a <ULink
-URL="http://sources.redhat.com/cygwin/mirrors.html">Cygwin mirror</ULink>. Download the archive <Filename>mingw-20001111-1.tar.gz</Filename>, place it in a directory called <Filename>mingw</Filename>, place that in a directory called <Filename>latest</Filename>, then run the Cygwin installer again, choose installation from local disk, and select the directory containing <Filename>latest</Filename> as the source directory for the installation packages. You should then be able to downgrade mingw to the required version by clicking on the line in the installation window until the required version appears.
-</Para>
-
-</QAndAEntry>
-
 </QandASet>
 
 </Sect2>
@@ -893,7 +892,10 @@ URL="http://sources.redhat.com/cygwin/mirrors.html">Cygwin mirror</ULink>. Downl
 <Title>Building the documentation</Title>
 
 <Para>
-We use the DocBook DTD, which is widely used. Most shrink-wrapped distributions seem to be broken in one way or another; thanks to heroic efforts by Sven Panne and Manuel Chakravarty, we now support most of them, plus properly installed versions.
+We use the DocBook DTD, which is widely used. Most shrink-wrapped
+distributions seem to be broken in one way or another; thanks to
+heroic efforts by Sven Panne and Manuel Chakravarty, we now support
+most of them, plus properly installed versions.
 </Para>
 
 <Para>
@@ -903,23 +905,40 @@ Instructions on installing and configuring the DocBook tools follow.
 <Sect2>
 <Title>Installing the DocBook tools from RPMs</Title>
 
-<Para> If you're using a system that can handle RedHat RPM packages, you can
-probably use the <ULink
+<Para> If you're using a system that can handle RedHat RPM packages,
+you can probably use the <ULink
 URL="http://sourceware.cygnus.com/docbook-tools/">Cygnus DocBook
-tools</ULink>, which is the most shrink-wrapped SGML suite that we could
-find. You need all the RPMs except for psgml (i.e.
+tools</ULink>, which is the most shrink-wrapped SGML suite that we
+could find. You need all the RPMs except for psgml (i.e.
 <Filename>docbook</Filename>, <Filename>jade</Filename>,
 <Filename>jadetex</Filename>, <Filename>sgmlcommon</Filename> and
 <Filename>stylesheets</Filename>). Note that most of these RPMs are
 architecture neutral, so are likely to be found in a
-<Filename>noarch</Filename> directory. The SuSE RPMs also work; the RedHat
-ones <Emphasis>don't</Emphasis> as of version 6.2, but they are easy to fix:
-just make a symlink from
-<Filename>/usr/lib/sgml/stylesheets/nwalsh-modular/lib/dblib.dsl</Filename> to
-<Filename>/usr/lib/sgml/lib/dblib.dsl</Filename>. </Para>
+<Filename>noarch</Filename> directory. The SuSE RPMs also work; the
+RedHat ones <Emphasis>don't</Emphasis> in RedHat 6.2 (7.0 and later
+should be OK), but they are easy to fix: just make a symlink from
+<Filename>/usr/lib/sgml/stylesheets/nwalsh-modular/lib/dblib.dsl</Filename>
+to <Filename>/usr/lib/sgml/lib/dblib.dsl</Filename>. </Para>
 
 </Sect2>
 
+    <sect2>
+      <title>Installing DocBook on FreeBSD</title>
+
+      <para>On FreeBSD systems, the easiest way to get DocBook up and
+      running is to install it from the ports tree or a pre-compiled
+      package (packages are available from your local FreeBSD mirror
+      site).</para>
+
+      <para>To use the ports tree, do this:
+<screen>
+      $ cd /usr/ports/textproc/docproj
+      $ make install
+</screen>
+      This installs the FreeBSD documentation project tools, which
+      includes everything needed to format the GHC
+      documentation.</para>
+    </sect2>
 
 <Sect2>
 <Title>Installing from binaries on Windows</Title>