Opened 10 years ago

Closed 7 years ago

#3121 closed bug (wontfix)

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

Reported by: duncan Owned by:
Priority: normal Milestone: Not GHC
Component: libraries (other) Version: 6.10.1
Keywords: Cc: gale@…
Operating System: MacOS X Architecture: x86
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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:


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


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.

Attachments (1)

Setup.dpatch (7.8 KB) - added by ckeen 10 years ago.
patch agains the readline darcs repo also works with cabal

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by ckeen

Architecture: Unknown/Multiplex86
Operating System: Unknown/MultipleMacOS X

I was the one complaining. I wrote a small (and ugly) patch that seems to work when running Setup.hs in the directory. Running cabal does still not work. Please excuse the bad style I am still a beginner in haskell.

I appreciate any suggestions on how to solve this better.

Kind regards,


Changed 10 years ago by ckeen

Attachment: Setup.dpatch added

patch agains the readline darcs repo also works with cabal

comment:2 Changed 9 years ago by igloo

difficulty: Unknown
Milestone: Not GHC
Owner: set to igloo

comment:3 Changed 9 years ago by igloo

Owner: igloo deleted

If it doesn't work with cabal-install then we should probably look for a solution that does.

comment:4 Changed 8 years ago by YitzGale

patch: 0
Type of failure: None/Unknown

comment:5 Changed 8 years ago by YitzGale

Cc: gale@… added

comment:6 Changed 7 years ago by igloo

Resolution: wontfix
Status: newclosed

readline no longer comes with GHC, so I'm closing this ticket.

Note: See TracTickets for help on using tickets.