X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fbuilding%2Fbuilding.xml;h=ae22c81d286733017018997588e925bdbe67190f;hb=1013f2bbde5eb3e8bba4da6d851215963a93b239;hp=7f063cfd7e86b40a566853ad82fa57ec48416c2c;hpb=a1939730ba7a460d702aca22322c4ec558e8be6d;p=ghc-hetmet.git diff --git a/docs/building/building.xml b/docs/building/building.xml index 7f063cf..ae22c81 100644 --- a/docs/building/building.xml +++ b/docs/building/building.xml @@ -1445,8 +1445,8 @@ $ cvs checkout nofib/spectral Quick Start If you are starting from a source distribution, and just - want a completely standard build, then the following should - work: + want a completely standard build, then the following procedure should + work (unless you're on Windows, in which case go to ). $ autoreconf $ ./configure @@ -2752,8 +2752,8 @@ directive. - EXCLUDE_SRCS - EXCLUDE_SRCS + EXCLUDED_SRCS + EXCLUDED_SRCS Set to a list of source files (relative to the @@ -2771,7 +2771,7 @@ directive. EXTRA_SRCS - EXCLUDE_SRCS + EXTRA_SRCS Set to a list of extra source files (perhaps @@ -3386,27 +3386,21 @@ directive. Installing the DocBook tools on Linux - If you're on a recent RedHat system (7.0+), you probably - have working DocBook tools already installed. The configure - script should detect your setup and you're away. + If you're on a recent RedHat (7.0+) or SuSE (8.1+) system, + you probably have working DocBook tools already installed. The + configure script should detect your setup and you're away. If you don't have DocBook tools installed, and you are - using a system that can handle RedHat RPM packages, you can - probably use the Cygnus - DocBook tools, which is the most shrink-wrapped SGML - suite that we could find. You need all the RPMs except for - psgml (i.e. docbook, - jade, jadetex, - sgmlcommon and - stylesheets). Note that most of these - RPMs are architecture neutral, so are likely to be found in a - noarch directory. The SuSE RPMs also - work; the RedHat ones don't in RedHat 6.2 - (7.0 and later should be OK), but they are easy to fix: just - make a symlink from - /usr/lib/sgml/stylesheets/nwalsh-modular/lib/dblib.dsl - to /usr/lib/sgml/lib/dblib.dsl. + using a system that can handle RPM packages, you can use Rpmfind.net to find suitable + packages for your system. Search for the packages + docbook-dtd, + docbook-xsl-stylesheets, + libxslt, + libxml2, + fop, + xmltex, and + dvips. @@ -3428,77 +3422,24 @@ $ make install Installing from binaries on Windows - It's a good idea to use Norman Walsh's installation - notes as a guide. You should get version 3.1 of - DocBook, and note that his file test.sgm - won't work, as it needs version 3.0. You should unpack Jade - into \Jade, along with the entities, - DocBook into \docbook, and the DocBook - stylesheets into \docbook\stylesheets (so - they actually end up in - \docbook\stylesheets\docbook). + Probably the fastest route to a working DocBook environment on + Windows is to install Cygwin + with the complete Doc category. If you are using + MinGW for compilation, you + have to help configure a little bit: Set the + environment variables XmllintCmd and + XsltprocCmd to the paths of the Cygwin executables + xmllint and xsltproc, + respectively, and set fp_cv_dir_docbook_xsl to the path + of the directory where the XSL stylesheets are installed, + e.g. c:/cygwin/usr/share/docbook-xsl. + + + If you want to build HTML Help, you have to install the + HTML Help SDK, + too, and make sure that hhc is in your PATH. - - - Installing the DocBook tools from source - - - Jade - - Install OpenJade - (Windows binaries are available as well as sources). If you - want DVI, PS, or PDF then install JadeTeX from the - dsssl subdirectory. (If you get the - error: - -! LaTeX Error: Unknown option implicit=false' for package hyperref'. - - your version of hyperref is out of date; - download it from CTAN - (macros/latex/contrib/supported/hyperref), - and make it, ensuring that you have first removed or renamed - your old copy. If you start getting file not found errors - when making the test for hyperref, you - can abort at that point and proceed straight to - make install, or enter them as - ../filename.) - - Make links from virtex to - jadetex and - pdfvirtex to - pdfjadetex (otherwise DVI, PostScript - and PDF output will not work). Copy - dsssl/*.{dtd,dsl} and - catalog to - /usr/[local/]lib/sgml. - - - - DocBook and the DocBook stylesheets - - Get a Zip of DocBook - and install the contents in - /usr/[local/]/lib/sgml. - - Get the DocBook - stylesheets and install in - /usr/[local/]lib/sgml/stylesheets - (thereby creating a subdirectory docbook). For indexing, - copy or link collateindex.pl from the - DocBook stylesheets archive in bin into - a directory on your PATH. - - Download the ISO - entities into - /usr/[local/]lib/sgml. - - @@ -3511,20 +3452,6 @@ $ make install - Remaining problems - - If you install from source, you'll get a pile of warnings - of the form - -DTDDECL catalog entries are not supported - - 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 DTDDECL entries from - docbook.cat. - - - Building the documentation To build documentation in a certain format, you can @@ -3613,20 +3540,19 @@ $ make install Bootstrapping GHC on a system without GHC already installed is achieved by taking the intermediate C files (known - as HC files) from a GHC compilation on a supported system to the - target machine, and compiling them using gcc to get a working - GHC. + as HC files) from another GHC compilation, compiling them using gcc to + get a working GHC. NOTE: GHC versions 5.xx were hard to bootstrap from C. We recommend using GHC 6.0.1 or later. HC files are platform-dependent, so you have to get a set - that were generated on similar hardware. There may be some - supplied on the GHC download page, otherwise you'll have to - compile some up yourself, or start from - unregisterised HC files - see . + that were generated on the same platform. There + may be some supplied on the GHC download page, otherwise you'll have to + compile some up yourself, or start from + unregisterised HC files - see . The following steps should result in a working GHC build with full libraries: @@ -3723,6 +3649,13 @@ $ make install Cross-compiling to produce an unregisterised GHC + NOTE! These instructions apply to GHC 6.4 and (hopefully) + later. If you need instructions for an earlier version of GHC, try + to get hold of the version of this document that was current at the + time. It should be available from the appropriate download page on + the GHC homepage. + In this section, we explain how to bootstrap GHC on a new platform, using unregisterised intermediate C files. We haven't put a great deal of effort into automating this @@ -3762,7 +3695,7 @@ $ ./configure --enable-hc-boot --enable-hc-boot-unregisterised $ cd T/ghc/includes -$ make config.h +$ make ghcconfig.h @@ -3787,13 +3720,16 @@ $ ./configure with the following contents: GhcUnregisterised = YES -GhcLibHcOpts = -O -H32m -keep-hc-files +GhcLibHcOpts = -O -fvia-C -keep-hc-files +GhcRtsHcOpts = -keep-hc-files GhcLibWays = SplitObjs = NO GhcWithNativeCodeGen = NO GhcWithInterpreter = NO -GhcStage1HcOpts = -O -H32m -fasm -GhcStage2HcOpts = -O -fvia-C -keep-hc-files +GhcStage1HcOpts = -O -fasm +GhcStage2HcOpts = -O -fvia-C -keep-hc-files +SRC_HC_OPTS += -H32m +GhcBootLibs = YES @@ -3819,7 +3755,7 @@ GhcStage2HcOpts = -O -fvia-C -keep-hc-files Copy - T/ghc/includes/config.h + T/ghc/includes/ghcconfig.h to H/ghc/includes. Note that we are building on the host machine, using the @@ -3830,9 +3766,9 @@ GhcStage2HcOpts = -O -fvia-C -keep-hc-files - Touch config.h, just to make + Touch ghcconfig.h, just to make sure it doesn't get replaced during the build: -$ touch H/ghc/includes/config.h +$ touch H/ghc/includes/ghcconfig.h @@ -3849,15 +3785,17 @@ $ make boot && make -$ cd H/ghc +$ cd H/ghc/compiler $ make boot stage=2 && make stage=2 - + -$ cd H/ghc/utils +$ cd H/ghc/lib +$ make clean +$ make -k UseStage1=YES EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files' +$ cd H/ghc/utils $ make clean -$ make -k HC=H/ghc/compiler/stage1/ghc-inplace \ - EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files' +$ make -k UseStage1=YES EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files' @@ -4390,6 +4328,24 @@ Cygwin programs have a more complicated mount table, and map the lettered drives +Crippled <command>ld</command> + + +It turns out that on both Cygwin and MSYS, the ld has a +limit of 32kbytes on its command line. Especially when using split object +files, the make system can emit calls to ld with thousands +of files on it. Then you may see something like this: + +(cd Graphics/Rendering/OpenGL/GL/QueryUtils_split && /mingw/bin/ld -r -x -o ../QueryUtils.o *.o) +/bin/sh: /mingw/bin/ld: Invalid argument + +The solution is either to switch off object file splitting (set + to NO in your +build.mk), +or to make the module smaller. + + + Host System vs Target System @@ -4497,7 +4453,11 @@ Run both executables (in the order given above) to install them. I put them in Set the following environment variables - PATH: add c:/msys/1.0/bin to your path. (Of course, the version number may differ.) + PATH: add c:/msys/1.0/bin and + c:/msys/1.0/local/bin + to your path. (Of course, the version number may differ.) + MSYS mounts the former as both /bin and + /usr/bin and the latter as /usr/local/bin. HOME: set to your home directory (e.g. c:/userid). @@ -4768,7 +4728,7 @@ Make sure the installation directory is in your - Install Alex. This can be done by building from the + Install an executable Alex. This can be done by building from the source distribution in the same way as Happy. Sources are available from http://www.haskell.org/alex. @@ -4781,7 +4741,13 @@ Just pick up a mingw bundle at http://www.mingw.org/. We install it in c:/mingw. -Do not add any of the mingw binaries to your path. + +On MSYS, add c:/mingw/bin to your PATH. MSYS does not provide gcc, +ld, ar, and so on, because it just uses the MinGW ones. So you need them +in your path. + + +On Cygwin, do not add any of the mingw binaries to your path. They are only going to get used by explicit access (via the --with-gcc flag you give to configure later). If you do add them to your path you are likely to get into a mess because their names overlap with Cygwin binaries.