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

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sun Feb 1 19:07:02 EST 2009


[re-sending the cc to -cafe as I sent from the wrong address the first time]

On Sun, 2009-02-01 at 12:43 -0600, Antoine Latter wrote:

> After a bit of digging, I saw this snippet in the .cabal file for the
> iconv package on hackage:
> 
> >>>>>
>   -- We need to compile via C because on some platforms (notably darwin)
>   -- iconv is a macro rather than real C function. doh!
>   ghc-options:     -fvia-C -Wall
> <<<<<
> 
> But it looks like the 'iconv' package is broken in the exact same way
> for me - I get the same crazy linker errors.

Yes, the workaround of using -fvia-C stopped working in ghc-6.10. I will
have to adapt the iconv package to use a C wrapper.

Someone said that it is just the macports version of iconv that has this
problem but I don't understand that at all. If we're using default
ghc/gcc then we should not be looking in any non-standard include
directories at all.

The other thing that makes no sense is that
the /usr/lib/libiconv.dywhatever file apparently contains both
_iconv_open and _libiconv_open so why can't we link to the ordinary
_iconv_open one?

Duncan



More information about the Haskell-Cafe mailing list