[racket-dev] Build failure on specific PPC systems

From: James Vega (jamessan at debian.org)
Date: Wed Aug 24 19:30:07 EDT 2011

Since at least 4.2.4, Racket has been failing to build[0][1] for Debian
on G5-based PowerPC systems[2][3].  At the time, the only other PowerPC
system that was available within Debian to debug on was a G4-based
system[4].  On that system, Racket has been building fine using either
the 3m or cgc GC.

Since I've generally had more luck using the cgc GC on less mainstream
systems, I set the build to use that for PowerPC and let it be in case
things changed and it started working.

Since we recently got access to a G5-based system[5], I've had a chance
to do some poking around and have found the following:

- Building with cgc fails:

  make[5]: Entering directory `/home/jamessan/racket-5.1.3+dfsg1/build/plot'
  env CC="gcc" CFLAGS="-g  -Wall     " LDFLAGS="" ../racket/racketcgc -c /home/jamessan/racket-5.1.3+dfsg1/src/plot/build.rkt "libplplot" /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/dc_drv.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plcont.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plfill.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plmap.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plshade.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plwind.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/pdfutils.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plcore.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plgridd.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plmeta.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plstripc.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plargs.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plctrl.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plhist.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plot3d.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plsym.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plbox.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plcvt.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plimage.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plpage.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/pltick.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plbuf.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/pldtik.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plline.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plsdef.c /home/jamessan/racket-5.1.3+dfsg1/src/plot/plplot/plvpor.c
  make[5]: *** [libplplot.so] Segmentation fault (core dumped)

- Building with cgc and -DMZ_DONT_USE_JIT works

- Building with 3m fails:

  make[5]: Entering directory `/home/jamessan/racket-5.1.3+dfsg1/build/racket/gc2'
  env XFORM_PRECOMP=yes ../racketcgc -cqu /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/xform.rkt --setup . --cpp "gcc -E -I./.. -I/home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/../include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 "  --keep-lines -o xsrc/precomp.h /home/jamessan/racket-5.1.3+dfsg1/src/racket/gc2/precomp.c
  make[5]: *** [xsrc/precomp.h] Segmentation fault (core dumped)

- Building with 3m and -DMZ_DONT_USE_JIT gets further than 3m on its
  own, but still fails:

  make[6]: Entering directory `/home/jamessan/racket-5.1.3+dfsg1/build/gracket/gc2'
  ../../racket/racket3m -cqu /home/jamessan/racket-5.1.3+dfsg1/src/gracket/gc2/../../racket/gc2/xform.rkt --setup ../../racket/gc2 --cpp "gcc -E -I/home/jamessan/racket-5.1.3+dfsg1/src/gracket/gc2/../../racket/gc2 -I./../../racket/ -I/home/jamessan/racket-5.1.3+dfsg1/src/gracket/gc2/../../racket/include/     -Dwx_xt -MMD"  --keep-lines -o xsrc/grmain.c +D INITIAL_COLLECTS_DIRECTORY='"'"`cd /home/jamessan/racket-5.1.3+dfsg1/src/gracket/gc2/../../../collects; pwd`"'"' /home/jamessan/racket-5.1.3+dfsg1/src/gracket/gc2/../grmain.c
  SIGSEGV MAPERR si_code 1 fault on addr 0x4
  make[6]: *** [xsrc/grmain.c] Aborted (core dumped)

I can provide stack traces of the relevant failures, if needed.

Interestingly, a binary built with 3m on a G4 runs
collects/test/racket/all.rktl just fine on the G5 system.

What differences are there between the G5 and G4 that could cause this
discrepancy?  What information can I provide or debugging can I perform
to help determine the problem?

[0]: https://buildd.debian.org/status/logs.php?pkg=racket&arch=powerpc
[1]: https://buildd.debian.org/status/logs.php?pkg=plt-scheme&arch=powerpc
[2]: http://db.debian.org/machines.cgi?host=praetorious
[3]: http://db.debian.org/machines.cgi?host=poulenc
[4]: http://db.debian.org/machines.cgi?host=pescetti
[5]: http://db.debian.org/machines.cgi?host=shooreinet
-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.racket-lang.org/dev/archive/attachments/20110824/1218608e/attachment.sig>

Posted on the dev mailing list.