darcs patch: Fix detection of libiconf.
Matthias Kilian
kili at outback.escape.de
Tue Jun 23 12:57:20 EDT 2009
On Tue, Jun 23, 2009 at 01:47:00PM +0100, Ian Lynagh wrote:
> > * 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
Well, at least your build on MacOS X gets further than my build on
OpenBSD ;-)
> I haven't looked into what's going wrong yet.
Are there different versions of libiconv hanging around on MacOS X?
What's the output from configure in libraries/base, and what's in
config.log and config.status? If the configure test succeeds, then
ghc-pkg is linking with different parameters than the configure
test (which is similar to what happens for me on OpenBSD, but there
ghc-cabal even fails to find libiconv and the build stops at ghc-cabal
configure ... dist-install libraries/base).
Ciao,
Kili
More information about the Libraries
mailing list