Refuse to use Anaconda's GCC
It turns out that installing GHC with ghcup
results in a broken installation when Anaconda is installed. The problem is that Anaconda apparently doesn't install gmp
by default and apparently Anaconda's GCC is apparently unable to find it even if it is installed.
Since Anaconda is a fairly widely-used project we should ensure that ghcup
handles this somewhat gracefully.
I see two ways forward here:
- Teach ghcup to simply fail if it finds an Anaconda GCC, telling the user to specify a usable toolchain, or
- Teach
ghcup
to specify the explicit path togcc
(andld
, etc.) when running the GHC bindistconfigure
script. I can see a few approaches to locate these tools:- specify these paths in the distribution metadata
- do a search of
PATH
looking for an acceptable toolchain
There is also a related GHC bug (#18908) here since the bindist configure
script really ought to fail if CC
is unable to linker against gmp
if the bindist was built to use GMP.
Edited by Ben Gamari