Unable to compile ghc-8.2.2 with ghc-8.4.3

Sam Halliday sam.halliday at gmail.com
Wed Aug 22 10:15:53 UTC 2018


Hello all,

I am unable to compile ghc-8.2.2 with ghc-8.4.3 (which is otherwise
working fine, e.g. to compile my own projects and xmonad). Could
somebody please help? The error I get is

ghc-cabal: Encountered missing dependencies:
base >=4.4.1 && <4.11
libraries/hpc/ghc.mk:3: libraries/hpc/dist-boot/package-data.mk: No
such file or directory
make[1]: *** [libraries/hpc/ghc.mk:3:
libraries/hpc/dist-boot/package-data.mk] Error 1
make: *** [Makefile:123: all] Error 2

I should give some background as to why I'm doing this: I am trying to
build a back catalogue of ghc installations because the older binary
downloads from haskell.org give me linking errors and I've lost faith
in Archlinux's ability to package ghc.

I plan on using these builds of ghc in stack, instead of their
binaries. I don't like downloading binaries. I'd rather build them
from source. I will also create a docker image for my own CI purposes.

I'm using this script, but it's just a formalisation of the ghc
installation instructions to help me automate the process.

  https://gitlab.com/fommil/ghc-env/blob/master/bin/ghc-env

I am on Archlinux, which (I'm sure many of you know) has a very broken
concept of ghc. I already lost 2 hours today because Archlinux broke
my ~/.ghc, and therefore xmonad was unable to start and this locked me
out of my desktop. I plan on using NixOS in the future. From a fresh
OS install I do

  pacman -S ghc-static cabal-install

to get me ghc 8.4.3 and the cabal CLI. From here I download and
compile ghc 8.4.3 and cabal-install with

  ghc-env compile 8.4.3
  cabal install cabal-install xmonad xmonad-contrib

and now I can delete Arch's versions of ghc (yay!).

But from here, if I try to compile ghc 8.2.2 (with a view to compile
all the way back to the 7.x series) I get the failure at the top.

An alternative solution would be if there were instructions for a
fabled "phase0" compile, which doesn't require a ghc bootstrap. Does
anybody know anything about that?


Best regards,
Sam


More information about the Glasgow-haskell-users mailing list