1 <Chapter id="sec-installing-bin-distrib">
2 <Title>Installing GHC</Title>
3 <IndexTerm><Primary>binary installations</Primary></IndexTerm>
4 <IndexTerm><Primary>installation, of binaries</Primary></IndexTerm>
7 Installing from binary distributions is easiest, and recommended!
8 (Why binaries? Because GHC is a Haskell compiler written in Haskell,
9 so you've got to bootstrap it somehow. We provide machine-generated
10 C-files-from-Haskell for this purpose, but it's really quite a pain to
11 use them. If you must build GHC from its sources, using a
12 binary-distributed GHC to do so is a sensible way to proceed. For the
13 other <Literal>fptools</Literal> programs, many are written in
14 Haskell, so binary distributions allow you to install them without
15 having a Haskell compiler.)
18 <Para>This guide is in several parts:</para>
20 <listitem> <para> Installing on Unix-a-likes (<Xref LinkEnd="sec-unix-a-likes">). </para> </listitem>
21 <listitem> <para> Installing on Windows (<Xref LinkEnd="sec-install-windows">). </para> </listitem>
22 <listitem> <para> The layout of installed files (<Xref LinkEnd="sec-install-files">).
23 You don't need to know this to install GHC,
24 but it's useful if you are changing the implementation. </para> </listitem>
25 <listitem> <para> Installing or building the documentation (<Xref LinkEnd="building-docs">). </para> </listitem>
30 <Sect1 id="sec-unix-a-likes"><Title>Installing on Unix-a-likes</Title>
33 <title>When a platform-specific package is available</title>
35 <para>For certain platforms, we provide GHC binaries packaged
36 using the native package format for the platform. This is
37 likely to be by far the best way to install GHC for your
38 platform if one of these packages is available, since
39 dependencies will automatically be handled and the package
40 system normally provides a way to uninstall the package at a
43 <para>We generally provide the following packages:</para>
47 <term>RedHat Linux/x86</term>
49 <para>RPM source & binary packages for RedHat Linux (x86
50 only) are available for most major releases.</para>
55 <term>Debian Linux/x86</term>
57 <para>Debian packages for Linux (x86 only), also for most
58 major releases.</para>
63 <term>FreeBSD/x86</term>
65 <para>On FreeBSD/x86, GHC can be installed using either
66 the ports tree (<literal>cd /usr/ports/lang/ghc && make
67 install</literal>) or from a pre-compiled package
68 available from your local FreeBSD mirror.</para>
73 <para>Other platform-specific packages may be available, check
74 the GHC download page for details.</para>
78 <Title>GHC binary distributions</Title>
81 <IndexTerm><Primary>bundles of binary stuff</Primary></IndexTerm>
85 Binary distributions come in “bundles,” one bundle per file called
86 <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:
92 % cd /your/scratch/space
93 % gunzip < ghc-x.xx-sun-sparc-solaris2.tar.gz | tar xvf -</Screen>
98 Then you should find a single directory, <Literal>fptools</Literal>, with the following
103 <IndexTerm><Primary>binary distribution, layout</Primary></IndexTerm>
104 <IndexTerm><Primary>directory layout (binary distributions)</Primary></IndexTerm>
108 <Term><Literal>Makefile.in</Literal></Term>
111 the raw material from which the <Literal>Makefile</Literal>
112 will be made (<Xref LinkEnd="sec-install">).
114 </ListItem></VarListEntry>
116 <Term><Literal>configure</Literal></Term>
119 the configuration script (<Xref LinkEnd="sec-install">).
121 </ListItem></VarListEntry>
123 <Term><Literal>README</Literal></Term>
126 Contains this file summary.
128 </ListItem></VarListEntry>
130 <Term><Literal>INSTALL</Literal></Term>
133 Contains this description of how to install
136 </ListItem></VarListEntry>
138 <Term><Literal>ANNOUNCE</Literal></Term>
141 The announcement message for the bundle.
143 </ListItem></VarListEntry>
145 <Term><Literal>NEWS</Literal></Term>
148 release notes for the bundle—a longer version
149 of <Literal>ANNOUNCE</Literal>. For GHC, the release notes are contained in the User
150 Guide and this file isn't present.
152 </ListItem></VarListEntry>
154 <Term><Literal>bin/<replaceable>platform</replaceable></Literal></Term>
157 contains platform-specific executable
158 files to be invoked directly by the user. These are the files that
159 must end up in your path.
161 </ListItem></VarListEntry>
163 <Term><Literal>lib/<replaceable>platform</replaceable>/</Literal></Term>
166 contains platform-specific support
167 files for the installation. Typically there is a subdirectory for
168 each <Literal>fptools</Literal> project, whose name is the name of the project with its
169 version number. For example, for GHC there would be a sub-directory
170 <Literal>ghc-x.xx</Literal>/ where <Literal>x.xx</Literal> is the version number of GHC in the bundle.
174 These sub-directories have the following general structure:
181 <Term><Literal>libHSstd.a</Literal> etc:</Term>
184 supporting library archives.
186 </ListItem></VarListEntry>
188 <Term><Literal>ghc-iface.prl</Literal> etc:</Term>
193 </ListItem></VarListEntry>
195 <Term><Literal>import/</Literal></Term>
198 <IndexTerm><Primary>Interface files</Primary></IndexTerm> (<Literal>.hi</Literal>) for the prelude.
200 </ListItem></VarListEntry>
202 <Term><Literal>include/</Literal></Term>
205 A few C <Literal>#include</Literal> files.
207 </ListItem></VarListEntry>
210 </ListItem></VarListEntry>
212 <Term><Literal>share/</Literal></Term>
215 contains platform-independent support files
216 for the installation. Again, there is a sub-directory for each
217 <Literal>fptools</Literal> project.
219 </ListItem></VarListEntry>
221 <Term><Literal>html/</Literal></Term>
224 contains HTML documentation files (one
225 sub-directory per project).
227 </ListItem></VarListEntry>
229 <Term><Literal>man/</Literal></Term>
232 contains Unix manual pages.
234 </ListItem></VarListEntry>
238 <Sect3 id="sec-install">
239 <Title>Installing</Title>
242 OK, so let's assume that you have unpacked your chosen bundles into a
243 scratch directory <Literal>fptools</Literal>. What next? Well, you will at least need
244 to run the <Literal>configure</Literal><IndexTerm><Primary>configure</Primary></IndexTerm> script by changing your
245 directory to <Literal>fptools</Literal> and typing <Literal>./configure</Literal>. That should convert
246 <Literal>Makefile.in</Literal> to <Literal>Makefile</Literal>.
250 <IndexTerm><Primary>installing in-place</Primary></IndexTerm>
251 <IndexTerm><Primary>in-place installation</Primary></IndexTerm>
252 You can now either start using the tools <Emphasis>in-situ</Emphasis> without going
253 through any installation process, just type <Literal>make in-place</Literal> to set the
254 tools up for this. You'll also want to add the path which <Literal>make</Literal> will
255 now echo to your <Literal>PATH</Literal> environment variable. This option is useful if
256 you simply want to try out the package and/or you don't have the
257 necessary privileges (or inclination) to properly install the tools
258 locally. Note that if you do decide to install the package `properly'
259 at a later date, you have to go through the installation steps that
264 To install an <Literal>fptools</Literal> package, you'll have to do the following:
273 Edit the <Literal>Makefile</Literal> and check the settings of the following variables:
275 <IndexTerm><Primary>directories, installation</Primary></IndexTerm>
276 <IndexTerm><Primary>installation directories</Primary></IndexTerm>
281 <Term><Literal>platform</Literal></Term>
284 the platform you are going to install for.
286 </ListItem></VarListEntry>
288 <Term><Literal>bindir</Literal></Term>
291 the directory in which to install user-invokable
294 </ListItem></VarListEntry>
296 <Term><Literal>libdir</Literal></Term>
299 the directory in which to install
300 platform-dependent support files.
302 </ListItem></VarListEntry>
304 <Term><Literal>datadir</Literal></Term>
307 the directory in which to install
308 platform-independent support files.
310 </ListItem></VarListEntry>
312 <Term><Literal>infodir</Literal></Term>
315 the directory in which to install Emacs info
318 </ListItem></VarListEntry>
320 <Term><Literal>htmldir</Literal></Term>
323 the directory in which to install HTML
326 </ListItem></VarListEntry>
328 <Term><Literal>dvidir</Literal></Term>
331 the directory in which to install DVI
334 </ListItem></VarListEntry>
337 The values for these variables can be set through invocation of the
338 <Command>configure</Command><IndexTerm><Primary>configure</Primary></IndexTerm>
339 script that comes with the distribution, but doing an optical diff to
340 see if the values match your expectations is always a Good Idea.
344 <Emphasis>Instead of running <Command>configure</Command>, it is
345 perfectly OK to copy <Filename>Makefile.in</Filename> to
346 <Filename>Makefile</Filename> and set all these variables directly
347 yourself. But do it right!</Emphasis>
354 Run <Literal>make install</Literal>. This <Emphasis>
355 should</Emphasis> work with ordinary Unix
356 <Literal>make</Literal>—no need for fancy stuff like GNU
357 <Literal>make</Literal>.
364 <Literal>rehash</Literal> (t?csh or zsh users), so your shell will see the new
365 stuff in your bin directory.
372 Once done, test your “installation” as suggested in
373 <XRef LinkEnd="sec-GHC-test">. Be sure to use a <Literal>-v</Literal>
374 option, so you can see exactly what pathnames it's using.
376 If things don't work as expected, check the list of known pitfalls in
386 <IndexTerm><Primary>link, installed as ghc</Primary></IndexTerm>
387 When installing the user-invokable binaries, this installation
388 procedure will install GHC as <Literal>ghc-x.xx</Literal> where <Literal>x.xx</Literal> is the version
389 number of GHC. It will also make a link (in the binary installation
390 directory) from <Literal>ghc</Literal> to <Literal>ghc-x.xx</Literal>. If you install multiple versions
391 of GHC then the last one “wins”, and “<Literal>ghc</Literal>” will invoke the last
392 one installed. You can change this manually if you want. But
393 regardless, <Literal>ghc-x.xx</Literal> should always invoke GHC version <Literal>x.xx</Literal>.
400 <Title>What bundles there are</Title>
403 <IndexTerm><Primary>bundles, binary</Primary></IndexTerm> There are
404 plenty of “non-basic” GHC bundles. The files for them are
406 <Literal>ghc-x.xx-<replaceable>bundle</replaceable>-<replaceable>platform</replaceable>.tar.gz</Literal>,
407 where the <replaceable>platform</replaceable> is as above, and
408 <replaceable>bundle</replaceable> is one of these:
415 <Term><Literal>prof</Literal>:</Term>
418 Profiling with cost-centres. You probably want this.
419 <IndexTerm><Primary>profiling bundles</Primary></IndexTerm>
420 <IndexTerm><Primary>bundles, profiling</Primary></IndexTerm>
422 </ListItem></VarListEntry>
424 <Term><Literal>par</Literal>:</Term>
427 Parallel Haskell features (sits on top of PVM).
428 You'll want this if you're into that kind of thing.
429 <IndexTerm><Primary>parallel bundles</Primary></IndexTerm>
430 <IndexTerm><Primary>bundles, parallel</Primary></IndexTerm>
432 </ListItem></VarListEntry>
434 <Term><Literal>gran</Literal>:</Term>
437 The “GranSim” parallel-Haskell simulator
438 (hmm… mainly for implementors).
439 <IndexTerm><Primary>bundles, gransim</Primary></IndexTerm>
440 <IndexTerm><Primary>gransim bundles</Primary></IndexTerm>
442 </ListItem></VarListEntry>
444 <Term><Literal>ticky</Literal>:</Term>
447 “Ticky-ticky” profiling; very detailed
448 information about “what happened when I ran this program”—really
450 <IndexTerm><Primary>bundles, ticky-ticky</Primary></IndexTerm>
451 <IndexTerm><Primary>ticky-ticky bundles</Primary></IndexTerm>
453 </ListItem></VarListEntry>
458 One likely scenario is that you will grab <Emphasis>two</Emphasis>
459 binary bundles—basic, and profiling. We don't usually make the
460 rest, although you can build them yourself from a source distribution.
463 <para>The various GHC bundles are designed to be unpacked into the
464 same directory; then installing as per the directions above will
465 install the whole lot in one go. Note: you <emphasis>must</emphasis>
466 at least have the basic GHC binary distribution bundle, these extra
467 bundles won't install on their own.</para>
471 <Sect3 id="sec-GHC-test">
472 <Title>Testing that GHC seems to be working
476 <IndexTerm><Primary>testing a new GHC</Primary></IndexTerm>
480 The way to do this is, of course, to compile and run <Emphasis>this</Emphasis> program
481 (in a file <Literal>Main.hs</Literal>):
487 main = putStr "Hello, world!\n"
493 Compile the program, using the <Literal>-v</Literal> (verbose) flag to verify that
494 libraries, etc., are being found properly:
497 % ghc -v -o hello Main.hs</Screen>
506 Hello, world!</Screen>
511 Some simple-but-profitable tests are to compile and run the notorious
512 <Literal>nfib</Literal><IndexTerm><Primary>nfib</Primary></IndexTerm> program, using different numeric types. Start with
513 <Literal>nfib :: Int -> Int</Literal>, and then try <Literal>Integer</Literal>, <Literal>Float</Literal>, <Literal>Double</Literal>,
514 <Literal>Rational</Literal> and perhaps the overloaded version. Code for this is
515 distributed in <Literal>ghc/misc/examples/nfib/</Literal> in a source distribution.
518 <para>For more information on how to “drive” GHC, read
528 <Sect1 id="sec-install-windows"><Title>Installing on Windows</Title>
531 Getting the Glasgow Haskell Compiler (post 5.02) to run on Windows platforms is
532 a snap: the Installshield does everything you need.
535 <Sect2><Title>Installing GHC on Windows</Title>
538 To install GHC, use the following steps:
541 <listitem><para>Download the Installshield <Filename>setup.exe</Filename>
542 from the GHC download page
544 URL="http://www.haskell.org/ghc">haskell.org</ULink>.
547 <listitem><para>Run <Filename>setup.exe</Filename>.
548 (If you have a previous version of GHC, Installshield will offer to "modify",
549 or "remove" GHC. Choose "remove"; then run <Filename>setup.exe</Filename> a
550 second time. This time it should offer to install.)
553 At this point you should find GHCi and the GHC documentation are
554 available in your Start menu under "Start/Programs/Glasgow Haskell Compiler".
559 The final dialogue box from the install process tells you where GHC has
560 been installed. If you want to invoke GHC from a command line, add this
561 to your PATH environment variable. Usually, GHC installs into
562 <Filename>c:/ghc/ghc-5.02</Filename>, though the last part of this path
563 depends on which version of GHC you are installing, of course.
564 You need to add <Filename>c:/ghc/ghc-5.02/bin</Filename> to your path if yo
568 GHC needs a directory in which to create, and later delete, temporary files.
569 It uses the standard Windows procedure <literal>GetTempPath()</literal> to
570 find a suitable directory. This procedure returns:
572 <listitem><para>The path in environment variable TMP,
573 if TMP is set.</para></listitem>
574 <listitem><para>Otherwise, the path in environment variable TEMP,
575 if TEMP is set.</para></listitem>
576 <listitem><para>Otherwise, there is a per-user default which varies
577 between versions of Windows. On NT and XP-ish versions, it might
579 <Filename>c:\Documents and Settings\<username>\Local Settings\Temp</filename>
582 The main point is that if you don't do anything GHC will work fine;
583 but if you want to control where the directory is, you can do so by
589 To test the fruits of your labour, try now to compile a simple
595 module Main(main) where
597 main = putStrLn "Hello, world!"
598 bash$ ghc -o main main.hs
608 You do <emphasis>not</emphasis> need the Cygwin toolchain, or anything
609 else, to install and run GHC.
612 An installation of GHC requires about 140M of disk space.
613 To run GHC comfortably, your machine should have at least
618 <Sect2><title>Moving GHC around</title>
620 At the moment, GHC installs in a fixed place (<Filename>c:/ghc/ghc-x.yy</Filename>,
621 but once it is installed, you can freely move the entire GHC tree just by copying
622 the <Filename>ghc-x.yy</Filename> directory. (You may need to fix up
623 the links in "Start/Programs/Glasgow Haskell Compiler" if you do this.)
626 It is OK to put GHC tree in a directory whose path involves spaces. However,
627 don't do this if you use want to use GHC with the Cygwin tools,
628 because Cygwin can get confused when this happpens.
629 We havn't quite got to the bottom of this, but so far as we know it's not
630 a problem with GHC itself. Nevertheless, just to keep life simple we usually
631 put GHC in a place with a space-free path.
635 <Sect2 id="winfaq"><title>Installing ghc-win32 FAQ</title>
643 I'm having trouble with symlinks.
649 Symlinks only work under Cygwin (<Xref LinkEnd="sec-install">), so binaries
650 not linked to the Cygwin DLL, in particular those built for Mingwin, will not
661 I'm getting “permission denied” messages from the <Command>rm</Command> or
662 <Command>mv</Command>.
668 This can have various causes: trying to rename a directory when an Explorer
669 window is open on it tends to fail. Closing the window generally cures the
670 problem, but sometimes its cause is more mysterious, and logging off and back
671 on or rebooting may be the quickest cure.
680 Further information on using GHC under Windows can be found in <ULink
681 URL="http://www.dcs.gla.ac.uk/~sof/ghc-win32.html">Sigbjørn Finne's
682 pages</ULink>. Note: ignore the installation instructions, which are rather
683 out of date; the <Emphasis>Miscellaneous</Emphasis> section at the bottom of
684 the page is of most interest, covering topics beyond the scope of this
692 <Sect1 id="sec-install-files"><Title>The layout of installed files</Title>
695 This section describes what files get installed where. You don't need to know it
696 if you are simply installing GHC, but it is vital information if you are changing
699 <para> GHC is installed in two directory trees:</para>
702 <term>Binary directory</term>
703 <listitem> <para> known as <Filename>$(bindir)</Filename>, holds executables that
704 the user is expected to invoke. Notably,
705 <Filename>ghc</Filename> and <Filename>ghci</FileName>. On Unix, this directory
706 is typically something like <Filename>/usr/local/bin</Filename>. On Windows,
707 however, this directory is always <Filename>$(libdir)/bin</Filename>.
712 <term>Library directory,</term>
713 <listitem> <para> known as <Filename>$(libdir)</Filename>, holds all the
714 support files needed to run GHC. On Unix, this
715 directory is usually something like <Filename>/usr/lib/ghc/ghc-5.02</Filename>. </para>
721 When GHC runs, it must know where its library directory is.
722 It finds this out in one of two ways:
727 <Filename>$(libdir)</Filename> is passed to GHC using the <option>-B</option> flag.
728 On Unix (but not Windows), the installed <filename>ghc</filename> is just a one-line
729 shell script that invokes the real GHC, passing a suitable <option>-B</option> flag.
730 [All the user-supplied flags
731 follow, and a later <option>-B</option> flag overrides an earlier one, so a user-supplied
736 <para> On Windows (but not Unix), if no <option>-B</option> flag is given, GHC uses a system
737 call to find the directory in which the running GHC executable lives, and derives
738 <Filename>$(libdir)</Filename> from that. [Unix lacks such a system call.]
743 <sect2> <title>Layout of the library directory</title>
745 <para>The layout of the library directory is almost identical on
746 Windows and Unix, as follows: layout:</para>
750 package.conf GHC package configuration
751 ghc-usage.txt Message displayed by ghc ––help
753 bin/ [Win32 only] User-visible binaries
757 unlit Remove literate markup
759 touchy.exe [Win32 only]
760 perl.exe [Win32 only]
763 ghc-x.xx GHC executable [Unix only]
765 ghc-split Asm code splitter
766 ghc-asm Asm code mangler
768 gcc-lib/ [Win32 only] Support files for gcc
769 specs gcc configuration
771 cpp0.exe gcc support binaries
778 libmingw32.a Standard
783 imports/ GHC interface files
784 std/*.hi 'std' library
785 lang/*.hi 'lang' library
788 include/ C header files
789 StgMacros.h GHC-specific
790 ..etc... header files
792 mingw/*.h [Win32 only] Mingwin header files
794 libHSrts.a GHC library archives
799 HSstd1.o GHC library linkables
800 HSstd2.o (used by ghci, which does
801 HSlang.o not grok .a files yet)
804 <para>Note that:</para>
807 <para>On Win32, the <filename>$(libdir)/bin</filename> directory contains user-visible binaries;
808 add it to your <filename>PATH</filename>. The <filename>ghci</filename> executable is a <filename>.bat</filename>
809 file which invokes <filename>ghc</filename>. </para>
811 <para>The GHC executable is the Real Thing (no intervening
812 shell scripts or <filename>.bat</filename> files).
813 Reason: we sometimes invoke GHC with very long command lines,
814 and <filename>cmd.exe</filename> (which executes <filename>.bat</filename> files)
815 truncates them. [We assume people won't invoke ghci with very long
816 command lines.]</para>
818 <para>On Unix, the user-invokable <filename>ghc</filename> invokes <filename>$(libdir)/ghc-<replaceable>version</replaceable></filename>,
819 passing a suitable <option>-B</option> flag.
824 <para><filename>$(libdir)</filename> also contains support
825 binaries. These are <emphasis>not</emphasis> expected to be
826 on the user's <filename>PATH</filename>, but and are invoked
827 directly by GHC. In the Makefile system, this directory is
828 also called <filename>$(libexecdir)</filename>, but
829 <emphasis>you are not free to change it</emphasis>. It must
830 be the same as <filename>$(libdir)</filename>.</para>
834 <para>We distribute <filename>gcc</filename> with the Win32 distribution of GHC, so that users
835 don't need to install <filename>gcc</filename>, nor need to care about which version it is.
836 All <filename>gcc</filename>'s support files are kept in <filename>$(libdir)/gcc-lib/</filename>.
841 <para>Similarly, we distribute <filename>perl</filename> and a <filename>touch</filename>
842 replacement (<filename>touchy.exe</filename>)
843 with the Win32 distribution of GHC. </para>
847 <para>The support programs <filename>ghc-split</filename>
848 and <filename>ghc-asm</filename> are Perl scripts. The
849 first line says <literal>#!/bin/perl</literal>; on Unix, the
850 script is indeed invoked as a shell script, which invokes
851 Perl; on Windows, GHC invokes
852 <filename>$(libdir)/perl.exe</filename> directly, which
853 treats the <literal>#!/bin/perl</literal> as a comment.
854 Reason: on Windows we want to invoke the Perl distributed
855 with GHC, rather than assume some installed one. </para>
864 <Sect1 id="building-docs">
865 <Title>Building the documentation</Title>
867 <Para>We use the DocBook DTD, which is widely used. Most shrink-wrapped
868 distributions seem to be broken in one way or another; thanks to
869 heroic efforts by Sven Panne and Manuel Chakravarty, we now support
870 most of them, plus properly installed versions.
873 <Para>Instructions on installing and configuring the DocBook tools follow.
877 <Title>Installing the DocBook tools from RPMs</Title>
879 <Para>If you're using a system that can handle RedHat RPM packages,
880 you can probably use the <ULink
881 URL="http://sourceware.cygnus.com/docbook-tools/">Cygnus DocBook
882 tools</ULink>, which is the most shrink-wrapped SGML suite that we
883 could find. You need all the RPMs except for psgml (i.e.
884 <Filename>docbook</Filename>, <Filename>jade</Filename>,
885 <Filename>jadetex</Filename>, <Filename>sgmlcommon</Filename> and
886 <Filename>stylesheets</Filename>). Note that most of these RPMs are
887 architecture neutral, so are likely to be found in a
888 <Filename>noarch</Filename> directory. The SuSE RPMs also work; the
889 RedHat ones <Emphasis>don't</Emphasis> in RedHat 6.2 (7.0 and later
890 should be OK), but they are easy to fix: just make a symlink from
891 <Filename>/usr/lib/sgml/stylesheets/nwalsh-modular/lib/dblib.dsl</Filename>
892 to <Filename>/usr/lib/sgml/lib/dblib.dsl</Filename>. </Para>
897 <title>Installing DocBook on FreeBSD</title>
899 <para>On FreeBSD systems, the easiest way to get DocBook up and
900 running is to install it from the ports tree or a pre-compiled
901 package (packages are available from your local FreeBSD mirror
904 <para>To use the ports tree, do this:
906 $ cd /usr/ports/textproc/docproj
909 This installs the FreeBSD documentation project tools, which
910 includes everything needed to format the GHC
911 documentation.</para>
915 <Title>Installing from binaries on Windows</Title>
917 <Para>It's a good idea to use Norman Walsh's <ULink
918 URL="http://nwalsh.com/docbook/dsssl/doc/install.html">installation
919 notes</ULink> as a guide. You should get version 3.1 of DocBook, and note
920 that his file <Filename>test.sgm</Filename> won't work, as it needs version
921 3.0. You should unpack Jade into <Filename>\Jade</Filename>, along with the
922 entities, DocBook into <Filename>\docbook</Filename>, and the DocBook
923 stylesheets into <Filename>\docbook\stylesheets</Filename> (so they actually
924 end up in <Filename>\docbook\stylesheets\docbook</Filename>).
931 <Title>Installing the DocBook tools from source</Title>
936 <Para>Install <ULink URL="http://openjade.sourceforge.net/">OpenJade</ULink> (Windows binaries are available as well as sources). If you want DVI, PS, or PDF then install JadeTeX from the <Filename>dsssl</Filename>
937 subdirectory. (If you get the error:
940 ! LaTeX Error: Unknown option implicit=false' for package hyperref'.
943 your version of <Command>hyperref</Command> is out of date; download it from
944 CTAN (<Filename>macros/latex/contrib/supported/hyperref</Filename>), and
945 make it, ensuring that you have first removed or renamed your old copy. If
946 you start getting file not found errors when making the test for
947 <Command>hyperref</Command>, you can abort at that point and proceed
948 straight to <Command>make install</Command>, or enter them as
949 <Filename>../</Filename><Emphasis>filename</Emphasis>.)
952 <Para>Make links from <Filename>virtex</Filename> to <Filename>jadetex</Filename>
953 and <Filename>pdfvirtex</Filename> to <Filename>pdfjadetex</Filename>
954 (otherwise DVI, PostScript and PDF output will not work). Copy
955 <Filename>dsssl/*.{dtd,dsl}</Filename> and <Filename>catalog</Filename> to <Filename>/usr/[local/]lib/sgml</Filename>.
961 <Title>DocBook and the DocBook stylesheets</Title>
963 <Para>Get a Zip of <ULink
964 URL="http://www.oasis-open.org/docbook/sgml/3.1/index.html">DocBook</ULink>
965 and install the contents in <Filename>/usr/[local/]/lib/sgml</Filename>.
968 <Para>Get the <ULink URL="http://nwalsh.com/docbook/dsssl/">DocBook
969 stylesheets</ULink> and install in
970 <Filename>/usr/[local/]lib/sgml/stylesheets</Filename> (thereby creating a
971 subdirectory docbook). For indexing, copy or link <Filename>collateindex.pl</Filename> from the DocBook stylesheets archive in <Filename>bin</Filename> into a directory on your <Constant>PATH</Constant>.
974 <Para>Download the <ULink
975 URL="http://www.oasis-open.org/cover/ISOEnts.zip">ISO
976 entities</ULink> into <Filename>/usr/[local/]lib/sgml</Filename>.
984 <Title>Configuring the DocBook tools</Title>
986 <Para>Once the DocBook tools are installed, the configure script will detect them and set up the build system accordingly. If you have a system that isn't supported, let us know, and we'll try to help.
992 <Title>Remaining problems</Title>
994 <Para>If you install from source, you'll get a pile of warnings of the form
996 <Screen>DTDDECL catalog entries are not supported</Screen>
998 every time you build anything. These can safely be ignored, but if you find them tedious you can get rid of them by removing all the <Constant>DTDDECL</Constant> entries from <Filename>docbook.cat</Filename>.
1008 ;;; Local Variables: ***
1010 ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter") ***