Ticket #930 (closed bug: fixed)

Opened 7 years ago

Last modified 5 years ago

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: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

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

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

Change History

Changed 7 years ago by briansmith

Cabal file

Changed 7 years ago by briansmith

Setup.lhs

Changed 7 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}

Changed 7 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.

Changed 7 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.

Changed 7 years ago by simonpj

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

Simon

Changed 6 years ago by simonpj

See also #1072

Changed 6 years ago by igloo

  • milestone set to 6.8

Changed 6 years ago by igloo

  • priority changed from normal to high

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

Changed 6 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.

Changed 6 years ago by igloo

  • priority changed from high to normal

Won't happen in time for 6.8.

Changed 6 years ago by simonmar

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

Fixed:

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

Changed 6 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.)

Changed 6 years ago by Isaac Dupree

Okay, I see that is now done.

Changed 6 years ago by igloo

  • milestone changed from 6.8 branch to 6.8.1

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.