[Haskell-cafe] One problem with Cabal-install and dependencies
lazarev.michael at gmail.com
Sun Jul 4 08:39:05 EDT 2010
I think there's either an error in cabal-install, or I don't have an
idea on haskell packages.
I tried to install one particular library that depends on
containers-0.2.0.1 and got the following error:
Could not find module `Data.Data':
It is a member of the hidden package `base'.
Perhaps you need to add `base' to the build-depends in your .cabal file.
Use -v to see a list of the files searched for.
Then I tried to install containers-0.2.0.1 separately, andin the
process of the struggle I found that issuing the following command in
~/.cabal/bin/cabal install --constraint="base >= 4" -v
... prints this:
selecting containers-0.2.0.1 (hackage)
selecting array-0.3.0.1 (installed or hackage) and discarding array-0.1.0.0,
0.2.0.0 and 0.3.0.0
selecting base-220.127.116.11 (installed) and 18.104.22.168 (installed) and discarding
syb-0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.2 and 0.2.1
selecting ffi-1.0 (installed)
selecting ghc-prim-0.2.0.0 (installed)
selecting integer-gmp-0.2.0.1 (installed)
selecting rts-1.0 (installed)
selecting syb-0.1.0.2 (installed)
In order, the following would be installed:
containers-0.2.0.1 (new version)
Dependency array ==0.3.0.1: using array-0.3.0.1
Dependency base ==22.214.171.124: using base-126.96.36.199
And proceeds to building the library:
/usr/local/bin/ghc --make -package-name containers-0.2.0.1
-hide-all-packages -fbuilding-cabal-package -i -idist/build -i.
-idist/build/autogen -Idist/build/autogen -Idist/build -Iinclude
-optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build
-hidir dist/build -stubdir dist/build -package-id
base-188.8.131.52-260693a92016991a03206b5a55f6a411 -O -XDeriveDataTypeable
-XMagicHash -XRank2Types -XCPP Data.Graph Data.IntMap Data.IntSet
Data.Map Data.Sequence Data.Set Data.Tree
where, as you see, it really uses base-184.108.40.206, and thus fails.
So, my qusetion is, whether I'm doing something wrong, or there are
really two errors:
1) cabal-install makes a wrong choice for dependency version
2) cabal-install does not respect the constraint, and proceeds to
building the library without any warning
More information about the Haskell-Cafe