[Haskell-cafe] Haskeline, pcre-light, iconv and Cabal on OSX

Judah Jacobson judah.jacobson at gmail.com
Sun Feb 1 14:09:18 EST 2009

On Sun, Feb 1, 2009 at 10:04 AM, Antoine Latter <aslatter at gmail.com> wrote:
> On Sun, Feb 1, 2009 at 12:01 PM, Thomas Davie <tom.davie at gmail.com> wrote:
>> This is caused by OS X's libiconv being entirely CPP macros, the FFI has
>> nothing to get hold of.  IIRC there's a ghc bug report open for it.
>> Bob
> So why does it sometimes work?  I can write and compile executables
> using haskeline, both with 'ghc --make' and 'cabal configure && cabal
> build'.
> This sounds like something I can patch haskeline to account for, then?

The OS X system libiconv is actually OK; it's the MacPorts libiconv
that has the CPP macros.  When the cabal package depends on pcre-light
it pulls in all of pcre-light's options; and like me, you probably
compiled pcre-light to link against /opt/local/lib.

To confirm this I ran "ghc --make -L/opt/local/lib test.hs" on my OS X
machine and saw the same error as you.

Thanks for the report; I'm not sure of what the right solution is, but
I opened a ticket on Haskeline's bug tracker:


Feel free to add comments, propose a fix or suggest a workaround.


More information about the Haskell-Cafe mailing list