| -----Original Message-----
| From: Josef Svenningsson [mailto:[EMAIL PROTECTED]] 
| Sent: Monday, December 03, 2001 12:19 PM
| To: [EMAIL PROTECTED]
| Subject: Compiling GHC
| 
| 
| G'day!
| 
| I just want to report on my little project of making ghc 
| compile from cvs
| here at Chalmers. The problem is to make ghci work correctly, 
| the compiler
| works just fine.
| 
| As a step on the way I've had to add the following lines in
| ghc/rts/Linker.c in the definition of RTS_SYMBOLS:
| 
|       Sym(__ashldi3)                            \
|       Sym(__lshrdi3)                            \
|       Sym(__ashrdi3)
| 
| So far so good. No more complaints about undefined symbols.
| But when I compiled ghc last time I got the following error message
| when trying to start ghci:
| 
| GHCi runtime linker: fatal error: I found a duplicate definition for
| symbol
|    gcc2_compiled.
| whilst processing object file
|    /users/cs/josefs/ghchome/lib/ghc-5.03/HSstd_cbits.o
| This could be caused by:
|    * Loading two different object files which export the same symbol
|    * Specifying the same object file twice on the GHCi command line
|    * An incorrect `package.conf' entry, causing some object to be
|      loaded twice.
| GHCi cannot safely continue in this situation.  Exiting now.  Sorry.
| 
| 
| What to do?
| 
|       /Josef
| 
| PS. gcc is 2.95.3 and I'm running on a sparc solaris

Wierd.  We work with sparc-solaris-2.7 and gcc 2.95.3 
and it all works.

gcc2_compiled is a bogus symbol inserted by gcc into all its 
generated assembly, for no apparent reason.

Suggestion:
Look in rts/Linker.c in fn ocGetNames_ELF.  Find a comment
"And the decision is ..." followed by "if (ad != NULL) ...".
Immediately before the if, add:
   if (0 == strcmp(nm,"gcc2_compiled.")) ad = NULL;
which causes these symbols to be ignored.

See if that helps.

J


_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to