darcs patch: Fix detection of libiconf.
Ian Lynagh
igloo at earth.li
Wed Jun 24 09:13:48 EDT 2009
On Wed, Jun 24, 2009 at 11:35:54AM +0200, Matthias Kilian wrote:
>
> But your proposed AC_SEARCH_LIBS won't help anyway, because it
> generates a test program that just references the iconv_open()
> function without #including <iconv.h>. However, on OpenBSD, libiconv.a
> does not define a symbol named iconv_open but libiconv_open:
>
> $ nm /usr/local/lib/libiconv.a | grep iconv_open
> 00011f84 T libiconv_open
> 000124b8 T libiconv_open_into
>
> And iconv.h #defines iconv_open to libiconv_open:
> $ grep -w libiconv_open /usr/local/include/iconv.h
> #define iconv_open libiconv_open
Ah, I see what you mean. Does the attached patch work for you?
If you have other build problems then
autoreconf && ./configure && cat base.buildinfo
in libraries/base should be enough to see if it works.
> There is, however, still the problem that library and include paths
> passed to configure via the environment (like LDFLAGS, CPPFLAGS)
> aren't recognized by cabal, so even if configure is successfull,
> cabal (or ghc-pkg configure, in my case) will fail.
In rules/build-package-data.mk there are two lines:
$1_$2_CONFIGURE_OPTS += --configure-option=CFLAGS="$$(filter-out -Werror,$$(SRC_CC_OPTS)) $$($1_CC_OPTS) $$($1_$2_CC_OPTS)"
$1_$2_CONFIGURE_OPTS += --configure-option=LDFLAGS="$$(SRC_LD_OPTS) $$($1_LD_OPTS) $$($1_$2_LD_OPTS)"
If you add two more lines:
$1_$2_CONFIGURE_OPTS += --gcc-options="$$(filter-out -Werror,$$(SRC_CC_OPTS)) $$($1_CC_OPTS) $$($1_$2_CC_OPTS)"
$1_$2_CONFIGURE_OPTS += --ld-options="$$(SRC_LD_OPTS) $$($1_LD_OPTS) $$($1_$2_LD_OPTS)"
then does that fix the problem?
Thanks
Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iconv.patch
Type: text/x-diff
Size: 30989 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/libraries/attachments/20090624/9c24d1a1/iconv-0001.bin
More information about the Libraries
mailing list