Opened 11 years ago

Closed 10 years ago

Last modified 9 years ago

#930 closed bug (fixed)

ghc-6.6: panic! (the 'impossible' happened) mkWWcpr: not a product GHC-Brian-6.5.1:IdInfo.IdInfo{tc rfD}

Reported by: briansmith Owned by:
Priority: normal Milestone: 6.8.1
Component: Compiler Version: 6.5
Keywords: Cc: id@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

I receive this message:

ghc-6.6: panic! (the 'impossible' happened)
  (GHC version 6.6 for i386-unknown-linux):
        mkWWcpr: not a product GHC-Brian-6.5.1:IdInfo.IdInfo{tc rfD}

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

I am using GHC from the 6.6 branch (pulled & built today).

I am building the GHC API using the Cabal file that is attached. To use it, put the Cabal file and Setup.lhs in ghc/compiler/ along and run:

runhaskell Setup.lhs configure --with-hc=/path/to/ghc-6.6/compiler/stage2/ghc-inplace --with-hc-pkg=/path/to/ghc-6.6/utils/ghc-pkg/ghc-pkg-inplace
runhaskell Setup.lhs build

It takes a long time because TidyPgm is module 215 of 274. When the "-O2" option is removed from the Cabal file, it builds and works fine.

This was on Ubuntu 6.06.

Attachments (2)

stage2.cabal (4.3 KB) - added by briansmith 11 years ago.
Cabal file
Setup.lhs (108 bytes) - added by briansmith 11 years ago.
Setup.lhs

Download all attachments as: .zip

Change History (17)

Changed 11 years ago by briansmith

Attachment: stage2.cabal added

Cabal file

Changed 11 years ago by briansmith

Attachment: Setup.lhs added

Setup.lhs

comment:1 Changed 11 years ago by briansmith

If you remove the -O2 to compile TidyPgm, then it happens again in TcIface:

iface/TcIface.lhs:63:29:
    Warning: Imported from `Util' but not used: `equalLength'
ghc-6.6: panic! (the 'impossible' happened)
  (GHC version 6.6 for i386-unknown-linux):
        mkWWcpr: not a product GHC-Brian-6.5.1:IdInfo.IdInfo{tc rfD}

comment:2 Changed 11 years ago by simonpj

This is an annoying, known, but awkward-to-fix problem concerning mutually-recursive modules. The problem is that when compiling the modules *inside* a loop, a data type that is only defined at the top of the loop looks opaque; but after the loop is done, the structure of the data type becomes apparent.

The difficulty is then that two different bits of code have different notions of what the data type looks like.

So far this bug has bitten only GHC itself and one other person. I need to think carefully about how to fix it. Thanks for reporting it.

Unsatisfactory workaround: compile without -O.

comment:3 Changed 11 years ago by briansmith

Another workaround seems to be to use a makefile and "ghc -c" instead of "ghc --make." I compile GHC using its makefile all the time with -O2 without incident.

comment:4 Changed 11 years ago by simonpj

Yes, I confirm that's correct. The problem only shows up with --make.

Simon

comment:5 Changed 10 years ago by simonpj

See also #1072

comment:6 Changed 10 years ago by igloo

Milestone: 6.8

comment:7 Changed 10 years ago by igloo

Priority: normalhigh

This affects relatively few packages, but for those it does, it's a pain when you want to build with Cabal.

comment:8 Changed 10 years ago by Isaac Dupree

Cc: id@… added

It would be convenient for GHC to be able to compile itself with --make, to help working/testing on #1405 (possibly involving Cabal...). Alternatively #1409 could work too.

comment:9 Changed 10 years ago by igloo

Priority: highnormal

Won't happen in time for 6.8.

comment:10 Changed 10 years ago by simonmar

Resolution: fixed
Status: newclosed

Fixed:

Mon Sep 10 11:38:30 BST 2007  Simon Marlow <simonmar@microsoft.com>
  * FIX #903: mkWWcpr: not a product

comment:11 Changed 10 years ago by Isaac Dupree

I guess it is intended to merge to 6.8? (Asking because it doesn't look like that's happened yet.)

comment:12 Changed 10 years ago by Isaac Dupree

Okay, I see that is now done.

comment:13 Changed 9 years ago by igloo

Milestone: 6.8 branch6.8.1

comment:14 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:15 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple
Note: See TracTickets for help on using tickets.