New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack install fail outside a project #1647

Closed
yogsototh opened this Issue Jan 12, 2016 · 7 comments

Comments

Projects
None yet
3 participants
@yogsototh
Contributor

yogsototh commented Jan 12, 2016

After trying to make a fresh environment on Mac (removed ~/.stack/ and uninstalled any OS level haskell compiler), the command stack install ghc-mod returns:

 stack --version                                                                                        ⏎
Version 1.0.0 x86_64

stack --verbose install ghc-mod                                                                        ⏎
Version 1.0.0 x86_64
2016-01-12 22:10:09.852335: [debug] Checking for project config at: /Users/esposito/stack.yaml @(stack_AiuFEtMyGSB1lMos3PapcF:Stack.Config src/Stack/Config.hs:577:9)
2016-01-12 22:10:09.853356: [debug] Checking for project config at: /Users/stack.yaml @(stack_AiuFEtMyGSB1lMos3PapcF:Stack.Config src/Stack/Config.hs:577:9)
2016-01-12 22:10:09.853459: [debug] Checking for project config at: /stack.yaml @(stack_AiuFEtMyGSB1lMos3PapcF:Stack.Config src/Stack/Config.hs:577:9)
2016-01-12 22:10:09.853551: [debug] No project config file found, using defaults. @(stack_AiuFEtMyGSB1lMos3PapcF:Stack.Config src/Stack/Config.hs:604:13)
2016-01-12 22:10:09.854035: [info] Run from outside a project, using implicit global project config @(stack_AiuFEtMyGSB1lMos3PapcF:Stack.Config src/Stack/Config.hs:322:13)
2016-01-12 22:10:09.876599: [info] Using resolver: lts-4.1 from implicit global project's config file: /Users/esposito/.stack/global-project/stack.yaml @(stack_AiuFEtMyGSB1lMos3PapcF:Stack.Config src/Stack/Config.hs:336:32)
2016-01-12 22:10:09.876793: [debug] Trying to decode /Users/esposito/.stack/build-plan-cache/x86_64-osx/lts-4.1.cache @(stack_AiuFEtMyGSB1lMos3PapcF:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-01-12 22:10:09.905598: [debug] Success decoding /Users/esposito/.stack/build-plan-cache/x86_64-osx/lts-4.1.cache @(stack_AiuFEtMyGSB1lMos3PapcF:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-01-12 22:10:09.905753: [debug] Trying to decode /Users/esposito/.stack/indices/Hackage/00-index.cache @(stack_AiuFEtMyGSB1lMos3PapcF:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-01-12 22:10:10.270116: [debug] Success decoding /Users/esposito/.stack/indices/Hackage/00-index.cache @(stack_AiuFEtMyGSB1lMos3PapcF:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-01-12 22:10:10.292684: [debug] Run process: ghc --info @(stack_AiuFEtMyGSB1lMos3PapcF:System.Process.Read src/System/Process/Read.hs:267:3)
2016-01-12 22:10:11.388527: [debug] Run process: ghc --numeric-version @(stack_AiuFEtMyGSB1lMos3PapcF:System.Process.Read src/System/Process/Read.hs:267:3)
2016-01-12 22:10:11.436153: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_AiuFEtMyGSB1lMos3PapcF:System.Process.Read src/System/Process/Read.hs:267:3)
2016-01-12 22:10:11.436717: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_AiuFEtMyGSB1lMos3PapcF:System.Process.Read src/System/Process/Read.hs:267:3)
After installing Cabal, the package id couldn't be found (via ghc-pkg describe Cabal). This shouldn't happen, please report as a bug

I've fixed the problem by installing ghc via brew, but I believe this is still a bug.

mgsloan added a commit that referenced this issue Jan 13, 2016

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Jan 13, 2016

I've pushed a speculative fix. Can you confirm that it resolves the issue?

@yogsototh

This comment has been minimized.

Contributor

yogsototh commented Jan 13, 2016

It is better but I've still have a problem:

un from outside a project, using implicit global project config
Using resolver: lts-4.1 from implicit global project's config file: /Users/esposito/.stack/global-project/stack.yaml
Executable named ghc-pkg not found on path: ["/usr/local/bin","/usr/local/sbin","/usr/bin","/bin","/usr/sbin","/sbin","/opt/X11/bin","/usr/local/MacGPG2/bin","/usr/texbin","/usr/local/cuda/bin","/Users/esposito/.local/bin","/Users/esposito/bin"]

I have done a stack setup just after doing a brew unlink ghc and trying to install alex.

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Jan 13, 2016

Hmm, what's the verbose output now?

@yogsototh

This comment has been minimized.

Contributor

yogsototh commented Jan 13, 2016

@mgsloan here it is:

stack --verbose install happy                        ⏎
Version 1.0.1, Git revision 697e064615c8f0bc895841941982414f2a3e1927 (3061 commits) x86_64
2016-01-13 10:54:36.239913: [debug] Checking for project config at: /Users/esposito/stack.yaml @(stack_0ooaHnBaIuLCbab0LPQIs3:Stack.Config src/Stack/Config.hs:660:9)
2016-01-13 10:54:36.240202: [debug] Checking for project config at: /Users/stack.yaml @(stack_0ooaHnBaIuLCbab0LPQIs3:Stack.Config src/Stack/Config.hs:660:9)
2016-01-13 10:54:36.240263: [debug] Checking for project config at: /stack.yaml @(stack_0ooaHnBaIuLCbab0LPQIs3:Stack.Config src/Stack/Config.hs:660:9)
2016-01-13 10:54:36.240375: [debug] No project config file found, using defaults. @(stack_0ooaHnBaIuLCbab0LPQIs3:Stack.Config src/Stack/Config.hs:687:13)
2016-01-13 10:54:36.240635: [info] Run from outside a project, using implicit global project config @(stack_0ooaHnBaIuLCbab0LPQIs3:Stack.Config src/Stack/Config.hs:405:13)
2016-01-13 10:54:36.241047: [info] Using resolver: lts-4.1 from implicit global project's config file: /Users/esposito/.stack/global-project/stack.yaml @(stack_0ooaHnBaIuLCbab0LPQIs3:Stack.Config src/Stack/Config.hs:419:32)
2016-01-13 10:54:36.241141: [debug] Trying to decode /Users/esposito/.stack/build-plan-cache/x86_64-osx/lts-4.1.cache @(stack_0ooaHnBaIuLCbab0LPQIs3:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-01-13 10:54:36.254731: [debug] Success decoding /Users/esposito/.stack/build-plan-cache/x86_64-osx/lts-4.1.cache @(stack_0ooaHnBaIuLCbab0LPQIs3:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-01-13 10:54:36.254868: [debug] Trying to decode /Users/esposito/.stack/indices/Hackage/00-index.cache @(stack_0ooaHnBaIuLCbab0LPQIs3:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-01-13 10:54:36.524711: [debug] Success decoding /Users/esposito/.stack/indices/Hackage/00-index.cache @(stack_0ooaHnBaIuLCbab0LPQIs3:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-01-13 10:54:36.537250: [debug] Run process: ghc --info @(stack_0ooaHnBaIuLCbab0LPQIs3:System.Process.Read src/System/Process/Read.hs:269:3)
2016-01-13 10:54:36.587395: [debug] Run process: ghc --numeric-version @(stack_0ooaHnBaIuLCbab0LPQIs3:System.Process.Read src/System/Process/Read.hs:269:3)
2016-01-13 10:54:36.624464: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_0ooaHnBaIuLCbab0LPQIs3:System.Process.Read src/System/Process/Read.hs:269:3)
2016-01-13 10:54:36.624682: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_0ooaHnBaIuLCbab0LPQIs3:System.Process.Read src/System/Process/Read.hs:269:3)
Executable named ghc-pkg not found on path: ["/usr/local/bin","/usr/local/sbin","/usr/bin","/bin","/usr/sbin","/sbin","/opt/X11/bin","/usr/local/MacGPG2/bin","/usr/texbin","/usr/local/cuda/bin","/Users/esposito/.local/bin","/Users/esposito/bin"]
@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Jan 13, 2016

Strange, not sure what's up with that!

  • The list of paths it's searching does not include the local programs. Due to this, it seems like it thinks GHC is installed on the system (does which ghc say anything?).
  • An earlier call to ghc-pkg (actually the same call, heh.. that redundancy should be removed) works.
@yogsototh

This comment has been minimized.

Contributor

yogsototh commented Jan 14, 2016

I am lost. I don't know what occurred but, I did a brew unlink ghc then verified that which ghc gives a ghc not found. Then I tried again to do a stack install alex and this time I got the right message telling me to run stack setup and now things are working correctly.

It might have been a problem related to how brew linked/unlinked ghc. I can't reproduce the problem now.

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Jan 14, 2016

Cool, closing this as resolved.

I'm reverting the speculative fix, even though it shouldn't cause any harm, may as well leave it the same as before.

@mgsloan mgsloan closed this Jan 14, 2016

mgsloan added a commit that referenced this issue Jan 14, 2016

@mgsloan mgsloan removed the type: bug label Jan 14, 2016

@mgsloan mgsloan modified the milestones: Support, P2: Should Jan 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment