[plt-scheme] Can't compile 372 on PPC64

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Mar 13 19:31:25 EDT 2008

At Thu, 13 Mar 2008 23:09:32 +0000, "Paulo J. Matos" wrote:
> On Wed, Mar 12, 2008 at 9:37 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> > At Wed, 12 Mar 2008 21:29:20 +0000, "Paulo J. Matos" wrote:
> >  > I've just tried to build PLT Scheme 372 on my PS3, PPC64 and got the
> >  > following error:
> >  >
> >  > cd gc2; make gen-deps
> >  > make[4]: Entering directory `/home/pmatos/plt-372/src/mred/gc2'
> >  > ../../mzscheme/mzscheme3m -qr "./gen-deps.ss"
> >  > Seg fault (internal error) at 0x40000030000
> >  > make[4]: *** [gen-deps] Aborted
> >  >
> >  > I was expecting it to work. Is there any architecture dependent code
> >  > that doesnt support ppc64?
> >
> >  My guess is that something is wrong with the 3m write-barrier signal
> >  handler, but that's just a guess.
> >
> >  Can you get a stack trace? I expect that just starting mzscheme3m will
> >  crash.
> >
> 
> Here's the trace:
> Program received signal SIGSEGV, Segmentation fault.
> symbol_bucket (table=0x400002c6c58, key=0x40000000008 "",
> length=33685760, naya=0x40000000000)
>     at xsrc/symbol.c:39
> 39            int c = key [i ++ ] ;
> (gdb) bt

This signal is expected. It's to trigger the write barrier.

Please try

 (gdb) handle SIGSEGV nostop noprint
 (gdb) c

and it should eventually stop again in abort(). It may stop right away,
in which case the signal handler isn't working right. But it may stop
later.

> >  By poking at plt/src/mzscheme/gc2/newgc.c, can you confirm that
> >  SIXTY_FOUR_BIT_INTEGERS is correctly #defined (should be automatic), so
> >  that the GC knows that it's working in 64-bit mode?
> >
> 
> newgc.c comes during the compulation of gc2.c:
> gcc -g -O2 -DNEWGC_BTC_ACCOUNT  -I./.. -I./../include  -Wall  -c
> ./gc2.c -o gc2.o
> In file included from ./gc2.c:15:
> ./newgc.c: In function 'pop_ptr':
> ./newgc.c:1349: warning: dereferencing type-punned pointer will break
> strict-aliasing rules
> 
> Nothing shows that SIXTY_FOUR_BIT_INTEGERS is defined during compilation.

Nothing would be particularly visible during compilation, but if you
add something like

 #ifdef SIXTY_FOUR_BIT_INTEGERS
 this is an error
 #endif

to the end of the file, it should fail to compile.

Thanks,
Matthew



Posted on the users mailing list.