GHC 6 for Mac OS X: fix for package util/readline
Arthur Baars
arthurb@cs.uu.nl
Fri, 18 Jul 2003 17:35:47 +0200
On Mac OS X GHCi 6.0 complains about a missing symbol when trying to
load package "util". Wolgang Thaller told me the cause of this bug:
The problem was that there was a file called HsReadline.c. The
corresponding
object file, HsReadline.o, replaced HSreadline.o on the Mac's
case-insensitive file system.
So the actual problem is a broken readline package, which is used by
util.
The bug is fixed in the next release (6.0.1) and in CVS. For those who
don't feel like compiling CVS-sources, or waiting for the next release;
below is a quick fix. A working HSreadline.o is created from the
libHSreadline.a file using the -g option of ghc-pkg.
1) set environment variable "libdir" to ghc-6's directory:
setenv libdir /usr/local/lib/ghc-6.0/
2) cp $libdir/libHSreadline.a $libdir/libHSreadline_p.a /tmp/
3) create a config file for package readline:
ghc-pkg -s readline > /tmp/readline.conf
4) cd /tmp
5) remove the package readline from ghc:
ghc-pkg -r readline
6) add package again and let ghc-pkg create the ghci library:
ghc-pkg -g -a -i /tmp/readline.conf
For step 5/6 you may need root-access, use "su" or "sudo"
Arthur