On Windows, is GHC 9.4.8 passing paths with spaces to `clang.exe` without enclosing quotes?
Summary
See Stack issue #6380. A Windows user, with user name Peter Job
is experiencing an error with GHC 9.4.8 which is (extracts):
2023-12-15 21:57:28.661476: [debug] Run process within C:\Users\Peter Job\AppData\Local\Temp\stack-3c77eb37934e8913\: C:\Users\Peter Job\AppData\Local\Programs\stack\x86_64-windows\ghc-9.4.8\bin\ghc-9.4.8.exe ...
clang: error: no such file or directory: 'Job\AppData\Local\Programs\stack\x86_64-windows\ghc-9.4.8\lib\../mingw/include'
C:\Users\Peter Job\AppData\Roaming\stack\setup-exe-src\setup-shim-9p6GVs8J.hs:1:1: error:
`clang.exe' failed in phase `C pre-processor'. (Exit code: 1)
|
1 | {-# LANGUAGE CPP #-}
| ^
It looks to me likely that GHC has passed a path to clang.exe
(a) that contains a space and (b) has not been surrounded with quotation marks. (I am assuming that clang.exe
can handle paths with spaces as long as they are surrounded with quotation marks; I do not know that for a fact.)
Environment
- GHC version used: 9.4.8
Optional:
- Operating System: Windows 11
- System Architecture: x86_64