
Hi all, I have another question about cabal. (Thanks for the information about whether cabal supports two cabal files in one directory). I have a library pads-haskell with a cabal file pads-haskell.cabal. If I ask to install this library from the current directory:
~/.cabal/bin/cabal install -w ~/sw/ghc-7.01/bin/ghc --package-db=/Users/kfisher/sw/ghc-7.01/lib/ghc-7.0.1/package.conf.d
I get the following error messages:
Resolving dependencies... cabal: cannot configure mainland-pretty-0.1.0.1. It requires containers >=0.2 && <0.4 For the dependency on containers >=0.2 && <0.4 there are these packages: containers-0.2.0.0, containers-0.2.0.1 and containers-0.3.0.0. However none of them are available. containers-0.2.0.0 was excluded because regex-posix-0.94.4 requires containers ==0.4.0.0 containers-0.2.0.0 was excluded because regex-base-0.93.2 requires containers ==0.4.0.0 containers-0.2.0.0 was excluded because containers-0.4.0.0 was selected instead containers-0.2.0.0 was excluded because regex-bytestring-0.0.1 requires containers ==0.4.0.0 containers-0.2.0.1 was excluded because regex-posix-0.94.4 requires containers ==0.4.0.0 containers-0.2.0.1 was excluded because regex-base-0.93.2 requires containers ==0.4.0.0 containers-0.2.0.1 was excluded because containers-0.4.0.0 was selected instead containers-0.2.0.1 was excluded because regex-bytestring-0.0.1 requires containers ==0.4.0.0 containers-0.3.0.0 was excluded because regex-posix-0.94.4 requires containers ==0.4.0.0 containers-0.3.0.0 was excluded because regex-base-0.93.2 requires containers ==0.4.0.0 containers-0.3.0.0 was excluded because containers-0.4.0.0 was selected instead containers-0.3.0.0 was excluded because regex-bytestring-0.0.1 requires containers ==0.4.0.0
(even though mainland-pretty-0.1.0.1 is already installed:
/Users/kfisher/sw/ghc-7.01/lib/ghc-7.0.1/package.conf.d: Cabal-1.10.0.0 ... mainland-pretty-0.1.0.1 )
That's question number one: why is it trying to configure a library that is already installed? If instead of asking cabal to install the library, I compile Setup and then do a configure, build, and register in place:
./Setup configure -w ~/sw/ghc-7.01/bin/ghc --with-haddock=/Users/kfisher/ghc-head/bin/haddock --package-db=/Users/kfisher/sw/ghc-7.01/lib/ghc-7.0.1/package.conf.d ./Setup build ./Setup register --inplace
Everything works just fine. That's the second question: why does cabal install not work while breaking it into pieces does work? I've run into this in working with other libraries on Hackage, but have never understood why sometimes I had to do the installation by hand. Can someone help me understand what is going on here with cabal and how to fix it so that cabal install will work for my library? If this is already documented somewhere that I missed, please just point me to the relevant documentation Thanks! Kathleen

On Wed, Jan 26, 2011 at 1:35 PM, Kathleen Fisher
~/.cabal/bin/cabal install -w ~/sw/ghc-7.01/bin/ghc --package-db=/Users/kfisher/sw/ghc-7.01/lib/ghc-7.0.1/package.conf.d
I get the following error messages:
Resolving dependencies... cabal: cannot configure mainland-pretty-0.1.0.1. It requires containers =0.2 && <0.4
See here that mainland-pretty has excluded containers 0.3? That's your problem - GHC 7 ships with containers 0.4. That's question number one: why is it trying to configure a library that is
already installed?
Because it's trying, and failing, to meet a set of internally inconsistent version dependency constraints. That's the second question: why does cabal install not work while breaking
it into pieces does work?
By breaking the install into pieces, you're letting the package manager see only a small fraction of the dependency graph at a time, and those disconnected pieces of the graph are not themselves internally inconsistent. It's when cabal gets a holistic look at the lot that everything goes kablooie.
participants (2)
-
Bryan O'Sullivan
-
Kathleen Fisher