Changes between Version 23 and Version 24 of Debugging/InstallingPackagesInplace


Ignore:
Timestamp:
Feb 19, 2015 9:54:24 AM (5 years ago)
Author:
thomie
Comment:

Install packages inplace

Legend:

Unmodified
Added
Removed
Modified
  • Debugging/InstallingPackagesInplace

    v23 v24  
    1212
    1313{{{
    14 cabal install --with-compiler=<inplace-ghc> <package>
     14cabal install --with-compiler=<inplace-ghc> --with-package-db=<inplace-package-db> <package>
    1515}}}
    16 where `<inplace ghc>` is the path to your inplace GHC (usually `$(TOP)/inplace/bin/ghc-stage2`; make sure it's absolute), and <package> is the name of the package.
     16where `<inplace-ghc>` is the path to your inplace GHC (`$(TOP)/inplace/bin/ghc-stage2`; make sure it's absolute), `<inplace-package-db>` is the path to your inplace package database (`$(TOP)/inplace/lib/package.conf.d`; again, make sure it's absolute) and <package> is the name of the package.
    1717
    1818Points to note:
    19  * This will install the package in your home directory (e.g. somewhere under `~/.cabal/lib` on a Unix system), and it will register the package in your private package database, so you'll probably want to remove and unregister it by hand when you've finished.
     19 * The testsuite driver doesn't search the user package database for extra packages (it calls 'ghc-pkg --no-user-package-db describe <package>), therefore we install the package in the inplace package database.
    2020
    2121Plan A can fail, because sometimes GHC changes require corresponding Cabal changes (this happened in GHC 6.12, and after the GHC 7.6.1 release). If the format changed you might get a message like
     
    2727== Plan B: use the Cabal library bundled with GHC ==
    2828
    29 This method is slightly more work, but it does have the advantage of not installing anything in your home directory that you have to go and remove later.
     29This method is slightly more work, but might work in case plan A failed.
    3030
    3131Go to a directory where you are happy to keep the newly-downloaded code.