Skip to content
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

ghc not found #235

Closed
gelisam opened this issue Jul 7, 2020 · 5 comments
Closed

ghc not found #235

gelisam opened this issue Jul 7, 2020 · 5 comments
Labels

Comments

@gelisam
Copy link
Owner

gelisam commented Jul 7, 2020

From #228 :

I just installed Stack on my Macbook for the purpose of installing Hawk, and stack install ran to completion.

[...]

Now I get the new error:

$ hawk '[1..3]'
hawk: ghc: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

@gelisam
Copy link
Owner Author

gelisam commented Jul 7, 2020

CC @osfameron

@gelisam
Copy link
Owner Author

gelisam commented Jul 7, 2020

The error says that the ghc executable, which is used for compiling Haskell code, is not in one of the folders listed in your PATH environment variable. That makes sense, since stack intentionally installs ghc in a private folder which does not affect your global installation of ghc if any. Since I do have a global installation of ghc, I did not encounter that problem; so one easy workaround would be to also install ghc globally, using ghcup for example.

@gelisam
Copy link
Owner Author

gelisam commented Jul 7, 2020

The above is a workaround, but I still want to fix the underlying bug. The ghc executable is probably used to compile the hawk prelude, while stack's private installation of hint and ghc are used to interpret the command-line expression. That's bad, because those might not be the same version of ghc, in which case the compiled version of the prelude will not be used. That might explain #126, in which I found that compiling the hawk prelude did not lead to the expected speedup?

@osfameron
Copy link

Hah, yeah, that makes sense.
So, as a workaround, I created ~/.local/bin/ghc as:

#!/bin/bash
stack ghc -- $*

which at least gets hawk '1' to run, and might help debug the prelude compilation issue...
But obviously that's not a nice solution 😁.

@gelisam
Copy link
Owner Author

gelisam commented Jan 6, 2021

Closing in favour of #246

@gelisam gelisam closed this as completed Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants