-
Notifications
You must be signed in to change notification settings - Fork 842
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
Clang.exe failed during stack build #6380
Comments
@tupoiu, I am also a Windows 11 user. I gave up a user name with a space on Windows some years ago, in order to be able to use Stack. See the last paragraph of https://docs.haskellstack.org/en/stable/faq/#how-to-get-a-working-executable-on-windows and #4726. EDIT: That paragraph was written before GHC on Windows moved (GHC 9.4.1) to a fully Clang-based C toolchain, which may be why it does not mention |
This looks to me like an upstream error with GHC. With paths with spaces in them, I suspect that GHC is not quoting them before passing them to |
I am going to close this issue, as there is nothing Stack itself can do. If you do not want to change your user name on Windows, the workaround is to configure Stack to put its 'programs' directory in a location that does not have a space on its path. See the non-project specific configuration option: https://docs.haskellstack.org/en/stable/yaml_configuration/#local-programs-path. |
@tupoiu, that is correct. However, because you want that non-project specific configuration option to apply to all of your Stack projects, you should put it in your |
The GHC issue https://gitlab.haskell.org/ghc/ghc/-/issues/24265 has been closed as fixed, so this should be resolved in some future version of GHC. |
General summary/comments (optional)
I am new user to Haskell, and was trying to setup a project with stack. I ran into an error using "stack build".
I am on Windows 11, and I installed the latest version of stack using ghcup.
Steps to reproduce
I think it's likely caused by the fact that I have a space in my username (C://Peter Job/...). It could also be caused by a truncation of some PATH variable.
Expected
Stack to build me a nice little hello world executable.
Actual
This is the error
Stack version
Method of installation
Platform
Omen Laptop 15, 16GB RAM, x64, Windows 11 Home
The text was updated successfully, but these errors were encountered: