RE: internal error: weird activation record found on stack: 9

On 03 January 2005 15:19, Peter Simons wrote:
I wrote:
Simon Marlow writes:
Please compile the program with -debug, then open it with gdb.
Unfortunately, -debug seems to conflict with -threaded:
ghc --make -threaded -debug -O -Wall [...] -o postmaster tutorial.lhs [...] > Chasing modules from: tutorial.lhs [...] Compiling Main ( tutorial.lhs, .objs/Main.o ) Linking ... /usr/lib/gcc-lib/i686-pc-linux-gnu/bin/ld: cannot find -lHSrts_thr_debug > collect2: ld returned 1 exit status
It has been a while since this problem came up, and I was wondering what to do now, because the software keeps crashing (or freezing) every few days.
Any advice, anyone?
If your program still works without -threaded, then that's an option. Otherwise, you'll need to compile up a local copy of the debug/threaded RTS so you can use -debug and -threaded together. The way to do that is to add "GhcRtsWays += thr_debug" to mk/build.mk in a GHC tree, and build as normal. You can then either use this GHC to build your app, or just use the thr_debug version of the RTS with your existing GHC installation by giving the appropriate -L option when linking (it better be the same GHC version, of course). Cheers, Simon

Simon Marlow writes:
you'll need to compile up a local copy of the debug/threaded RTS so you can use -debug and -threaded together. The way to do that is to add "GhcRtsWays += thr_debug" to mk/build.mk in a GHC tree, and build as normal.
Unfortunately, that didn't work. I've added the option: peti:/usr/local/src/ghc-current# cat ghc/mk/build.mk XMLDocWays := html GhcRtsWays += thr_debug SRC_CC_OPTS += -nopie -fno-stack-protector-all -fno-stack-protector SRC_HC_OPTS += -optc-nopie -optc-fno-stack-protector-all -optc-fno-stack-protector But after building, there is no debug/threaded RTS: peti:/usr/local/src/ghc-current# find . -name *rts_* ./ghc/rts/libHSrts_p.a ./ghc/rts/libHSrts_thr.a ./ghc/rts/libHSrts_thr_p.a ./ghc/rts/libHSrts_debug.a I've done a "make distclean" and built from the scratch, too, but it didn't make a difference. I'm using GHC's CVS HEAD. Am I doing something wrong? Peter
participants (2)
-
Peter Simons
-
Simon Marlow