HEADS UP: Running cabal install with the latest GHC

Edward Z. Yang ezyang at mit.edu
Sat Sep 27 16:43:13 UTC 2014


Hi Reid,

Ah yes, this is fallout from

    commit da7289882610ccae3f16c74be7440d19c29ecd20
    Author: Duncan Coutts <duncan at well-typed.com>
    Date:   Wed Aug 27 16:33:20 2014 +0100

        Change testsuite to not use old-style file package databases
        
        Now uses ghc-pkg init. The file-style databases are no longer supported.

So yes, you will need a new version of cabal-install for GHC HEAD.

Cheers,
Edward

Excerpts from Reid Barton's message of 2014-09-27 09:26:08 -0700:
> On Fri, Aug 8, 2014 at 8:00 AM, Edward Z. Yang <ezyang at mit.edu> wrote:
> 
> > Hey all,
> >
> > SPJ pointed out to me today that if you try to run:
> >
> >     cabal install --with-ghc=/path/to/inplace/bin/ghc-stage2
> >
> > with the latest GHC HEAD, this probably will not actually work, because
> > your system installed version of Cabal is probably too old to deal with
> > the new package key stuff in HEAD.  So, how do you get a version
> > of cabal-install (and Cabal) which is new enough to do what you need
> > it to?
> >
> > The trick is to compile Cabal using your /old/ GHC. Step-by-step, this
> > involves cd'ing into libraries/Cabal/Cabal and running `cabal install`
> > (or install it in a sandbox, if you like) and then cd'ing to
> > libraries/Cabal/cabal-install and cabal install'ing that.
> >
> 
> Hi all,
> 
> The new cabal-install I built last month following the instructions above
> started failing with recent GHC HEAD with messages like
> 
>  ghc: ghc no longer supports single-file style package databases
> (dist/package.conf.inplace) use 'ghc-pkg init' to create the database with
> the correct format.
> 
> I found that repeating these steps with the latest libraries/Cabal
> submodule gave me a cabal-install that, so far, appears to be working with
> GHC HEAD. So if your cabal-install has stopped working with HEAD, try
> building the latest version as outlined in Edward's email.
> 
> Cabal wizards, any gotchas with current Cabal & GHC HEAD I should be aware
> of?
> 
> Regards,
> Reid Barton


More information about the ghc-devs mailing list