Can't think of a reasonable explanation for the behaviour
you're seeing, I'm afraid. If you look at the undefined
symbols from the link, _ZCMain_main_closure
isn't being found -- it should be in Build.o, which is included
on the command line. The weird thing is that the linker
does report undefined symbols from that closure's
entry point, _ZCMain_main_entry (in Build.o), but fails to
see the (.data) symbol for the closure itself.

On the off-chance you haven't tried this already, could you try
to delete the object files and re-do the --make? Add -fvia-C
while you're at it.

If you want to examine what the linker actually slurps in,
try -optl-Wl,--verbose

GHC binary installs on Windows are islands as far as tools
needed to compile&link Haskell code goes. You may run into
trouble if you compile a .c file with a local installation of
gcc and then try to link the object file with ghc, but I don't
think that's the case here.

--sigbjorn

----- Original Message ----- From: "Alastair Reid" <[EMAIL PROTECTED]>
To: "Sigbjorn Finne" <[EMAIL PROTECTED]>
Cc: <glasgow-haskell-bugs@haskell.org>
Sent: Monday, August 22, 2005 06:16
Subject: RE: Undefined symbols on new install of ghc 6.2.2


Thanks Sigbjorn,

Chris gave these a shot and everything looks right.  (i.e., the symbols
exist, tmpdir is big and changing it doesn't help and invoking ghc on
the .o files directly doesn't help.)

Also, building with the latest release of ghc works fine.  (This is
slightly tedious because we need both 6.2.2 and 6.4 at the moment but
we'll probably update our code to work with 6.4 sometime soon anyway.)

One interesting detail was that the .a file has names with
triple-underscore prefixes but the linker error messages have
single-underscore prefixes.  Is this just the linker deleting _'s when
displaying error messages or is this the real problem?
I'm not sure what Chris has installed on his machine but is it possible
that if he had cygwin (say) installed the gcc from that install would be
used instead of the one that comes in the ghc package?

--
Alastair Reid, Principal Engineer, R&D
ARM Ltd, 110 Fulbourn Rd, Cambridge, CB1 9NJ.
T: +44 1223 406 109


_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to