Changes between Version 14 and Version 15 of Building/GettingTheSources


Ignore:
Timestamp:
Oct 9, 2007 10:38:55 AM (7 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Building/GettingTheSources

    v14 v15  
    2626The first thing to do is install [http://darcs.net/ darcs]. 
    2727 
    28 A source tree consists of the GHC repository, with a set of packages in the libraries directory.  If you only want to download the latest sources and aren't interested in working on GHC, then you can get ''partial'' repositories: 
     28A source tree consists of the GHC repository,  
     29with a set of library packages in the `libraries` directory.  Each of these 
     30libraries has its own repository: see DarcsRepositories. 
     31 
     32If you plan to modify GHC, then you '''must''' get repositories with full history rather than just partial repositories.  (Why?  Because darcs has some bugs that sometimes cause problems when using partial repositories for anything more than just pulling the latest patches.) 
     33However, you cannot use `darcs get` to get a full GHC repository, for two reasons: 
     34  * GHC has more than 16,000 patches and the get will take forever.  
     35  * Darcs has a bug concerning the interaction of case-sensitivity and Windows, which makes Darcs crash if you do `darcs get` on the full GHC repository on Windows. 
     36 
     37Instead, follow the following steps: 
     38 0. Download a complete bundle of the required repositories first, using your browser rather than darcs. These bundles are on [http://darcs.haskell.org/] in files of the form `ghc-HEAD-`''date''`-ghc-corelibs-testsuite.tar.bz2`, e.g. `ghc-HEAD-2007-08-29-ghc-corelibs-testsuite.tar.bz2`.[[BR]][[BR]] 
     39 0. Unpack the bundle, which will create a directory called `ghc`.  You can rename this directory freely.[[BR]][[BR]] 
     40 0. Change into the new directory, and pull patches from the main GHC repository: 
     41{{{ 
     42   $ cd ghc 
     43   $ darcs pull -a 
     44}}} 
     45 0. Now use the `darcs-all` script to pull patches from all the library repositories, and the testsuite repository: 
     46{{{ 
     47   $ ./darcs-all pull -a 
     48}}} 
     49   The command `darcs-all` automates the fetching of the repositories for the libraries. 
     50 
     51If you omit step (3), `darcs-all` will pull patches into the GHC repository too, and if that pulls a patch that modifies the `darcs-all` script itself, then bizarre things can (or at least could in the past) happen.  The safe thing to do is to get your main `ghc` repo up to date (step 3) and then run the script. 
     52 
     53If you only want to download the latest sources and aren't interested in working on GHC, then you can get ''partial'' repositories: 
    2954 
    3055{{{ 
     
    3459  $ ./darcs-all get 
    3560}}} 
     61The command `darcs-all` adds the `--partial` flag by default. 
    3662 
    37 The command `darcs-all` automates the fetching of the repositories for the libraries, and it automatically adds the `--partial` flag. 
     63== Getting more packages == 
    3864 
    39 If you plan to modify GHC, then you really want to get repositories with full history rather than just partial repositories, the reason being that darcs has some bugs that sometimes cause problems when using partial repositories for anything more than just pulling the latest patches.  However, don't just omit the `--partial` flag: GHC has more than 16,000 patches and the get will take forever.  Instead, download a complete bundle of the required repositories first, these are on [http://darcs.haskell.org/] in files of the form `ghc-HEAD-`''date''`-ghc-corelibs-testsuite.tar.bz2`, e.g. `ghc-HEAD-2007-08-29-ghc-corelibs-testsuite.tar.bz2`.  After unpacking the bundle, update your repositories like this: 
    40  
    41 {{{ 
    42    $ ..untar tarball.. 
    43    $ cd ghc 
    44    $ darcs pull -a 
    45    $ ./darcs-all pull -a 
    46 }}} 
    47 If you do `darcs-all`, and that pulls in a patch that modifies the `darcs-all` script itself, then bizarre things can (or at least could in the past) happen.  The safe thing to do is to get your main `ghc` repo up to date (the `darcs pull` line) and then run the script. 
    48  
    49 The above will grab the "core" set of packages.  This is the minimal set of packages required to bootstrap GHC.  If you want to get a more comprehensive set of packages and include them in your GHC build, then you can say: 
     65The above will grab the "core" set of packages and the testsuite.  This is the minimal set of packages required to bootstrap GHC.  If you want to get a more comprehensive set of packages and include them in your GHC build, then you can say: 
    5066 
    5167{{{ 
     
    5369}}} 
    5470 
    55 This isn't usually necessary: extra packages can be compiled and installed separately using Cabal, after you have built and installed GHC itself with its core packages.  The list of "core" and "extra" packages is below. 
     71This isn't usually necessary: extra packages can be compiled and installed separately using Cabal, after you have built and installed GHC itself with its core packages.  The "core" and "extra" packages are listed in DarcsRepositories. 
    5672 
    57 Optionally, you might want to grab the testsuite and benchmark suite too, which also become sub-directories of ghc: 
     73Optionally, you might want to grab the testsuite (if you have not already got it) and `nofib` benchmark suite too, which also become sub-directories of ghc: 
    5874 
    5975{{{ 
     
    6177  $ ./darcs-all --nofib get 
    6278}}} 
     79The full list of darcs repositories relating to GHC is at DarcsRepositories. 
    6380 
    64 The full list of darcs repositories relating to GHC is at DarcsRepositories. 
     81 
    6582 
    6683=== Getting a branch ===