Why am I having such weird dependency issues?

Neither of these errors makes any sense to me. What's happening? $ cabal update Downloading the latest package list from hackage.haskell.org $ cabal install yi Resolving dependencies... cabal: dependencies conflict: ghc-7.0.3 requires containers ==0.4.0.0 however containers-0.4.0.0 was excluded because ghc-7.0.3 requires containers ==0.4.2.0 $ cabal install hpath Resolving dependencies... cabal: cannot configure HPath-0.0.2. It requires base >=2 && <=4 For the dependency on base >=2 && <=4 there are these packages: base-3.0.3.1 and base-3.0.3.2. However none of them are available. base-3.0.3.1 was excluded because of the top level dependency base -any base-3.0.3.2 was excluded because of the top level dependency base -any

On Thu, Mar 8, 2012 at 12:32, Tom Murphy
Neither of these errors makes any sense to me. What's happening?
At some point cabal installed a different version of a "boot library", one required for the correct operation of ghc itself. This tends to lead to bizarre error messages from cabal, and even more bizarre ones if you override cabal and try to build anyway. (Or, worse, no error messages from that but core dumps at runtime.)
cabal: dependencies conflict: ghc-7.0.3 requires containers ==0.4.0.0 however containers-0.4.0.0 was excluded because ghc-7.0.3 requires containers ==0.4.2.0
You have multiple versions of containers installed, and yi wants to use both of them. Unfortunately, cabal-install loves to report the conflict this way (I think it's bubbling the actual dependency backwards to ghc-7.0.3 instead of leaving it where it happened?).
cabal: cannot configure HPath-0.0.2. It requires base >=2 && <=4 For the dependency on base >=2 && <=4 there are these packages: base-3.0.3.1 and base-3.0.3.2. However none of them are available. base-3.0.3.1 was excluded because of the top level dependency base -any base-3.0.3.2 was excluded because of the top level dependency base -any
"base -any" here can be read as "base that came with your compiler"; it cannot be replaced. HPath apparently is not known to work with the version of base that came with your ghc, so cabal tries the versions of base that it will work with; but it can't replace the base package, and has that rather unfortunate way of notifying you so. I'm given to understand the unreleased version of cabal-install in the repository does a better job of explaining these kinds of things. As it is, it is *very* hair-tearing.... -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

cabal: dependencies conflict: ghc-7.0.3 requires containers ==0.4.0.0 however containers-0.4.0.0 was excluded because ghc-7.0.3 requires containers ==0.4.2.0
You have multiple versions of containers installed, and yi wants to use both of them. Unfortunately, cabal-install loves to report the conflict this way (I think it's bubbling the actual dependency backwards to ghc-7.0.3 instead of leaving it where it happened?).
I can't reproduce this one easily on my system currently. I can only say that I can produce a valid install plan for yi with ghc-7.0.3.
cabal: cannot configure HPath-0.0.2. It requires base >=2 && <=4 For the dependency on base >=2 && <=4 there are these packages: base-3.0.3.1 and base-3.0.3.2. However none of them are available. base-3.0.3.1 was excluded because of the top level dependency base -any base-3.0.3.2 was excluded because of the top level dependency base -any
"base -any" here can be read as "base that came with your compiler"; it cannot be replaced. HPath apparently is not known to work with the version of base that came with your ghc, so cabal tries the versions of base that it will work with; but it can't replace the base package, and has that rather unfortunate way of notifying you so.
Right.
I'm given to understand the unreleased version of cabal-install in the repository does a better job of explaining these kinds of things. As it is, it is *very* hair-tearing....
This is what you get for the HPath case when you use the modular solver. It's admittedly still not as polished as it could be, but I do think it's an improvement: $ cabal install --solver=modular HPath Resolving dependencies... cabal: Could not resolve dependencies: trying: HPath-0.0.2 (user goal) next goal: base (dependency of HPath-0.0.2) rejecting: base-3.0.3.2, 3.0.3.1 (global constraint requires installed instance) rejecting: base-4.3.1.0/installed (conflict: HPath => base>=2 && <=4) rejecting: base-4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0 (global constraint requires installed instance) So this tells you it's trying to find a version of base because HPath depends on it. It then tells you that all versions but base-4.3.1.0 are rejected because you can only use an already installed instance of base. But version base-4.3.1.0 is also rejected, because HPath depends on a version of base between 2 and 4. Cheers, Andres
participants (3)
-
Andres Löh
-
Brandon Allbery
-
Tom Murphy