[Haskell-cafe] cabal install... Trying to recover

Gregory Guthrie guthrie at mum.edu
Wed Nov 21 15:08:31 CET 2012

Thanks for the suggestion, I’ll do that. Here goes:

I deleted the ../user/appdata/roaming/ghc and ../cabal files, an uninstalled Haskell-platform. (No trace of anything "ghc" on the disk.)
Then reinstalled Haskell, and ran “cabal update”, it said there was a new cabal-install, but trying to install it fails (below), so I went ahead with the current version.
The error seems odd to me (cabal-install- depends on Cabal- which failed to install.), that an older version depends on a newer one?

So now I have; (from Windows - Haskell-platform 2012.4.0.0)
GHCi = The Glorious Glasgow Haskell Compilation System, version 7.4.2
Cabal = cabal-install version 0.14.0, using version 1.14.0 of the Cabal library

I then tried to reload all my previous packages, (all at once?!), but it fails, "out of memory" (w/8GB of memory!)
So I split it into sections, and tried the first one; it lists a lot of new installs, and then fails
  (full list at http://pastebin.com/5ywdUjgX)

The first chunk of installs gives this:
   cabal: The following packages are likely to be broken by the reinstalls:
   Use --force-reinstalls if you want to install anyway.

I don't understand how it can want to break the Haskell-platform, sounds dangerous!  

And the second this:
   G:\Cabal>cabal install Boolean Craft3e Craft3e GLFW GLURaw GLUT HTTP IORefCAS Me
   moTrie MonadCatchIO-mtl NumInstances ObjectName OpenGL OpenGLRaw QuickCheck SDL
   SHA StateVar Tensor abstract-deque abstract-par active aeson alex ansi-terminal
   array asn1-data attoparsec attoparsec-conduit base-unicode-symbols base64-bytest
   ring bits-atomic blaze-builder blaze-builder-conduit blaze-html blaze-markup bla
   ze-svg bmp buildwrapper byteorder cabal-dev case-insensitive cereal certificate
   clientsession cmdargs colour comonad conduit contravariant cookie cpphs cprng-ae
   s cpu criterion crypto-api crypto-conduit crypto-pubkey-types cryptocipher crypt
   ohash css-text data-default date-cache diagrams-core diagrams-lib diagrams-svg d
   list email-validate entropy erf failure fast-logger file-embed filepath filesyst
   em-conduit ghc-paths gloss gtk2hs-buildtools
   Resolving dependencies...
   In order, the following would be installed:
   Boolean-0.1.1 (new package)
   cabal: The following packages are likely to be broken by the reinstalls:
   Use --force-reinstalls if you want to install anyway.
So I have a typical situation where it won't install, and gives an option to –force, but that seems to lead to more problems?
Do I just have some packages which are intrinsically incompatible, and I have to choose between them?

Not sure how to proceed. Any help or hints appreciated!  :-)

> Cabal install cabal-install
  Configuring Cabal-
  Warning: This package indirectly depends on multiple versions of the same
  package. This is highly likely to cause a compile failure.
  package process- requires base-
  package pretty- requires base-
  package old-time- requires base-
  package old-locale- requires base-
  package filepath- requires base-
  package directory- requires base-
  package deepseq- requires base-
  package containers- requires base-
  package bytestring- requires base-
  package array- requires base-
  package Win32- requires base-
  package filepath- requires base-
  package Cabal- requires base-
  package Cabal- requires filepath-
  package process- requires filepath-
  package directory- requires filepath-
  package integer-gmp- requires ghc-prim-
  package bytestring- requires ghc-prim-
  package base- requires ghc-prim-
  package integer-gmp- requires ghc-prim-
  package base- requires ghc-prim-
  package base- requires integer-gmp-
  package base- requires integer-gmp-
  Building Cabal-
  Preprocessing library Cabal-
  <command line>: cannot satisfy -package-id array-
      (use -v for more information)
  cabal: Error: some packages failed to install:
  Cabal- failed during the building phase. The exception was:
  ExitFailure 1
  cabal-install- depends on Cabal- which failed to install.

(more -v details at: http://pastebin.com/Y2BuMjBP )
From this email and some of the previous emails it seems that your package DB is in a pretty bad state, most likely from using --force-reinstalls. When Cabal warns you that this will break stuff it actually means it. :) My suggestion is that you

    rm -rf  ~/.ghc/x86_64-linux-7.6.1  # or equivalent on your system.

Then reinstall all the packages you want by listing them all at once

    cabal install pkg1 pkg2 pk3

By listing them all together cabal-install tries to come up with an install plan that is globally consistent for all of them.

-- Johan

More information about the Haskell-Cafe mailing list