darcs patch: Fix detection of libiconf.

Matthias Kilian kili at outback.escape.de
Wed Jun 24 13:21:36 EDT 2009

On Wed, Jun 24, 2009 at 06:03:27PM +0200, Matthias Kilian wrote:
> "inplace/bin/ghc-stage1" -o ghc/stage2/build/tmp/ghc-stage2  -H32m -O     -i -ighc/. -ighc/stage2/build -ighc/stage2/build/autogen -Ighc/stage2/build -Ighc/stage2/build/autogen       -O -fasm -DGHCI -threaded -package ghc-6.11.20090624 -package haskeline -XCPP -XPatternGuards -XForeignFunctionInterface -XUnboxedTuples -XFlexibleInstances -XMagicHash -no-user-package-conf    -odir ghc/stage2/build -hidir ghc/stage2/build -stubdir ghc/stage2/build -hisuf hi -osuf  o -hcsuf hc  ghc/stage2/build/Main.o ghc/stage2/build/GhciMonad.o ghc/stage2/build/GhciTags.o ghc/stage2/build/InteractiveUI.o   
> /usr/bin/ld: cannot find -liconv
> I could probably "fix" it by setting LD_OPTS, but I don't think
> that's a proper fix. I didn't find where compiler/stage2/package-data.mk
> gets its compiler_stage2_LD_OPTS variable set (i tried to set
> $1_$2_LD_OPTS in rules/build-package-data.mk, but it didn't help).
> And it's probably still the wrong place to fix it. The knowledge
> that linking against base needs -L/usr/local/lib (for to find
> libiconv) should be stored in the entry of base in the package.conf.
> Or, to start with, it should be written to libraries/base/base.buildinfo
> (together with the -I/usr/local/include for compiling libraries/base).

Opening a whole new can of worms (after fiddling with base.buildinfo.in
and now running into further linking problems)...

I think I know how to fix it, but I don't have the time to finish
it today.

More information about the Libraries mailing list