HuwCampbell/grenade

cabal collisions during install

madjestic opened this issue · 1 comments

Hey guys,

I am trying to build grenade by running ./mafila build and I am getting the following error:

$ ./mafia build
...
transformers-bifunctors-0.1 (via: mafia-0.0.1 mafia-0.0.1) (new package)
transformers-either-0.0.1 (latest: 0.1.1) (via: mafia-0.0.1 mafia-0.0.1) (new package)
mafia-0.0.1 (new package)
cabal: The following packages are likely to be broken by the reinstalls:
yaml-0.10.1.1
hlint-2.0.15
ghc-mod-5.8.0.0
libmpd-0.9.0.8
xmonad-extras-0.14
darcs-2.14.1
aeson-1.1.2.0
graphviz-2999.20.0.2
Use --force-reinstalls if you want to install anyway.
mafia version (fd85bf858719324e256ec178fd889a6752935b1d) could not be built.

How can I force the build script to use --force-reinstalls, or is there another workaround?

Thanks,
Vlad

Hi,
It's likely that you've installed packages into your global package cache (i.e., you haven't been using sandboxes).

Type

ghc-pkg list --user

There ideally shouldn't be anything in there (maybe Cabal depending on your GHC version). If there is, it's best to unregister them.

ghc-pkg list --user | grep -v 'package.conf.d' | grep -v 'Cabal-' | xargs ghc-pkg unregister

See https://github.com/haskell-mafia/mafia/blob/master/docs/installing-cabal.md for more info.