Question

I'm attempting to build/install Cabal on my system and I'm running into the following dependency error:

SDGL0990Z464C:Cabal-1.8.0.4 cflynn$ ghc --make Setup
SDGL0990Z464C:Cabal-1.8.0.4 cflynn$ ./Setup configure
Configuring Cabal-1.8.0.4...
Setup: At least the following dependencies are missing:
base >=4 && <3 && >=1 && <5, filepath >=1 && <1.2

I have GHC 7.0.1 installed, as far as I know GHC 6.6.1 and later come with the 'filepath' package? And I'm unclear on exactly what 'base' is referring to?

Was it helpful?

Solution

GHC ships with a certain set of libraries already installed. When you run the build command above cabal wants to "reinstall" some older versions of the libraries that ship with GHC. This is bad for obvious reasons.

If you really need to do this, it may work to use cabal-dev instead of Cabal. By the way, using Setup.hs invokes the version of the Cabal library that shipped with your compiler, where as running the cabal command invokes the cabal-install program.

cabal-dev is a wrapper around cabal-install (and thus Cabal the library) that provides sandboxed builds. Making it safe to install programs that need different versions of the libraries that ship with GHC. The remaining question would be whether or not those older libraries would build against the newer GHC. In many cases the build will fail.

I highly recommend you use cabal-dev for your day-to-day package building instead of cabal-install. The benefits of sandboxing are many and strongly outweigh the risk of cabal-install corrupting your package database by upgrading a package somewhere in the middle of a dependency chain for something you already have installed.

For more information about using cabal-dev, I recommend this reddit post.

base is a set of Haskell modules that provide much of the functionality that ships with every GHC install. It's a collection of useful libraries that most Haskell users will want and need.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top