Ticket #3477 (closed bug: invalid)

Opened 4 years ago

Last modified 4 years ago

Haskell Platform install failed on Ubuntu on mtl package

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.10.4
Keywords: Cc:
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I had just installed the latest version of ghc6 (6.10.4) as required by the haskell platform and I have been unable to get it to build properly. I'm not sure if I have any more details that I can offer that are relevant.

As the error message told me to report this as a bug, I did. Failure occurred with the following text:

"./Setup" "register" "--inplace" Registering mtl-1.1.0.2... Reading package info from "dist/inplace-pkg-config" ... done. Writing new package config file... done. Building mtl-1.1.0.2 "/usr/bin/ghc" "--make" "Setup" "-o" "Setup" "-package" "Cabal-1.6.0.3" Binary: Int64 truncated to fit in 32 bit Int ghc: panic! (the 'impossible' happened)

(GHC version 6.10.4 for i386-unknown-linux):

Prelude.chr: bad argument

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

Error: Compiling the Setup script failed make: *** [build.stamp] Error 2

Change History

Changed 4 years ago by guest

Forgot to mention: the machine I'm using is a 32-bit laptop, though I've seen about the same problem on my 64 bit desktop.

Changed 4 years ago by kaol

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

First, the fix: remove any old .hi and .o files that you have left around.

Despite the error message, this doesn't have anything to do with GHC itself.

As for the cause, this is fallout from a Debian workaround for .haddock files using GHC's Binary types, which use, as default, 32 bit integers on 32 bit architectures and 64 bit integers on 64 bit architectures. I first patched GHC to use 32 bit ints in Binary on all architectures and later changed that to 64 bits on all architectures. This has left files that are incompatible across versions on users' file systems with no easy way to remove those.

Sorry for the inconvenience. I know that there could have been a better way to handle the situation.

Note: See TracTickets for help on using tickets.