Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haskell stack cant find installed ghc

A project that already has been set up is unable to find the GHC. Stack build results in:

No compiler found, expected minor version match with ghc-8.0.2 (x86_64-ncurses6-nopie)
(based on resolver setting in /home/iam/Work/has/grove/stack.yaml).
To install the correct GHC into /home/iam/.stack/programs/x86_64-linux/, try running "stack
setup" or use the "--install-ghc" flag. To use your system GHC installation,
run "stack config set system-ghc --global true", or use the "--system-ghc" flag.

Stack setup results in:

Unable to find installation URLs for OS key: linux64-ncurses6-nopie
However, in .stack-work, in the install file there is a folder called x86_64-linux-ncurses6,
not linux64-ncurses6-nopie

Stack was installed by pacman. Version 1.4.0 x86_64, the project is using resolver: lts-8.21

like image 917
pricks Avatar asked Jul 14 '17 02:07

pricks


People also ask

Where does stack install GHC?

You can find these sandboxed GHC installations in the ghc-* directories in the stack path --programs directory. If you would like Stack to use your system GHC installation, use the --system-ghc flag or run stack config set system-ghc --global true to make Stack check your PATH for a suitable GHC by default.

Where is Haskell stack installed?

Stack-built files generally go in either the Stack root directory (default: ~/. stack on Unix-like operating systems, or, %LOCALAPPDATA%\Programs\stack on Windows) or ./. stack-work directories local to each project. The Stack root directory holds packages belonging to snapshots and any Stack-installed versions of GHC.

Where does Ghcup install GHC?

Installation. The following commands will download the ghcup binary into ~/. ghcup/bin (or C:\ghcup\bin on windows) and then run it to interactively install the Haskell Toolchain.


1 Answers

This issue is known upstream. (https://github.com/commercialhaskell/stack/issues/3268). As suggested in this issue, installing libtinfo from AUR helps, since there is a tinfo-nopie bindist of GHC. I have not yet run into the problems reported by TimoFreiberg (who is working on providing an ncurses6-nopie bindist) in this issue report.

like image 84
fmorgner Avatar answered Sep 22 '22 08:09

fmorgner