[Haskell-cafe] How to direct cabal to use an alternative ghc version, ala stack?

Michael Snoyman michael at snoyman.com
Thu Sep 3 03:59:09 UTC 2015

On Thu, Sep 3, 2015 at 3:37 AM, David Banas <capn.freako at gmail.com> wrote:

> Hi all,
> How do I direct cabal to use an alternative (i.e. - not my system’s
> default) version of ghc, which I’ve installed, via stack?
> I tried this:
> stack exec cabal install ...
> but got this:
> cabal: Use of GHC's environment variable GHC_PACKAGE_PATH is incompatible
> with
> Cabal. Use the flag --package-db to specify a package database (it can be
> used
> multiple times).
> Thanks,
> -db
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
We have a flag to working better with cabal, you can try:

    stack exec --no-ghc-package-path -- cabal install

I'm under the impression that there are changes planned to cabal (possibly
already implemented but not released) that will allow it to function nicely
with the GHC_PACKAGE_PATH environment variable, but I'm uncertain if that's

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150903/0b09c186/attachment.html>

More information about the Haskell-Cafe mailing list