Skip to content

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

Closed

Description

@bos

(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

Activity

  1. ghost assigned on May 24, 2012
  2. bos commented on May 24, 2012

    @bos
    ContributorAuthor

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

    Global package.conf file in use when cabal install hung

  3. bos commented on May 24, 2012

    @bos
    ContributorAuthor

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

    minimal package.conf exhibiting the problem

  4. bos commented on May 24, 2012

    @bos
    ContributorAuthor

    (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

  5. bos commented on May 24, 2012

    @bos
    ContributorAuthor

    (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.

  6. bos commented on May 24, 2012

    @bos
    ContributorAuthor

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

    Affects GHC 6.10 as well, of course.

  7. bos commented on May 24, 2012

    @bos
    ContributorAuthor

    (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.
  8. bos commented on May 24, 2012

    @bos
    ContributorAuthor

    (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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions