0
votes

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?

1
GHC-7.0.1 already has Cabal-1.10.0.0, you don't want to downgrade it as it is twinned to that version of GHC. Are you really wanting cabal-install? I think you'll need to wait until a new version is released, there should be a new version soon (i.e this month) as it is needed for the release candidate of the next version of the Platform.stephen tetley
@stephen, if cabal comes with GHC can you tell me how to 'enable' the command line client? I'm attempting to install xmonad on my system.Casey Flynn
Hi Casey. The command line client is "cabal-install". Although GHC ships with a twinned version of the cabal libraries, "cabal-install" is a bigger program than just an executable on top of the cabal libraries so doesn't get released until a few weeks after GHC. If you primarily want xmonad, you are best of using the Haskell-Platform, so you have to drop back to GHC 6.12.4 (or wait for the next platform release which I think is scheduled for January).stephen tetley
Thanks @stephen tetley, I just using the GHC Uninstall tool and I'm downloading the haskell-platform-2010.2.0.0 Hopefully this will let me make more progress :)Casey Flynn

1 Answers

1
votes

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.