Attempting to travel through the entirety of Cabal dependency hell in 12.04 precise build of Ubuntu, and I have been making slow progress.
My first bash command
cabal install --allow-newer
yields the following message at the bottom of a long list of new packages:
cabal: The following packages are likely to be broken by the reinstalls: regex-posix-0.95.1 regex-compat-0.95.1 Use `--force-reinstalls` if you want to install anyway.
(NOTE: A force reinstall was never ran.)
How can I fix these packages and finish the process of installing cabal? I must stay in 12.04 and cabal has been updated.
cabal install ad --reorder-goals
ended up getting it to install.
However I am still not out of cabal hell, as I now have to deal with:
cabal: At least the following dependencies are missing: aeson -any, json-schema -any, monad-logger -any, mtl -any, persistent -any, persistent-postgresql ==2.1.6, persistent-template -any, rest-core -any, rest-snap -any, snap-core -any, snap-server -any, text -any"
when I attempt to execute cabal build
UPDATE: The dependencies needed list has shrunk to: monad-logger, persistent, (Fine name for a cabal installer.) persistant-postgresql == 2.1.6 'persistent-template rest-snap snap-core snap-server
So aside from persistant-postgresql any version will work.
Update 2 : Good news though, Running sudo apt-get install libghc-zlib-dev
Uncovers an interesting roadblock.
While trying as suggested in one of the answers in this question : Question
to install libghc-zlib-bindings-dev, which installed fine, and libghc-zlib-dev.
The zlib is the dependency that is in the way right now. Once that installs progress will continue.
Current warning on the libghc-zlib-dev
install attempt :
warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8 are supported and installed on your system.
also
perl: warning : Falling back to the standard locale ("C").
displayed.
Perhaps this can help us dig deeper into the investigation.
Trudge out of cabal hell we must.
Pretty sure this is the place to plant the red flag :
#include "zlib.h"
^
compilation terminated. setup-Simple-Cabal-1.22.2.0-x86_64-linux-ghc-7.10.1: Missing dependency on > a foreign library: * Missing (or bad) header file: zlib.h * Missing C library: z
Man I wish this site would have auto Ctrl - C Ctrl -V formating, how awesome would that be?
It looks like you're trying to build just a single package, and the issue is that it has many dependencies.
The best way to install all the dependencies (since a "build" unlike an "install" won't find a solution to installing them all for you) is just to (preferably in a sandbox) run cabal install --dependencies-only
. This will also solve them all simultaneously, rather than one-by-one where incompatible local choices may be made...