lambdabot のリンクエラーではまった

lambdabot を Arch Linux にインストールしようとして cabal install lambdabot したら,ビルドの途中で

can't load .so/.DLL for: ncurses (/usr/lib/libncurses.so: file too short)

というエラーがでた.
lambdabot.cabal が間違っていたり,ncurses のインストールがうまくいっていないと思っていたが,原因は違うところにあった.
エラーメッセージでググったところ,こんなのがヒットした.
http://www.mail-archive.com/yi-devel@googlegroups.com/msg01903.html
これへの返信を見ると

On Sun, Dec 7, 2008 at 11:21 PM, Don Stewart <[EMAIL PROTECTED]> wrote:
> This is really simple.
>
> Arch has started using linker scripts for some .so files (look at the
> contents of ncurses.so - it is a linker script pointing to ncuresw.so)
>
> GHCi can't interpret linker scripts when loading C libraries, so it
> fails.
>
> The solution is trivial: ln -s the linker script to the thing it points to.
>
> I've not got a better workaround. We could perhaps modify the linker to
> interpret the most common linker scripts.
>
> -- Don

http://www.mail-archive.com/yi-devel@googlegroups.com/msg01917.html

ということらしい.


というわけで,/usr/lib/libncurses.so を一時退避させ,ln -s /usr/lib/libncursesw.so /usr/lib/libncurses.so してから cabal install lambdabot でうまくいった.
リンクした後はもう関係ないので,一時退避させていた /usr/lib/libncurses.so を戻して終わり.