开发者

How do I troubleshoot cabal-install errors for the vector-algorithms package, darcs, and others?

$ ghc -V; cabal -V
The Glorious Glasgow Haskell Compilation System, version 7.0.1
cabal-install version 0.8.2
using version 1.8.0.6 of the Cabal library 

Here's the error:

$ cabal install vector-algorithms
Resolving dependencies...
Configuring vector-algorithms-0.3.4...
Preprocessing library vector-algorithms-0.3.4...
Building vector-algorithms-0.3.4...
[1 of 9] Compiling Data.Vector.Algorithms.Common ( Data/Vector/Algorithms/Common.hs, dist/build/Data/Vector/Algorithms/Common.o )
[2 of 9] Compiling Data.Vector.Algorithms.Radix ( Data/Vector/Algorithms/Radix.hs, dist/build/Data/Vector/Algorithms/Radix.o )
[3 of 9] Compiling Data.Vector.Algorithms.Search ( Data/Vector/Algorithms/Search.hs, dist/build/Data/Vector/Algorithms/Search.o )
[4 of 9] Compiling Data.Vector.Algorithms.Optimal ( Data/Vector/Algorithms/Optimal.hs, dist/build/Data/Vector/Algorithms/Optimal.o )
[5 of 9] Compiling Data.Vector.Algorithms.Insertion ( Data/Vector/Algorithms/Insertion.hs, dist/build/Data/Vector/Algorithms/Insertion.o )
[6 of 9] Compiling Data.Vector.Algorithms.TriHeap ( Data/Vector/Algorithms/TriHeap.hs, dist/build/Data/Vector/Algorithms/TriHeap.o )
[7 of 9] Compiling Data.Vector.Algorithms.Intro ( Data/Vector/Algorithms/Intro.hs, dist/build/Data/Vector/Algorithms/Intro.o )
[8 of 9] Compiling Data.Vector.Algorithms.Merge ( Data/Vector/Algorithms/Merge.hs, dist/build/Data/Vector/Algorithms/Merge.o )
[9 of 9] Compiling Data.Vector.Algorithms.Combinators ( Data/Vector/Algorithms/Combinators.hs, dist/build/Data/Vector/Algorithms/Combinators.o )

Data/Vector/Algorithms/Combinators.hs:36:23:
    Couldn't match type `forall s1. ST s1 (Mutable v s1 e)'
                   with `ST s (mv s e)'
    In the second argument of `(.)', namely `N.New'
    In the expression: new . N.New
    In the expression:
      (new . N.New)
        (M.unstream (stream v) >>= \ arr -> algo arr >> return arr)
cabal: Error: some packages failed to install:
vector-algorithms-0.3.4 failed during the building phase. The exception was:
ExitFailure 1

I also noticed that when I installed cabal-install it installed process-1.0.1.4, random-1.0.0.3, Cabal-1.8.0.6, and the time-1.2.0.3 packages which were already present in the global package database. For example, trying to install darcs and other packages I receive the following:

Resolving dependencies...
<command line>: cannot satisfy -package Cabal-1.10.0.0: 
    Cabal-1.10.0.0-30b3f082077a2793c432ea426276c8f9 is unusable due to missing or recursive dependencies:
      process-1.0.1.4-b476e45706840d55749b12ebe18dc835
    (use -v for more information)
cabal: Error: some packages failed to install:

I tried ghc-pkg unregister for all the dups, but that didn't help. I also tried ghc-pkg check and that doesn't return anything, ever. I tried starting over, removing all the local databases including $HOME/.cabal/, then reinstalling cabal-install and this is where I'm currently at. This is the result after removing everything, and reinstalling cabal-install:

$ ghc-pkg list
/usr/local/lib/ghc-7.0.1/package.conf.d:
    Cabal-1.10.0.0
    array-0.3.0.2
    base-4.3.0.0
    bin-package-db-0.0.0.0
    bytestring-0.9.1.8
    containers-0.4.0.0
    directory-1.1.0.0
    extensible-exceptions-0.1.1.2
    ffi-1.0
    filepath-1.2.0.0
    (ghc-7.0.1)
    (ghc-binary-0.5.0.2)
    ghc-prim-0.2.0.0
    (haskell2010-1.0.0.0)
    haskell98-1.1.0.0
    hpc-0.5.0.6
    integer-gmp-0.2.0.2
    old-locale-1.0.0.2
    old-time-1.0.0.6
    pretty-1.0.1.2
    process-1.0.1.4
    random-1.0.0.3
    rts-1.0
    template-haskell-2.5.0.0
    time-1.2.0.3
    unix-2.4.1.0

/home/moisei/.ghc/x86_64-linux-7.0.1/package.conf.d:
    Cabal-1.8.0.6
    HTTP-4000.1.0
    ListLike-1.1.0
    MonadCatchIO-transformers-0.2.2.2
    PSQueue-1.1
    attoparsec-0.8.2.0
    attoparsec-iteratee-0.1.2
    binary-0.5.0.2
    bytestring-mmap-0.2.1
    bytestring-nums-0.3.2
    bytestring-show-0.3.4
    cere    containers-0.3.0.0
    deepseq-1.1.0.2
    directory-1.0.1.2
    directory-tree-0.9.1
    dlist-0.5
    filepath-1.1.0.4
    haskell98-1.1.0.0
    iteratee-0.3.6
    monads-fd-0.1.0.2
    mt开发者_JS百科l-1.1.1.0
    mtl-2.0.1.0
    murmur-hash-0.1.0.2
    network-2.2.1.10
    network-2.3
    network-bytestring-0.1.3.2
    parsec-2.1.0.1
    primitive-0.3.1
    process-1.0.1.4
    random-1.0.0.3
    template-haskell-2.5.0.0
    text-0.10.0.0
    time-1.1.4
    transformers-0.2.2.0
    unix-compat-0.2
    vector-0.7.0.1
    zlib-0.5.2.0


These aren't cabal errors. The vector package doesn't build out of the box with GHC 7 (yet). You're an early adopter, jumping on GHC 7 before the Haskell Platform version is released.

As an early adopter, your duty is to report build errors to package maintainers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜