is the library iconv necessary for haskeline?

Judah Jacobson judah.jacobson at gmail.com
Fri Jun 5 12:35:59 EDT 2009


On Fri, Jun 5, 2009 at 1:50 AM, Christian Maeder
<Christian.Maeder at dfki.de> wrote:
> Hi,
>
> building ghc-6.10.3 under x86 solaris eventually failed with:
>
> Configuring ghc-bin-6.10.3...
> cabal-bin: At least the following dependencies are missing:
> haskeline -any
> gmake[3]: *** [boot.stage.2] Error 1
>
> I think, haskeline is not build because libiconv is missing:
>
> -bash-3.00$ ./Setup configure --prefix=/NONEXISTENT
> --bindir=/NONEXISTENT --libdir=/NONEXISTENT --libexecdir=/NONEXISTENT
> --datadir=/NONEXISTENT --docdir=/NONEXISTENT --haddockdir=/NONEXISTENT
> --htmldir=/NONEXISTENT
> --with-compiler=/export/local1/home/maeder/haskell/ghc-6.10.3/ghc/stage1-inplace/ghc
> --with-hc-pkg=/export/local1/home/maeder/haskell/ghc-6.10.3/utils/ghc-pkg/install-inplace/bin/ghc-pkg
> --libsubdir=$pkgid --with-gcc=gcc --with-ld=/usr/ccs/bin/ld
> --with-alex=/home/pub-bkb/bin/alex --with-happy=/home/pub-bkb/bin/happy
> --configure-option='--with-cc=gcc
> --with-hsc2hs=/export/local1/home/maeder/haskell/ghc-6.10.3/utils/hsc2hs/install-inplace/bin/hsc2hs
> --haddock-options=--use-contents=../index.html
> --use-index=../doc-index.html' --enable-library-profiling
> --enable-split-objs
> Configuring haskeline-0.6.1.5...
>
> checking whether to use -liconv... Setup: Unable to link against the
> iconv library.
>
> I wonder how this check for -liconv is generated. I have a file
> /usr/include/iconv.h but not file /usr/lib/libiconv.*
>

Haskeline always requires an iconv library when built on POSIX
systems; OSes differ on whether that functionality is included as part
of libc or whether you need to pass -liconv to gcc.  However, my
impression was that Solaris is part of the former category, so I'm not
sure what's going wrong here.

Can you please send the output of running "cabal install haskeline
-v3" on Solaris (or, cd into the libraries/haskeline subdirectory and
"runghc Setup configure -v3")?

(Also, to avoid spamming the mailing list we should probably move this
discussion to the haskeline bug tracker:
http://trac.haskell.org/haskeline)

> Under Linux I've installed successfully
> http://www.haskell.org/ghc/dist/6.10.3/ghc-6.10.3-i386-unknown-linux-n.tar.bz2
> and I was able to install
> http://hackage.haskell.org/packages/archive/haskeline/0.6.1.6/haskeline-0.6.1.6.tar.gz
> without libiconv!
>
>> ./Setup configure
> Configuring haskeline-0.6.1.6...
> checking whether to use -liconv... not needed.

Right, because on Linux iconv is included in libc.

> However, the mere existence of /usr/local/lib/libiconv* files causes
> configure to use -liconv:
>
> checking whether to use -liconv... using -liconv.

I don't understand why that would happen on Linux; the Setup script
prefers not using -liconv if possible (though use of -liconv can be
forced with the -flibiconv flag).  Can you send (or attach to a
ticket) the output of "cabal configure -v3" in the situation you
describe?

Thanks,
-Judah


More information about the Glasgow-haskell-users mailing list