darcs patch: Fix detection of libiconf.

Ian Lynagh igloo at earth.li
Tue Jun 23 08:47:00 EDT 2009


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).

Thanks for the patch; unfortunately, it makes the build fail for me on
OS X:

Undefined symbols:
  "_iconv_close", referenced from:
      _s20j_info in libHSbase-4.1.0.0.a(Iconv.o)
  "_iconv", referenced from:
      _s218_info in libHSbase-4.1.0.0.a(Iconv.o)
  "_iconv_open", referenced from:
      _s20d_info in libHSbase-4.1.0.0.a(Iconv.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [utils/hsc2hs/dist-install/build/tmp/hsc2hs] Error 1
make[1]: *** Waiting for unfinished jobs....
Undefined symbols:
  "_iconv_close", referenced from:
      _s20j_info in libHSbase-4.1.0.0.a(Iconv.o)
  "_iconv", referenced from:
      _s218_info in libHSbase-4.1.0.0.a(Iconv.o)
  "_iconv_open", referenced from:
      _s20d_info in libHSbase-4.1.0.0.a(Iconv.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [utils/ghc-pkg/dist-install/build/tmp/ghc-pkg] Error 1
make: *** [all] Error 2

I haven't looked into what's going wrong yet.


Thanks
Ian



More information about the Libraries mailing list