#4287: GHC command invocation debug output not in correct format for cmd.exe
---------------------------------+------------------------------------------
Reporter: ezyang | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.12.3 | Keywords:
Testcase: | Blockedby:
Os: Windows | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
A frequent operation when debugging a misbehaving GHC build is manually
performing an invocation that GHC made to some external process. To aid
this, -v3 prints out the command that GHC invoked.
Ideally, we would like to be able to copy paste this printed command to
our terminal and have it work correctly (with temporary files kept and
such.) However, the output for Windows is quite misleading. Consider the
following command:
{{{
C:\Program Files\Haskell Platform\2010.2.0.0\lib\..\mingw\bin\windres
--preprocessor="C:\Program Files\Haskell
Platform\2010.2.0.0\lib\..\mingw\bin\gcc" "-E" "-xc" "-DRC_INVOKED" --use-
temp-file --input=C:\Users\ezyang\ghc672_0\ghc672_0.rc
--output=C:\Users\ezyang\ghc672_0\ghc672_0.o --output-format=coff
}}}
The primary problem is that arguments are not escaped or quoted. This is
seen in the executable path in this command, which has a space in it.
This is a major usability bug when command line arguments contain argments
in them. For example, -E is meant as a flag to gcc, not windres. However,
the printed command line is quite misleading.
This should be relatively easy to fix.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4287>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs