[Template-haskell] Template Haskell bug

Derek Elkins ddarius86@hotmail.com
Sun, 16 Mar 2003 00:17:25 -0500


First, temporary stop-gap measure:  Just strip that symbol from 
HSbase_cbits.o and hopefully you don't need it.

I've experienced something similar on Cygwin.  There are four symbols 
undefined that causes the exact same error (only with different symbols, one 
is, for example, __imp___pctype).

WARNING! The rest is under-educated rampant speculation, take a shaker of 
salt with this grain of thought.

I imagine the problem has to do with differing libraries linked in when 
compiling as compared to interpreting.  Either different libraries needed to 
make an exe (my symbols seem related to importing definitions from mscrt in 
MinGW) or "different" RTS's (your symbol looks like GMP stuff).  As I don't 
imagine GHCi is broken this blatantly in 5.05 (though try it and see) and it 
would seem sensible for TH to use some of GHCi code, my suspicion is the 
problem is in setup/interface code in TH for/to GHCi.  Unless, of course, 
GHCi is broken, then almost certainly that's the problem.  Or perhaps 
simply, the symbols just shouldn't be there.

Well, hopefully, you get a coherent response from someone in the know.  In 
the meantime, hopefully you'll make some work-around or my stop-gap solution 
works for you.  I'm not too gung-ho into looking into it myself; the 
stop-gap solution works beautifully for me, and I can live with my program 
exploding into glittery pieces if I use the wrong function (or more likely 
simply not linking), since I doubt I'll ever use the ones related to the 
"undefined" symbols I've stripped.




>From: Sean Seefried <sseefried@cse.unsw.EDU.AU>
>To: template-haskell@haskell.org
>Subject: [Template-haskell] Template Haskell bug
>Date: Sat, 15 Mar 2003 19:33:27 +1100 (EST)
>
>With GHC HEAD as of 14/03/2003 I get the following error when I try to
>compile:
>
>This was done on Debian Linux kernel version 2.4.20
>
>main = putStrLn (show ($([| 20 |])))
>
>---------------
>
>/home/sseefried/local/lib/ghc-5.05/HSbase_cbits.o: unknown symbol
>`__umoddi3'
>Loading package base ... linking ... ghc-5.05: panic! (the `impossible'
>happened, GHC version 5.05):
>         can't load package `base'
>
>Please report it as a compiler bug to glasgow-haskell-bugs@haskell.org,
>or http://sourceforge.net/projects/ghc/.
>
>---------------
>
>Any idea why?
>
>Sean Seefried
>_______________________________________________
>template-haskell mailing list
>template-haskell@haskell.org
>http://www.haskell.org/mailman/listinfo/template-haskell


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail