I have installed version 8.6.5 of ghc
on my (Debian 9) system and that's the only version available (look below for the details). I'm trying to build this project: https://github.com/deech/fltkhs-themes-demo
So I've installed latest stack (Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2
) and try to compile the project:
git clone git@github.com:deech/fltkhs-themes-demo.git
cd fltkhs-themes-demo/
stack build --flag fltkhs:bundled
What I initially get is this:
Stack has not been tested with GHC versions above 8.6, and using 8.8.2, this may fail
Stack has not been tested with Cabal versions above 2.4, but version 3.0.1.0 was found, this may fail
asset-bundle > configure
Now, I have set ~/.stack/config.yaml
to system ghc:
% stack config set system-ghc --global true
/home/mark/.stack/config.yaml has been updated.
Settings appear to be correct:
% cat ~/.stack/config.yaml
templates:
params: null
system-ghc: true
So why is stack using ghc 8.8.2?
This is all the more bizarre because the project seems to use specified ghc version in its stack.yaml
:
cat fltkhs-themes-demo/stack.yaml
resolver: lts-15.0
allow-newer: true
extra-deps:
- fltkhs-0.8.0.3
- fltkhs-themes-0.2.0.3
- load-font-0.1.0.3
- asset-bundle-0.1.0.1
How do I make it use ghc 8.6.5?
More details about my system:
user@system ~ % ls -1 .ghcup/bin
cabal
ghc
ghc-8.6
ghc-8.6.5
ghci
ghci-8.6
ghci-8.6.5
ghc-pkg
ghc-pkg-8.6
ghc-pkg-8.6.5
ghcup
haddock
haddock-8.6
haddock-8.6.5
haddock-ghc
haddock-ghc-8.6
haddock-ghc-8.6.5
hp2ps
hp2ps-8.6
hp2ps-8.6.5
hpc
hpc-8.6
hpc-8.6.5
hsc2hs
hsc2hs-8.6
hsc2hs-8.6.5
runghc
runghc-8.6
runghc-8.6.5
runhaskell
runhaskell-8.6
runhaskell-8.6.5
user@system ~ % cabal --version
cabal-install version 3.0.0.0
compiled using version 3.0.0.0 of the Cabal library
user@system ~ % ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.5
user@system ~ % which ghc
/home/user/.ghcup/bin/ghc