[Haskell-beginners] cabal trouble(s!)

Gregory Guthrie guthrie at mum.edu
Wed Jun 13 19:23:05 CEST 2012

I have lots of problems with cabal - not sure why or how to correct them.
ghc-pkg check reports tons of issues, but all seem to be haddock-html, which doesn't sound too serious, or haddock-interfaces.
   Warning: haddock-html: C:\Users\guthrie\AppData\Roaming\cabal\doc\wxdirect-\html doesn't exist or isn't a directory

Cabal install errors, For example;
   C:\Users\guthrie>cabal install gloss-examples
   Resolving dependencies...
   Configuring gloss-raster-
   Building gloss-raster-
   Preprocessing library gloss-raster-
   [1 of 2] Compiling Graphics.Gloss.Raster.Array ( Graphics\Gloss\Raster\Array.hs, dist\build\Graphics\Gloss\Raster\Array.o )
   Warning: Couldn't figure out LLVM version!
         Make sure you have installed LLVM
   ghc.exe: could not execute: opt

What is LLVM, and do/how I need to install it?

and another (of many) - perhaps unrelated:
C:\Users\guthrie\AppData\Roaming\cabal\bin>cabal install wxc
   Resolving dependencies...
   <command line>: cannot satisfy -package Cabal-
    Cabal- is unusable due to missing or recursive dependencies:
      array- base-
   346843c4a12b63f44b containers- directory
   - filepath-
   f2b9acf1ea1 old-time- pretty-
   7c632374e50e1c1927987c2651f0f process-
       (use -v for more information)
   cabal: Error: some packages failed to install:
   wxc- failed during the configure step. The exception was:
   ExitFailure 1

Trying to resolve them:
   C:\Users\guthrie\AppData\Roaming\cabal\bin>cabal install base
   Resolving dependencies...
   cabal: internal error: impossible

I've had several others, not sure if they are package specific issues, or some larger issue with cabal and libraries.
So I tried to fix them from a suggestion in SO; delete the ~/ghc & ~/cabal files and restart cabal, by a "cabal install cabal-install".

It gives:
   C:\Users\guthrie>cabal install cabal-install
  Resolving dependencies...
  In order, the following would be installed:
   deepseq- (reinstall) changes: array- ->
   containers- (reinstall) changes: array- ->
   old-time- (new version)
   directory- (reinstall) changes: filepath- ->,
   old-time- ->
   cabal: The following packages are likely to be broken by the reinstalls:
   Use --force-reinstalls if you want to install anyway.

Lots of things there that I don't want to break, but not sure how to proceed.
Even trying a -force-reinstall just gives more errors and failures...

Running ghc 7.4.1, and Haskell platform 2012.2.0.0, cabal reports: cabal-install version 0.14.0, using version 1.14.0 of the Cabal library.

More information about the Beginners mailing list