Cannot link to readline

Yitzchak Gale gale at
Thu Mar 6 02:58:27 EST 2008

On Mac OS X 10.4, I can't link programs that use readline
unless I explicitly specify the GNUreadline framework
on the ghc command line:

 $ ghc --make  fooText.hs
 [4 of 5] Compiling FooText         ( FooText.hs, FooText.o )
 [5 of 5] Compiling Main             ( fooText.hs, fooText.o )
 Linking fooText ...
 /usr/bin/ld: Undefined symbols:
 collect2: ld returned 1 exit status
 $ ghc --make -framework GNUreadline fooText.hs
 Linking fooText ...

 Note that this happens for programs that explicitly use
 System.Console.Readline, not in general ghc use.

 Manuel M T Chakravarty wrote:
 > Did you specify -package readline?

 -package readline doesn't help. It only compiles if I say
 -framework GNUreadline.

 > The readline package spec should include the framework
 > option (if not, its a bug in the config of the readline package IMO).

 OK, I'll copy this to the libraries list then.


More information about the Libraries mailing list