GHC 4.08 Mini-FAQ

This page lists known problems for the 4.08 release with workarounds.
  • Linking a program causes the following error on Linux:
       /usr/bin/ld: cannot open -lgmp: No such file or directory
    
    The problem is that your system doesn't have the GMP library installed. If this is a RedHat distribution, install the RedHat-supplied gmp-devel package, and the gmp package if you don't already have it. There have been reports that installing the RedHat packages also works for SuSE (SuSE don't supply a shared gmp library).
  • When I use a foreign function that takes or returns a float, it gives the wrong answer, or crashes.

    You should use -#include.

  • My program that uses a really large heap crashes on Windows.

    For utterly horrible reasons, programs that use more than 128Mb of heap won't work when compiled dynamically on Windows (they should be fine statically compiled).

  • GHC doesn't like filenames containing +.

    Indeed not. You could change + to p or plus.

  • GHC crashes when I put a context on a newtype that has a named field.

    This is fixed in 4.08.2.

  • My programs crashes on startup under Windows.

    Use cygcheck to make sure it's not loading any DLLs it shouldn't be. My favourite is having a copy of gmp.dll in my Windows system directory. You'll need to remove such DLLs, or copy the ones you need into the same directory as the program, to make sure they're used in preference to DLLs in the system directories.