[darcs-users] ghci hints?
Andrew Pimlott
andrew at pimlott.net
Tue Oct 5 02:04:04 UTC 2004
I've been struggling to load darcs modules into ghci. After several
tries, I stumbled upon the ghci target in the makefile, but still no
luck:
% make ghci
ghci -cpp -package unix -package parsec -O -funbox-strict-fields -DHAVE_CURSES -package util -optl-lcurses -optl-lz -optl-lpthread darcs.lhs compat.o fpstring.o zlib_helper.o c_context.o
warning: -O conflicts with --interactive; -O ignored.
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.2.1, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ... done.
Loading package lang ... linking ... done.
Loading package concurrent ... linking ... done.
Loading package QuickCheck ... linking ... done.
Loading package readline ... linking ... done.
Loading package unix ... linking ... done.
Loading package posix ... linking ... done.
Loading package util ... linking ... done.
Loading package parsec ... linking ... done.
Loading object (static) compat.o ... done
Loading object (static) fpstring.o ... done
Loading object (static) zlib_helper.o ... done
Loading object (static) c_context.o ... done
Loading object (dynamic) curses ... done
Loading object (dynamic) z ... done
Loading object (dynamic) pthread ... failed.
Dynamic linker error message was:
/usr/lib/libpthread.so: invalid ELF header
Whilst trying to load: (dynamic) pthread
Directories to search are:
ghc-6.2.1: user specified .o/.so/.DLL could not be loaded.
make: *** [ghci] Error 1
zsh: exit 2 make ghci
Probably a ghc bug. I tried narrowing the command line, and got a
different problem:
% ghci -cpp -package unix -package parsec -O -funbox-strict-fields -DHAVE_CURSES -package util -optl-lcurses -optl-lz compat.o fpstring.o c_context.o
warning: -O conflicts with --interactive; -O ignored.
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.2.1, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ... done.
Loading package lang ... linking ... done.
Loading package concurrent ... linking ... done.
Loading package QuickCheck ... linking ... done.
Loading package readline ... linking ... done.
Loading package unix ... linking ... done.
Loading package posix ... linking ... done.
Loading package util ... linking ... done.
Loading package parsec ... linking ... done.
Loading object (static) compat.o ... done
Loading object (static) fpstring.o ... done
Loading object (static) c_context.o ... done
Loading object (dynamic) curses ... done
Loading object (dynamic) z ... done
final link ... done
Prelude> :load Printer
Skipping PatchMatchData ( ./PatchMatchData.lhs, ./PatchMatchData.o )
Skipping DarcsFlags ( ./DarcsFlags.lhs, ./DarcsFlags.o )
Skipping Exec ( ./Exec.lhs, ./Exec.o )
Skipping Autoconf ( ./Autoconf.lhs, ./Autoconf.o )
Skipping Workaround ( ./Workaround.hs, ./Workaround.o )
Skipping DarcsUtils ( ./DarcsUtils.lhs, ./DarcsUtils.o )
Skipping DarcsURL ( ./DarcsURL.hs, ./DarcsURL.o )
Skipping SignalHandler ( ./SignalHandler.lhs, ./SignalHandler.o )
Skipping FastPackedString ( ./FastPackedString.hs, ./FastPackedString.o )
Skipping Lock ( ./Lock.lhs, ./Lock.o )
Skipping Curl ( ./Curl.hs, ./Curl.o )
Skipping External ( ./External.hs, ./External.o )
Skipping Printer ( Printer.lhs, Printer.o )
Ok, modules loaded: Printer, External, Curl, Lock, FastPackedString, SignalHandler, DarcsURL, DarcsUtils, Workaround, Autoconf, Exec, DarcsFlags, PatchMatchData.
Prelude Printer> renderWith simplePrinters (text "abc") :: String
Loading package haskell98 ... linking ... done.
./Lock.o: unknown symbol `__stginit_SignalHandler_'
Any idea what's causing that? I get the same thing when I whittle the
command line down to
ghci -cpp fpstring.o /usr/lib/libz.so compat.o
I'm using ghc 6.2.1 on Debian unstable.
Andrew
More information about the darcs-users
mailing list