Opened 10 years ago

Closed 10 years ago

Last modified 3 years ago

#1196 closed merge (fixed)

Cabal on Windows doesn't like the in-place GHCs

Reported by: igloo Owned by: igloo
Priority: normal Milestone: 6.6.1
Component: Compiler Version: 6.6
Keywords: Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: cabal01, cabal02
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


From e.g. a cmd prompt, Windows doesn't like the in-place GHCs:

'C:\cygwin\home\ian\ghc\6.6-branch\build\compiler\stage2\ghc-inplace' is not recognized as an internal or external command, operable program or batch file.

C:\>cat C:\cygwin\home\ian\ghc\6.6-branch\build\compiler\stage2\ghc-inplace
exec C:/cygwin/home/ian/ghc/6.6-branch/build/compiler/stage2/ghc -BC:\\\\cygwin\\\\home\\\\ian\\\\ghc\\\\6.6-branch\\\\build "$@"

which means the cabal01 test fails thus:

$ ./setup configure --prefix=`pwd`/install --with-compiler=C:/cygwin/home/ian/ghc/6.6-branch/build/compiler/stage1/ghc-inplace --with-hc-pkg=../../../../../utils/ghc-pkg/ghc-pkg-inplace --enable-library-profiling
setup.exe: Warning: Package is copyright All Rights Reserved
setup.exe: Warning: No license-file field.
'C:\cygwin\home\ian\ghc\6.6-branch\build\compiler\stage1\ghc-inplace' is not recognized as an internal or external command,
operable program or batch file.
Configuring test-1.0...

(the odd output order is due to buffering)

Change History (6)

comment:1 Changed 10 years ago by igloo

Test Case: cabal01cabal01, cabal02

comment:2 Changed 10 years ago by simonmar

Yes, I got halfway to fixing this and didn't finish it. Basically I was planning to do away with the ghc-inplace scripts on Windows, and instead have the GHC binary figure out whether it was in a build tree or not by inspecting the binary pathname.

ghc-inplace causes problems for the testsuite driver too, IIRC.

Unfortunately similar changes would also be required to ghc-pkg (doing away with ghc-pkg-inplace on Windows), since there's no way to pass extra arguments to ghc-pkg via Cabal (perhaps there should be?).

Better ideas welcome...

comment:3 Changed 10 years ago by simonmar

Milestone: _|_6.6.1
Owner: set to igloo
Type: bugmerge

Thanks mostly to Sigbjorn, this has now been fixed:

Fri Nov 17 01:23:43 GMT 2006
  * Emit .bat versions of -inplace scripts on Windows platforms (Cabal-friendlier)

    M ./compiler/Makefile +11

Fri Nov 17 01:22:39 GMT 2006
  * Emit .bat version of -inplace script on Windows platforms

and in the testsuite:

Thu Mar  8 13:15:40 GMT 2007  Simon Marlow <>
  * on Windows, use the .bat versions of the inplace scripts

comment:4 Changed 10 years ago by igloo

Resolution: fixed
Status: newclosed


comment:5 Changed 8 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:6 Changed 3 years ago by Ian Lynagh <igloo@…>

In bb318da85f98a79aef951a6aa3fbf996b75c0007/ghc:

cabal01 is broken on Windows; trac #1196
Note: See TracTickets for help on using tickets.