ghcup fails on Ubuntu 20.04.2 LTS with `NonZeroExit 2 "make" ["install"]`
I just tried running ghcup on my Ubuntu box, but got an install error:
> curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
Welcome to Haskell!
This script will download and install the following binaries:
* ghcup - The Haskell toolchain installer
(for managing GHC/cabal versions)
* ghc - The Glasgow Haskell Compiler
* cabal - The Cabal build tool
ghcup installs only into the following directory,
which can be removed anytime:
/home/skainswo/.ghcup
Press ENTER to proceed or ctrl-c to abort.
Note that this script can be re-run at any given time.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 20.2M 100 20.2M 0 0 3467k 0 0:00:05 0:00:05 --:--:-- 3609k
[ Info ] Upgrading GHCup...
[ Warn ] No GHCup update available
System requirements
Please install the following distro packages: build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
Press ENTER to proceed or ctrl-c to abort.
Installation may take a while.
[ Info ] downloading: https://downloads.haskell.org/~ghc/8.10.4/ghc-8.10.4-x86_64-fedora27-linux.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 207M 100 207M 0 0 3577k 0 0:00:59 0:00:59 --:--:-- 3621k
[ Info ] verifying digest of: ghc-8.10.4-x86_64-fedora27-linux.tar.xz
[ Info ] Unpacking: ghc-8.10.4-x86_64-fedora27-linux.tar.xz to /tmp/ghcup-ffaHKo
[ Info ] Installing GHC (this may take a while)
[ ghc-make ] "rm" -f libraries/ghc-boot/dist-install/build/GHC/Platform/Host.hs
[ ghc-make ] done.
[ ghc-make ] "inplace/bin/mkdirhier" libraries/ghc-boot/dist-boot/build/GHC//.
[ ghc-make ] mkdir: ./libraries/ghc-boot/dist-boot/build/GHC//.: No such file or directory (os e...
[ ghc-make ] make[1]: *** [ghc.mk:367: libraries/ghc-boot/dist-boot/build/GHC//.] Error 1
[ ghc-make ] make: *** [Makefile:51: install] Error 2
[ Error ] BuildFailed failed in dir "/tmp/ghcup-ffaHKo": NonZeroExit 2 "make" ["install"]
Check the logs at "/home/skainswo/.ghcup/logs" and the build directory "/tmp/ghcup-ffaHKo" for more clues.
Make sure to clean up "/tmp/ghcup-ffaHKo" afterwards.
"_eghcup --cache install ghc recommended" failed!
Attached are the contents of /home/skainswo/.ghcup/logs.
And here are the contents of /tmp/ghcup-ffaHKo (split into parts to make GitLab happy):
(Sorry, so many files!)