Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal-install always finds conflicting dependencies between base 3 and 4 on ghc 6.9 and 6.10 #342

Closed
bos opened this issue May 24, 2012 · 7 comments

Comments

@bos
Copy link
Contributor

bos commented May 24, 2012

(Imported from Trac #349, reported by ganesh on 2008-09-07)

Built GHC from HEAD, and cabal install (built with a previous GHC) hangs eating CPU and producing no output after "Resolving dependencies...", apparently for any package.

e.g.

cabal install -v rmonad --global --root-cmd=sudo

Global package.conf file attached. dcoutts suspects that the base3/base4 thing might be the cause.

ganesh@defoe:~$ cabal --version
cabal-install version 0.5.2
using version 1.4.0.2 of the Cabal library

@ghost ghost assigned dcoutts May 24, 2012
@bos
Copy link
Contributor Author

bos commented May 24, 2012

(Imported comment by ganesh on 2008-09-07)

Global package.conf file in use when cabal install hung

@bos
Copy link
Contributor Author

bos commented May 24, 2012

(Imported comment by guest on 2008-09-07)

minimal package.conf exhibiting the problem

@bos
Copy link
Contributor Author

bos commented May 24, 2012

(Imported comment by guest on 2008-09-14)

I tested with the attached package.conf.min and a minimal package without any modules that just depends on base, and without downloading the hackage.org package database.

It is indeed the base4/base3 thing; if the dependence of base-3.0.3.0 on base-4.0 is removed, everything works fine (at least as fine as it can with a broken package config like this).

-- int-e

@bos
Copy link
Contributor Author

bos commented May 24, 2012

(Imported comment by @dcoutts on 2008-09-14)

We need to fix this one. Unfortunately it's a lot harder than just resolving this infinite loop. Just fixing that would give us the result that instead of looping it'd fail to find a solution, more or less every time. That's because the current resolver is looking for a solution that uses each package at most once and the base 3 - 4 thing breaks that assumption.

@bos
Copy link
Contributor Author

bos commented May 24, 2012

(Imported comment by Deewiant on 2008-09-18)

Affects GHC 6.10 as well, of course.

@bos
Copy link
Contributor Author

bos commented May 24, 2012

(Imported comment by @dcoutts on 2008-10-03)

The current darcs version of cabal-install fixes the hanging bug, thanks to Saizan.

Thu Sep 25 11:14:41 PDT 2008  Andrea Vezzosi <[email protected]>
- Fix infinite loop in the TopDown dependency resolver
  The loop occurred only if a package depended on another one
  with the same name, e.g. base-3.0.3.0 <\- base-4.0.0.0
  
Of course the resolver is still broken with base 3 and 4. I've been working on that part yesterday and today and I think it's fixable. Changing the summary to reflect the remainder of the problem.

@bos
Copy link
Contributor Author

bos commented May 24, 2012

(Imported comment by @dcoutts on 2008-10-03)

Fixed.

It no longer finds that it's a conflict. However to have it actually pick base 3 for most packages you need to modify your 00-index.tar file to contain a file preferred-versions that looks like:

base < 4
Eventually this will be in the standard index downloaded from hackage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants