[Haskell-cafe] Configuring cabal install readline on Snow Leopard with MacPorts

Alexy Khrabrov deliverable at gmail.com
Tue Dec 29 02:48:34 EST 2009


I've tried to do cabal install readline on Snow Leopard with MacPorts and it fails with the infamous:

$ cabal install readline
...
checking for GNUreadline.framework... checking for readline... no
checking for tputs in -lncurses... yes
checking for readline in -lreadline... yes
checking for rl_readline_version... yes
checking for rl_begin_undo_group... no
configure: error: readline not found, so this package cannot be built
See `config.log' for more details.
cabal: Error: some packages failed to install:
readline-1.0.1.0 failed during the configure step. The exception was:
exit: ExitFailure 1

Googilng shows the usual explanation that Mac'y broken clone interferes; yet I do have MacPorts and readline 6 there.  So I try, per fixes recommended,

$ cabal install readline --extra-include-dirs=/opt/local/include --extra-lib-dirs=/opt/local/lib
...
checking for rl_readline_version... yes
checking for rl_begin_undo_group... no
...
-- same result.

Downloaded the package and do configure manually:

 ./configure --with-readline-includes=/opt/local/include --with-readline-libraries=/opt/local/lib
...
checking for readline in -lreadline... no
checking for rl_readline_version... no
...

Huh?
$ port contents readline
...
  /opt/local/include/readline/readline.h
...
  /opt/local/lib/libreadline.5.0.dylib
  /opt/local/lib/libreadline.5.1.dylib
  /opt/local/lib/libreadline.5.2.dylib
  /opt/local/lib/libreadline.6.0.dylib
  /opt/local/lib/libreadline.6.dylib
  /opt/local/lib/libreadline.a
  /opt/local/lib/libreadline.dylib
...

How should I properly tell cabal install readline where my readline is?
Cheers,
Alexy



More information about the Haskell-Cafe mailing list