RE: GHC 4.08.2 on OpenBSD 2.9, almost

2002-03-18 Thread Simon Marlow


 I'm trying to port any recent version of ghc to OpenBSD 2.9.

 I have, with a little bit of work, been able to compile 4.08.2
 from .hc sources.

 I now get the following kind of undefined symbol errors:
 
 Main.o: Undefined symbol `__init_Prelude' referenced from text
 segment
 Main.o: Undefined symbol `PrelBase_unpackCStringzh_closure'
 referenced from text segment
 Main.o: Undefined symbol `PrelIO_putStr_closure' 
 referenced from
 text segment
 
 [ ... ]
 
 PrelMain__1.o: Undefined symbol `___init_Main' 
 referenced from text
 segment
 .o::PrelMain(void): Undefined symbol 
 `_Main_main_closure' referenced
 from text segment
 .o::PrelMain(void): Undefined symbol 
 `_Main_main_closure' referenced
 from text segment
 
 My guess is that this kind of thing has happened before 
 ... is there
 an area in the source I should be looking at?

This looks suspiciously like a mismatch in the handling of leading
underscores in symbol names somewhere.  It appears from the messages
above that Main.o doesn't have extra leading underscores on its symbols,
but the libraries do.  Perhaps Main.o was compiled by the native code
generator?  Because the leading-underscore setting is compiled into the
compiler via an external setting, you'll need to bootstrap the compiler
before the setting will be correct for your system.

Try compiling your test program with -fvia-C.

Cheers,
Simon
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



GHC 4.08.2 on OpenBSD 2.9, almost

2002-03-16 Thread Donald Bruce Stewart

Hi,
I'm trying to port any recent version of ghc to OpenBSD 2.9.
   
I have, with a little bit of work, been able to compile 4.08.2
from .hc sources.
   
I now get the following kind of undefined symbol errors:

Main.o: Undefined symbol `__init_Prelude' referenced from text
segment
Main.o: Undefined symbol `PrelBase_unpackCStringzh_closure'
referenced from text segment
Main.o: Undefined symbol `PrelIO_putStr_closure' referenced from
text segment

[ ... ]

PrelMain__1.o: Undefined symbol `___init_Main' referenced from text
segment
.o::PrelMain(void): Undefined symbol `_Main_main_closure' referenced
from text segment
.o::PrelMain(void): Undefined symbol `_Main_main_closure' referenced
from text segment

My guess is that this kind of thing has happened before ... is there
an area in the source I should be looking at?

Thanks,

Don Stewart
[EMAIL PROTECTED]
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users