Ticket #2743 (closed task: fixed)

Opened 3 years ago

Last modified 3 years ago

GHC 6.10.1 Win32 release is unusable (on XP SP3)

Reported by: guest Owned by:
Priority: normal Milestone: 6.10.2
Component: Compiler Version: 6.10.1
Keywords: Cc:
Operating System: Windows Architecture: x86
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

1. Running ghc in cmd.exe shell delivers (in my config):

ghc.EXE: panic! (the 'impossible' happened)

(GHC version 6.10.1 for i386-unknown-mingw32):

can't decompose ghc.exe path: "G:\\Progs\\ghc-6.10.1\\Bin\\ghc.exe"

2. runghc.exe/runhaskell.exe hangs.

3. $topdir\include\mingw\c++ contains subtrees "3.4.5" and "3.4.2". "3.4.2" seems completely irrelevant here.

Attachments

2743.patch Download (63.7 KB) - added by NeilMitchell 3 years ago.
Patch

Change History

Changed 3 years ago by guest

  • os changed from Unknown/Multiple to Windows
  • architecture changed from Unknown/Multiple to x86
  • summary changed from GHC 6.10.1 Win32 release is unusable to GHC 6.10.1 Win32 release is unusable (on XP SP3)

Changed 3 years ago by NeilMitchell

I fixed a similar issue in 6.9, and at that point wondered if other changes needed making - obviously the answer is yes. I'll track this one down and get a patch.

I suspect this relates to either your shell, or your %PATH% - do you have "G:\Progs\ghc-6.10.1\Bin" on your path, and does changing it to "\bin" fix the issue?

Changed 3 years ago by NeilMitchell

Patch

Changed 3 years ago by NeilMitchell

I've attached a patch, which I think should fix the issue. This probably needs to be merged in to 6.10 as well. I haven't tested the patch (other than it compiles), but its fairly simple, so hopefully will work.

When was getBaseDir altered? If this code is new for 6.10, then it is almost certainly worth releasing a new version for Windows. Depending on peoples setups, it could be quite common.

Changed 3 years ago by guest

Yes, changing "G:\Progs\ghc-6.10.1\Bin" to "G:\Progs\ghc-6.10.1\bin" in my %PATH% have fixed the ghc.exe issue, but runghc/runhaskell still hangs.

Changed 3 years ago by NeilMitchell

The PATH thing has a patch, is a known issue, so that seems to be eliminated.

The issue with runghc is that "runghc" with no arguments takes the file from stdin. i.e. type "runghc" then type "main = print 1" enter, then hit Ctrl+Z and enter. That will print the number 1 to the screen. This isn't how most Windows programs behave, and trying "runghc --help" has exactly the same behaviour (i.e. an apparent hang) so its not very helpful.

There is a bug on my 6.9 thing that hitting Ctrl+C does not abort runghc while typing in a script, and that is a bug, if it is the same with 6.10.

So I guess the runghc should respond more helpfully to --help, and should abort on Ctrl+C. Should it also print some help text for windows users with stdin bound to the prompt? Seems a bit of a horrid special case, but might help.

Changed 3 years ago by guest

Well, I conjectured something like this about runghc, but didn't bother to test it out since it wasn't an issue for 6.8.3: runghc.exe: syntax: runghc [-f GHC-PATH | --] [GHC-ARGS] [--] FILE ARG...

Changed 3 years ago by simonmar

  • owner set to simonmar
  • difficulty set to Unknown
  • milestone set to 6.10.2

I'll validate and commit, thanks. The runghc bugs have been separately ticketed as #2757 and #2758.

Changed 3 years ago by simonmar

  • owner changed from simonmar to igloo
  • type changed from bug to merge

Validated and pushed:

Wed Nov  5 05:43:15 PST 2008  Neil Mitchell <ndmitchell@gmail.com>
  * Perform case-insensitive matching of path components in getBaseDir on Windows (Fixes bug 2743)

we should check that it actually fixes the bug, though.

Changed 3 years ago by igloo

  • owner igloo deleted
  • type changed from merge to task

Merged. Ticket left open for fix verification.

Changed 3 years ago by NeilMitchell

  • status changed from new to closed
  • resolution set to fixed

I've built with the fix, and tested, and it works:

C:\ghc>ghc-6.8.3\BIN\ghc.exe
ghc.exe: no input files
Usage: For basic information, try the `--help' option.

C:\ghc>ghc-6.9.20080905\BIN\ghc.exe
ghc.exe: panic! (the 'impossible' happened)
  (GHC version 6.9.20080905 for i386-unknown-mingw32):
        can't decompose ghc.exe path: "C:\\ghc\\ghc-6.9.20080905\\BIN\\ghc.exe"

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

C:\ghc>ghc-6.11.20081111\BIN\ghc.exe
ghc.exe: no input files
Usage: For basic information, try the `--help' option.
Note: See TracTickets for help on using tickets.