Opened 7 years ago

Closed 7 years ago

Last modified 3 months 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: Difficulty: Unknown
Test Case: cabal01, cabal02 Blocked By:
Blocking: Related Tickets:

Description

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

C:\>C:\cygwin\home\ian\ghc\6.6-branch\build\compiler\stage2\ghc-inplace
'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
#!/bin/sh
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 7 years ago by igloo

  • Test Case changed from cabal01 to cabal01, cabal02

comment:2 Changed 7 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 7 years ago by simonmar

  • Milestone changed from _|_ to 6.6.1
  • Owner set to igloo
  • Type changed from bug to merge

Thanks mostly to Sigbjorn, this has now been fixed:

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

    M ./compiler/Makefile +11

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

and in the testsuite:

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

comment:4 Changed 7 years ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

Merged.

comment:5 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

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

In bb318da85f98a79aef951a6aa3fbf996b75c0007/ghc:

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