Ticket #349 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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

Reported by: ganesh Owned by: duncan
Priority: high Milestone: Cabal-1.6
Component: cabal-install tool Version:
Severity: major Keywords:
Cc: ganesh@…, Deewiant Difficulty: hard (< 1 day)
GHC Version: 6.9 Platform:

Description

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

Attachments

package.conf Download (72.5 KB) - added by ganesh 5 years ago.
Global package.conf file in use when cabal install hung
package.conf.min Download (1.3 KB) - added by guest 5 years ago.
minimal package.conf exhibiting the problem

Change History

Changed 5 years ago by ganesh

Global package.conf file in use when cabal install hung

Changed 5 years ago by guest

minimal package.conf exhibiting the problem

Changed 5 years ago by guest

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

Changed 5 years ago by duncan

  • priority changed from normal to high
  • summary changed from cabal install hangs using CPU when resolving dependencies on ghc 6.9.20080907 to cabal install hangs using CPU when resolving dependencies on ghc 6.9

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.

Changed 5 years ago by ganesh

  • cc ganesh@… added

Changed 5 years ago by Deewiant

  • cc Deewiant added
  • severity changed from normal to major
  • summary changed from cabal install hangs using CPU when resolving dependencies on ghc 6.9 to cabal install hangs using CPU when resolving dependencies on ghc 6.9 and 6.10

Affects GHC 6.10 as well, of course.

Changed 5 years ago by duncan

  • owner set to duncan
  • difficulty changed from normal to hard (< 1 day)
  • summary changed from cabal install hangs using CPU when resolving dependencies on ghc 6.9 and 6.10 to cabal-install always finds conflicting dependencies between base 3 and 4 on ghc 6.9 and 6.10
  • milestone set to Cabal-1.6

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

Thu Sep 25 11:14:41 PDT 2008  Andrea Vezzosi <sanzhiyan@gmail.com>
  * 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.

Changed 5 years ago by duncan

  • status changed from new to closed
  • resolution set to fixed

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.

Note: See TracTickets for help on using tickets.