On Wednesday, August 6, 2003, at 10:58 PM, Donald Bruce Stewart wrote:
gwright:
Hi,
I've built ghc 6.0.1 under OS X 10.2.6 and have a curious
problem with ghci. ghc seems to work fine, but ghci give me an
error. I should note that I've done the build without
Wolfgang's HaskellSupportFramework, by setting the include and
library paths in build.mk. This is more compatible with the
automated packing scheme of DarwinPorts.
This is what I see:
bash-2.05a$ ghci
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.0.1, for Haskell
98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ...
/usr/local/lib/ghc-6.0.1/HSbase_cbits.o: unknown symbol `_free'
ghc-6.0.1: panic! (the `impossible' happened, GHC version 6.0.1):
can't load package `base'
Please report it as a compiler bug to
glasgow-haskell-bugs@xxxxxxxxxxx,
or http://sourceforge.net/projects/ghc/.
bash-2.05a$
The error message comes from ghc/rts/Linker.c. Apparently dlsym
couldn't find the symbol _free from libSystem.
I suspect that doing things this way I have to link
HSbase_cbits.o (and its siblings) with -lSystem, Is that
correct, or is this a different problem? If it's obscure I have
a way I could build a new Framework out of the installed
package dependencies, but it's somewhat messy.
I think this is because $fptools/ghc/rts/Linker.c can't handle
the object file type you are trying to laod. You would have to
add/fix support for this object file type by writing some C code.
However, I'm pretty sure that ghci does work on OS X, so finding
out what Wolfgang is doing might be a faster solution.
-- Don
Hi Don,
ghc/rts/Linker.c can handle all of the types of object files that are
required;
indeed, ghci works fine when it has been built with Wolfgang's
HaskellSupportFramework.
I'm not trying to load any different files, I just need them to be in
different
places.
The problem appears to be that the Framework tells the dynamic linker
that
anything that depends on it also depends on libSystem. When not using
the
Framework, the dependency on libSystem gets lost, which it shouldn't.
Best Wishes,
Greg
|