[Haskell-cafe] readline does not work on gentoo amd64 (ghc-6.10.4)

Sergei Trofimovich slyich at gmail.com
Mon Sep 21 14:58:01 EDT 2009

Hi, dear list! libraries at haskell.org treats me as a spammer, so
I'm writing here.

Today I've stuck with following problems:
1. After recent readline upgrade (5 -> 6) in my distro I got
unbuildable lambdabot. After investigating a little I've
noticed I'm having broken readline:

$cabal install readline
$ ghci -package readline
GHCi, version 6.10.4: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Loading package syb ... linking ... done.
Loading package base- ... linking ... done.
Loading package filepath- ... linking ... done.
Loading package old-locale- ... linking ... done.
Loading package old-time- ... linking ... done.
Loading package unix- ... linking ... done.
Loading package directory- ... linking ... done.
Loading package process- ... linking ... done.
Loading package readline- ... <command line>: can't load .so/.DLL for: readline (/usr/lib64/libreadline.so: invalid ELF header)

It's true, there is no real ELF library, but none of packages
complained before.

$ cat /usr/lib64/libreadline.so
/* GNU ld script
   Since Gentoo has critical dynamic libraries in /lib, and the static versions
   in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we
   run into linking problems.  This "fake" dynamic lib is a linker script that
   redirects the linker to the real lib.  And yes, this works in the cross-
   compiling scenario as the sysroot-ed linker will prepend the real path.

   See bug http://bugs.gentoo.org/4411 for more info.
OUTPUT_FORMAT ( elf64-x86-64 )
GROUP ( /lib64/libreadline.so.6 )

Looks like readline package can't resolve real ELF library
path to readline in readline.buildinfo (right after cabal configure):

$ cat readline.buildinfo
buildable: True
extra-libraries: readline ncurses

And second minor nit:
readline tarball is unusable after issuing 'cabal clean':
$ cabal clean && cabal configure
Resolving dependencies...
Configuring readline-
configure: error: cannot find sources (include/HsReadline.h) in . or ..

Practically these issues can be solved by moving lambdabot to haskeline tracks.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090921/d68236d7/signature.bin

More information about the Haskell-Cafe mailing list