I am attempting to build GHC from source following this page. When installing dependencies, I had to install happy
and alex
:
$ cabal install alex happy
Resolving dependencies...
Configuring alex-3.2.1...
Configuring happy-1.19.5...
Building happy-1.19.5...
Building alex-3.2.1...
Installed alex-3.2.1
Installed happy-1.19.5
yet when running configure
I get an error message:
$ ./configure
...
checking for happy... no
checking for version of happy...
configure: error: Happy version 1.19.4 or later is required to compile GHC.
I am running on Debian stretch
:
$ uname -a
Linux <host> 4.8.0-1-amd64 #1 SMP Debian 4.8.5-1 (2016-10-28) x86_64 GNU/Linux
Can anyone suggest an obvious step I could try to resolve this?
I suspect you simply don't have them on your PATH. Make sure to include something like
PATH="$HOME/.cabal/bin:$PATH"
in your .bashrc (or startup files for whatever shell you use). Installing them through the package manager simply installed them in a location that was already on your PATH.
Even if you have things working now, you should consider modifying your .bashrc while it's fresh in your head, as other cabal-install'd executables will get put there in the future.