Re: [GHC] #365: GHC dies silently with faulty preprocessor

#365: GHC dies silently with faulty preprocessor -------------------------------------+------------------------------------- Reporter: josefs | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Phyx-): More specifically, I think the issue here is with the use of [https://github.com/haskell/process/blob/52cad6528a01b7cca011ac1c4ef7d33b1f50... runInteractiveProcess], which ultimately calls [https://msdn.microsoft.com /en-us/library/windows/desktop/ms682425(v=vs.85).aspx CreateProcess] on Windows. The problem is that processes created using `CreateProcess` must be known by the Windows loader. From the MSDN page. "This module can be a Windows-based application. It can be some other type of module (for example, MS-DOS or OS/2) if the appropriate subsystem is available on the local computer. " Since .py are not known by the system loader the call fails with `Exec format error` I think there are two solutions: * Specify `cmd.exe` or rather, whatever `ComSpec` is pointing to as the application and the preprocessor to run as the argument. * Alternatively use `ShellExecute` instead of `CreateProcess` to start the preprocessors. However both of them won't necessarily fix the tests that are failing, since that would require the .py extension to be registered to the python2 in msys. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/365#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC