[Haskell-cafe] cabal-install problem with alex dependency in bytestring-lexing

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Fri Mar 16 12:28:30 CET 2012

On 16 March 2012 21:56, Erik de Castro Lopo <mle+hs at mega-nerd.com> wrote:
> Joachim Breitner wrote:
>> no, cabal-install does not automatically install build-tools at all,
>> only Cabal checks them for compilation. I guess the reason is that
>> build-tools needs to be put on the PATH, and that is beyond the scope of
>> cabal-install.
> This is rather sub-optimal.

It is, but the only way it would work is for cabal-install be much
closer to a _real_ package management system:

* Needs to keep track of installed packages.  This is achieved in
recent versions with a ~/.cabal/world file.

* Keep track of which versions are installed.  The world file states
which versions it was *told* to install, not which are currently
installed.  For libraries, it doesn't matter: it gets that information
from ghc-pkg.  For binaries, this doesn't work (since there's no
required standard for version reporting in Haskell build-tools).

* Ensure that binaries are installed to somewhere in the PATH (not
possible AFAIK).

One trivial solution is to assume ~/.cabal/bin is on the PATH and to
ignore system-wide packages, which I think is even *more* sub-optimal
(why install a new version of alex when it's already available?).

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list