[plt-scheme] Building PLT from source - Segmentation fault on Kubuntu 9.10

From: Synx (plt at synx.us.to)
Date: Tue Jan 19 15:21:15 EST 2010

> env XFORM_PRECOMP=yes ../mzschemecgc -cqu ../../../mzscheme/gc2/
> xform.ss --setup . --cpp "gcc -E -DNEWGC_BTC_ACCOUNT  -I./.. -
> I../../../mzscheme/gc2/../include"  --keep-lines -o xsrc/
> precomp.h ../../../mzscheme/gc2/precomp.c
> Segmentation fault
> make[4]: *** [xsrc/precomp.h] Error 139
> make[4]: Leaving directory `/home/tpj/opt/PLT/plt-4.1.5/src/build/
> mzscheme/gc2'

Ew, that's bad. I don't know the solution, but what might help you
better diagnose is, first enable core dumps, then run that command
manually in the src/build/mzscheme/gc2 directory. So something like...

$ cd src/build/mzscheme/gc2
$ ulimit -c unlimited
$ env XFORM_PRECOMP=yes ../mzschemecgc -cqu ../../../mzscheme/gc2/ \
xform.ss --setup . --cpp "gcc -E -DNEWGC_BTC_ACCOUNT  -I./.. - \
 I../../../mzscheme/gc2/../include"  --keep-lines -o xsrc/

It will fail, but say "Segmentation fault (core dumped)" instead,
creating a file named 'core'. Then you can use the core like this:

$ gdb ../mzschemecgc core
etc etc etc...
(gdb) bt

That will give you a current backtrace up to the point the segmentation
fault occurred. Assuming it happened in a piece of code with debugging
enabled that hasn't been stripped of symbols, you'll see the name of the
C function in which the memory overflow occurred.

Telling us the name and line number, and giving us the backtrace might
help. But I cannot say whether it would help without first seeing it.
And many people here are far more experienced with the PLT build process
than me.

You also should make sure your source isn't corrupted, and that your
hard disks are functioning properly, to rule out unexpected things in
your own computer's environment that would make the build process fail.

Posted on the users mailing list.