Skip to content

readline package does not respect Cabal --extra-{include,lib}-dirs flags

The readline package still uses a ./configure script. It has flags to set extra library and include dirs to search. These are needed by OSX users.

The ./configure script takes the flags:

--with-readline-includes=
--with-readline-libraries=

However when an end user installs the package via Cabal, (either runghc Setup or cabal) they use the Cabal flags:

--extra-include-dirs=
--extra-lib-dirs=

The problem is that the two sets of flags are not connected at all. If the configure script needs to know these directories then the Setup.hs for the package should pass them through. Users are not expected to know the per-package configure flags, especially when we already have suitable generic flags for the same purpose.

The end result is that OSX users cannot install readline. Eg, today someone complained:

hm, I have installed libreadline from mac ports and I have
told cabal to look for it in --extra-include-dirs
--extra-lib-dirs I also have installed the GNU.framework for
mac but it still fails...any suggestions?

This problem actually applies to most bindings packages that use configure scripts. See also this Cabal ticket about similar mismatches with configure scripts.

Trac metadata
Trac field Value
Version 6.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries (other)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown/Multiple
Architecture Unknown/Multiple
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information