haskeline (was: darcs patch: Fix detection of libiconf.)

Judah Jacobson judah.jacobson at gmail.com
Sat Jun 20 12:14:54 EDT 2009


On Sat, Jun 20, 2009 at 5:47 AM, Matthias Kilian<kili at outback.escape.de> wrote:
> On Sat, Jun 20, 2009 at 02:29:02PM +0200, Matthias Kilian wrote:
>> Sat Jun 20 14:21:59 CEST 2009  Matthias Kilian <kili at outback.escape.de>
>>   * Fix detection of libiconf.
>>   It's not enough to try to link against libiconv and look for a
>>   symbol iconv_open, because iconv may be installed in a way that
>>   internally renames iconv_foo to libiconv_foo in the library and
>>   adds corresponding #define iconv_foo libiconv_foo to iconv.h.
>>
>>   This patch is needed on OpenBSD (but it's not enough, since cabal
>>   suffers from the same problem).
>
> Oops! The last sentence is a little bit misleading. The real problem
> seems to be the way haskeline's Setup.hs tries to check for libiconv
> (it doesn't use /usr/local/lib and /usr/local/include for libraries
> and include files even if you pass them via environment in LDDFLAGS
> and CPPFLAGS to configure for a complete ghc buidl).

Are you building ghc-6.10 or 6.11?  For 6.10.3, you can specify extra
library/include folders using EXTRA_CABAL_CONFIGURE_FLAGS in your
mk/build.mk:

http://www.haskell.org/ghc/download_ghc_6_10_3.html#sources

For 6.11, ghc doesn't use Haskeline's Setup.hs file anymore (since the
base library now also uses iconv), so I wouldn't expect you to have
that problem.  But if I'm wrong, please file a report at
hackage.haskell.org/trac/ghc and attach a build log, and I'll take a
look at it.  You can tell whether Haskeline's Setup.hs was used by
searching the log for the phrase "checking whether to use -liconv".

> Is there any reason for haskeline not using autoconf?

Personal preference; and it's not present on a default Windows installation.

Best,
-Judah


More information about the Libraries mailing list