
On Wed, Jun 24, 2009 at 04:43:02PM +0200, Matthias Kilian wrote:
On Wed, Jun 24, 2009 at 02:13:48PM +0100, Ian Lynagh wrote:
$ 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?
Yes, it seems to fix configure.
Great, thanks; I've pushed it.
$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?
The second added line doesn't work as expected. I explicitely have to set CFLAGS="-I/usr/local/include -L/usr/local/lib". It seems like cabal only uses --gcc-options when running gcc (and ignoring --ld-options). So for now, the addition of --gcc-options helps me to build ghc-head again. FYI, below is the output of ghc-cabal with an added -v3 when CFLAGS="-I/usr/local/include" (without -L/usr/local/lib).
Thanks; I've filed a ticket here: http://hackage.haskell.org/trac/hackage/ticket/564 Thanks Ian