| I was compiling the Ports  library with ghc-5.02.2 using the 
| native code generator (on  Linux/i386), and the compiler 
| declared  itself buggy with the following message:
| 
| --- command line:
| /usr/bin/ghc -c Ports.hs -fasm -O -recomp -package concurrent 
| -package lang -package posix  
| 
| ghc-5.02.2: panic! (the `impossible' happened, GHC version 5.02.2):
|         getRegister(x86,unary primop) (Prim makeStablePtrzh 

Yes, the native code generator in 5.02.2 doesn't do primops.
(It does in the HEAD.)  You so you can't use -fasm for it.

| I was using the "-fasm" option in order to avoid a bug that 
| happens when using the  C code generator with  the "-O" 
| option (I  submitted a report for this  one on GHC's page on  
| SourceForge).

Yes, this bug too is fixed in the HEAD. There is a workaround
for it; use -x in your 'ld' command line.  

| Loading package ports ... linking ... 
| /usr/local/lib/ports-0.3.3/ghc5/portsHS.o: unknown symbol 
| `__stginit_Concurrent'
| ghc-5.02.2: panic! (the `impossible' happened, GHC version 5.02.2):
|         can't load package `ports'
|
| I made the  "ports.conf" file  myself, it  simply declares  the 
| package "ports" with  appropriate paths and  with 
| hs_libraries=["portsHS"], with no extra library or compiler options.

You need to make the ports package depend on the concurrent
package, using an entry in ports.conf.  The package config files
are documented in the user guide.

Admittedly, the error message is not very illuminating.

Simon

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

Reply via email to