2

Can someone explain why stack setup 7.10.3 only installs 7.10.2?

john@john-3-11:~$ stack setup 7.10.3
Already downloaded.                 
Installed GHC.     
Would add the following to PATH: /home/john/.stack/programs/x86_64-linux/ghc-7.10.2/bin
john@john-3-11:~$ ls /home/john/.stack/programs/x86_64-linux/
ghc-7.10.2  ghc-7.10.2.installed  ghc-7.10.2.tar.xz

This is an issue because I am trying to install iHaskell:

john@john-3-11:~$ stack install ihaskell-0.8.3.0
Using resolver: lts-5.0 from global config file: /home/john/.stack/global/stack.yaml
GHC version mismatched, found 7.10.2 (x86_64), but expected version 7.10.3 (x86_64) (based on resolver setting in /home/john/.stack/global/stack.yaml). Try running stack setup

I installed 7.10.3 another way... and it's located in a different part of my computer /opt/ghc/7.10.3 so now there are two different versionf of GHC floating around. And for some further confusion, which points to the version I installed in stack:

john@john-Lenovo-Yoga-3-11:~$ which ghc
/home/john/.stack/programs/x86_64-linux/ghc-7.10.2/bin/ghc

Why can't stack install 7.10.3 in the first place? At least I could tell stack where I put it.


$ stack setup -v
Version 0.1.2.0
2016-01-27 21:31:16.546277: [debug] Checking for project config at: /home/john/stack.yaml @(stack-0.1.2.0:Stack.Config src/Stack/Config.hs:496:9)
2016-01-27 21:31:16.546422: [debug] Checking for project config at: /home/stack.yaml @(stack-0.1.2.0:Stack.Config src/Stack/Config.hs:496:9)
2016-01-27 21:31:16.546482: [debug] Checking for project config at: /stack.yaml @(stack-0.1.2.0:Stack.Config src/Stack/Config.hs:496:9)
2016-01-27 21:31:16.546533: [debug] No project config file found, using defaults. @(stack-0.1.2.0:Stack.Config src/Stack/Config.hs:523:13)
2016-01-27 21:31:16.547163: [info] Using resolver: lts-5.0 from global config file: /home/john/.stack/global/stack.yaml @(stack-0.1.2.0:Stack.Config src/Stack/Config.hs:302:32)
2016-01-27 21:31:16.557306: [debug] Run process: ghc --info @(stack-0.1.2.0:System.Process.Read src/System/Process/Read.hs:254:3)
2016-01-27 21:31:16.594867: [debug] Performing a sanity check on: /usr/bin/ghc @(stack-0.1.2.0:Stack.Setup src/Stack/Setup.hs:754:5)
2016-01-27 21:31:16.595008: [debug] Run process: ghc /tmp/stack-sanity-check11387/Main.hs -no-user-package-db @(stack-0.1.2.0:System.Process.Read src/System/Process/Read.hs:254:3)
2016-01-27 21:31:16.905181: [info] GHC on PATH would be used @(main:Main src/main/Main.hs:439:30)
sclv
  • 38,665
  • 7
  • 99
  • 204
john mangual
  • 7,718
  • 13
  • 56
  • 95
  • 2
    Post the output from `stack setup -v`. It's likely that stack is using an old, pre-7.10.3 snapshot. Look for a `Using resolver:` line. – hao Jan 27 '16 at 20:34
  • Well! I was wrong. It does seem like it's finding GHC 7.10.3 on your PATH and you're on the right LTS. Are you sure there's no `ghc-7.10.3` on your path? I guess now that you've installed the third-party package it might be difficult to tell; you might have to uninstall it. Something else you should do is `cd ~/.stack; find . | grep ghc-7.10.3`. Maybe it's already there but not symlinked to `~/.local/bin`. – hao Jan 27 '16 at 23:00
  • 2
    I think you just need to upgrade Stack. You're using am old version, and older versions didn't differentiate between minor versions of a GHC release. – Michael Snoyman Jan 28 '16 at 05:55
  • I got an old version of stack and had exactly the same problem as you. Then I upgraded to 1.1.2 (cabal update; cabal install stack) and it solved the problem – Dan Kruchinin Jun 15 '16 at 13:44

0 Answers0