[Haskell-cafe] Cabal, Time & GHC 6.10.2

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sun May 17 04:59:38 EDT 2009

On Sun, 2009-05-17 at 09:17 +0100, Dominic Steinitz wrote:
> I get
> > dom at linux-6ofq:~/asn1> runghc Setup.hs configure
> > Configuring PER-0.0.20...
> > Setup.hs: At least the following dependencies are missing:
> > time -any && -any
> but I have time
> > dom at linux-6ofq:~/asn1> ghc-pkg list | grep time
> >     old-locale-, old-time-, packedstring-,
> >     time-
> I think I can see why cabal isn't finding it:
> > ghc-pkg dump --global | grep time-
> finds nothing and I believe that is what cabal uses to find things.

The default for "runghc Setup.hs configure" is --global, but the default
for "cabal configure" is --user. So if you're using the "cabal" program
to install packages, then you can also us it to configure other
packages. If for you need to use the runghc Setup.hs interface (e.g. in
some system build scripts) and you want it to pick up packages from the
user package db then use the --user flag. If you're constantly having to
use the runghc Setup.hs interface and doing per-user installs is a pain
then you can set the default for the cabal program to be global installs
in the cabal config file (~/.cabal/config).

I'll add this issue to the FAQ, it come up enough. If anyone else
reading would like to eliminate this FAQ, then implementing this ticket
is the answer:

        suggest use of --user if configure fails with missing deps that
        are in the user db


More information about the Haskell-Cafe mailing list