haskeline (was: darcs patch: Fix detection of libiconf.)
Matthias Kilian
kili at outback.escape.de
Sat Jun 20 13:12:44 EDT 2009
Hi,
On Sat, Jun 20, 2009 at 09:14:54AM -0700, Judah Jacobson wrote:
> > Oops! The last sentence is a little bit misleading. The real problem
> > seems to be the way haskeline's Setup.hs tries to check for libiconv
> > (it doesn't use /usr/local/lib and /usr/local/include for libraries
> > and include files even if you pass them via environment in LDDFLAGS
> > and CPPFLAGS to configure for a complete ghc buidl).
>
> Are you building ghc-6.10 or 6.11? For 6.10.3, you can specify extra
> library/include folders using EXTRA_CABAL_CONFIGURE_FLAGS in your
> mk/build.mk:
>
> http://www.haskell.org/ghc/download_ghc_6_10_3.html#sources
>
> For 6.11, ghc doesn't use Haskeline's Setup.hs file anymore (since the
> base library now also uses iconv), so I wouldn't expect you to have
> that problem.
Well, I actually was building 6.11, but I got confused with several
trees with recent and not-so-recent versions.
The actual failure was in libraries/base, where LDFLAGS and CPPFLAGS
in the environment aren't passed to the sub makes nor to calls of
inplace/bin/ghc-cabal (with appropriate options).
I'm not sure wether this should be addressed in ghc's build system,
in base or in cabal.
FTR, here are the last lines of a
LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include \
./inplace/bin/ghc-cabal configure -v3 \
--with-ghc=/home/kili/src/ghc/ghc-head/inplace/bin/dummy-ghc \
--with-ghc-pkg=/home/kili/src/ghc/ghc-head/inplace/bin/ghc-pkg \
--with-gcc=gcc --configure-option=--with-cc=gcc \
--with-hscolour=/usr/local/bin/HsColour \
-- dist-ins tall libraries/base
configure: creating ./config.status
config.status: creating base.buildinfo
config.status: creating include/HsBaseConfig.h
config.status: include/HsBaseConfig.h is unchanged
Reading parameters from ./base.buildinfo
("/usr/bin/gcc",["/tmp/14231.c","-o","/tmp/14231","-D__GLASGOW_HASKELL__=611","-Iinclude","-I.","-I/home/kili/src/ghc/ghc-head/includes","-I/home/kili/src/ghc/
ghc-head/libffi/build/include","-liconv"])
/usr/bin/gcc returned ExitFailure 1 with error message:
/usr/bin/ld: cannot find -liconv
collect2: ld returned 1 exit status
("/usr/bin/gcc",["/tmp/14231.c","-o","/tmp/14231","-liconv"])
/usr/bin/gcc returned ExitFailure 1 with error message:
/usr/bin/ld: cannot find -liconv
collect2: ld returned 1 exit status
("/usr/bin/gcc",["/tmp/14231.c","-o","/tmp/14231","-liconv"])
/usr/bin/gcc returned ExitFailure 1 with error message:
/usr/bin/ld: cannot find -liconv
collect2: ld returned 1 exit status
("/usr/bin/gcc",["/tmp/14231.c","-o","/tmp/14231","-c","-D__GLASGOW_HASKELL__=611","-Iinclude","-I.","-I/home/kili/src/ghc/ghc-head/includes","-I/home/kili/src
/ghc/ghc-head/libffi/build/include"])
ghc-cabal: Missing dependency on a foreign library:
* Missing C library: iconv
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
Ciao,
Kili
More information about the Libraries
mailing list