Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Despite what the wiki says, "cabal-helper-wrapper: ghc: [...]: does not exist" still occurs #780

Closed
cobalamin opened this issue Apr 26, 2016 · 5 comments

Comments

@cobalamin
Copy link

cobalamin commented Apr 26, 2016

Referencing #660 since it's closely related, didn't want to hijack the existing issue.

I have Emacs with stack-ghci and ghc-mod set up. I can't use ghc-mod, since it throws the error that seems to be well known and listed in the wiki:

ghc-mod: cabal: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)

However, there is a GHC executable on the path, both in what my shell has and what Emacs got from the environment.

Partial output from M-x ghc-debug:

Path: check if you are using intended programs.
      ghc.el path: /Users/chipf0rk/.emacs.d/elpa/ghc-20160108.701/ghc.el
     ghc-mod path: /Users/chipf0rk/.stack/snapshots/x86_64-osx/lts-5.13/7.10.3/bin/ghc-mod
         ghc path: /Users/chipf0rk/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc

Version: all GHC versions must be the same.
      ghc.el version 5.5.0.0
     ghc-mod version 5.5.0.0 compiled by GHC 7.10.3
    The Glorious Glasgow Haskell Compilation System, version 7.10.3

Version of ghc-mod, and output of which ghc, both run from inside Emacs through M-x shell-command:

> ghc-mod --version
ghc-mod version 5.5.0.0 compiled by GHC 7.10.3

> which ghc
/Users/chipf0rk/.stack/programs/x86_64-osx/ghc-7.10.3/bin/ghc

I tried your fix as listed in the wiki ("...simply add one of the paths in the output of the following command to your $PATH...") and added the path from the output to the PATH via (setenv "PATH" ...); but the same path already was part of it, and it didn't fix anything.

Am I missing something?

@cobalamin
Copy link
Author

cobalamin commented Apr 28, 2016

No idea what happened. Started Emacs again today and I'm not getting this anymore. And that even though I restarted Emacs a bunch of times on Tuesday trying to get rid of it. I guess I can close this for now.

@cobalamin
Copy link
Author

Aaaaand it's back. In the same Emacs session, after opening a file from a different stack project in a new buffer. This seems pretty elusive... But maybe that can be some kind of clue.

@cobalamin cobalamin reopened this May 9, 2016
@DanielG
Copy link
Owner

DanielG commented May 9, 2016

I was going to respond to this ages ago, typed up a response and of course my computer had to run out of battery just as I was going to submit the comment ;)

Anyways you're reading the error wrong, it's "cabal" that's missing, not cabal-helper-wrapper like in the wiki. I don't think ghc-mod would try to use cabal in a stack project unless something went wrong. Could you paste the output of ghc-mod debug run in the project directory?

@cobalamin
Copy link
Author

Ah, I see. Alright, then I should rephrase this as "sometimes I'm told that cabal is missing even though it's not" ;)
I'm currently not at the computer that it occurred on (again), but the session should still be active there, so I'll paste it tomorrow.

@cobalamin
Copy link
Author

Gah! Nevermind. This was an older project which had no stack config yet, and I don't have plain cabal... sorry :/
It does indeed try the correct thing when it's a cabal project, which is... to run cabal. And I don't have that, so it's behaving as expected. So don't worry about it, and thank you :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants