Reputation: 3740
I have a project that I want to compile with LTS 2, but I'm stuck trying to work around this well-known bug in OS X 10.11.
Can I somehow specify a newer version of Cabal
to use with ghc-7.8.4
? Note that the project only really compiles with GHC 7.8.*.
Edit:
Really meant Cabal
, not cabal-install
.
Edit 2:
Actually, the answer to this question doesn't really solve my concrete problem (compiling helium
, which requires GHC <= 7.8.4), because the bug is not specific to Cabal
, but rather to unix
, which GHC < 7.10 depends upon.
Upvotes: 3
Views: 165
Reputation: 3740
As noted in Michael Snoyman's comment, there is stack setup --upgrade-cabal
to do just that. That's it for the answer to this question.
In my specific case (XY problem), for that to work I had to do the usual work-around for that El Capitano related bug, which is explained here. So I enabled rootless, ran the upgrade command and re-enabled rootless.
To no avail I'm afraid: The bug is specific to unix < 2.7.1.0
, which GHC 7.8.4 also depends on. So even after upgrading cabal, I can't compile anything in lts-2 unless I disable rootless, which is pretty annoying.
Actually it's kinda depressing that the GHC folks decided not to file a new minor release with the updated unix
package. This means that no realistic/recent OS X configuration can build anything which involves GHC < 7.10.
Upvotes: 1
Reputation: 52059
Here's a recipe for installing ghc-7.8.4 into the directory of your choice:
$HOME/my-prefix
.In the scratch directory run:
$ ./configure --prefix=$HOME/my-prefix
$ make install
Now ghc may be found in $HOME/my-prefix/bin
.
Upvotes: 1
Reputation: 2565
I think the problem is related not just to Cabal
library version (btw, stack doesn't use or need cabal-install
), but also to GHC version. Stack's FAQ mentions an item about this error, but I think it didn't help for me and I just upgraded to 7.10.2 at the time.
Upvotes: 1