Bug#294481: ghci -lpthread fails

Ian Lynagh igloo at earth.li
Thu Feb 10 18:34:39 EST 2005


On Thu, Feb 10, 2005 at 07:00:47PM +0100, Juliusz Chroboczek wrote:
> Hi Ian,
> 
> > What is your particular problem?
> 
> Running Darcs under ghci.

This seems to work for me (at least in as much as ghci loads and
    FastPackedString.lengthPS (FastPackedString.packString "Foo")
says 3):

rm -rf .libs
rm *ghcidarcsfoo*
touch ghcidarcsfoo.c
libtool --mode=compile gcc -g -O -c ghcidarcsfoo.c
libtool --mode=link gcc -g -O -o libghcidarcsfoo.la ghcidarcsfoo.lo -lpthread -rpath /usr/lib
libtool --mode=install cp libghcidarcsfoo.la `pwd`/libghcidarcsfoo.la
libtool --finish /usr/lib
ghci -cpp -package unix -package parsec -O -funbox-strict-fields -Werror -package util -I. -DHAVE_CURSES -optl-lcurses -optl-lz -L`pwd` -optl-lghcidarcsfoo darcs.lhs compat.o fpstring.o zlib_helper.o c_context.o

Is there a problem with this? Could something along these lines be done
when -lfoo (as opposed to -optl-lfoo, which for consistency should
probably be left alone) is given on the ghci command-line?

I'm no library expert, so there may be a cleaner/simpler/more portable
equivalent to the above.


Thanks
Ian



More information about the Glasgow-haskell-users mailing list