[MLton] MLton Debian package for etch

Stephen Weeks sweeks at sweeks.com
Tue Nov 7 14:07:57 PST 2006


MLton is currently not in Debian etch due to memory-related
bootstrapping issues.

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=396980

I shipped the Debian package, mlton_20061026-1, with the main Makefile
having the runtime option "fixed-heap 512m".  I did this to help with
building on tight-memory machines and to avoid grabbing unneeded
memory -- the idea being to grab all the memory we need at the start,
and that once we've grabbed that we know the compile will complete.
Unfortunately, this worked fine for the x86 autobuilder, but failed
for HPPA, PowerPC, and SPARC.  The logs for HPPA and SPARC

  http://buildd.debian.org/build.php?arch=sparc&pkg=mlton&ver=20061026-1
  http://buildd.debian.org/build.php?arch=hppa&pkg=mlton&ver=20061026-1

show failure in the first phase of the bootstrap during
defunctorization:

  Out of memory with fixed heap size 536,870,912.

I guess that the problem is that the live data size on these machines
is slightly larger due to 8-word alignment. 

On PowerPC, the log

  http://buildd.debian.org/build.php?arch=hppa&pkg=mlton&ver=20061026-1

shows failure during compilation of the generated C code.

     Compile C and Assemble starting
        gcc -std=gnu99 -c -I/usr/lib/mlton/include -O1 -fno-strict-aliasing \
            -fomit-frame-pointer -w -o /tmp/fileiN0Klz.o /tmp/file3sDpPn.221.c
  gcc: Internal error: Killed (program cc1)

My guess is that this is also a memory issue -- because of the
fixed-heap, MLton is holding on to the 512m, and gcc needs a lot too.

So, my current plan is to up the memory a bit, and use max-heap
instead of fixed-heap.  Something like "max-heap 640m".  I'll upload a
package today with that and see how it goes.  I'm open to other ideas.



More information about the MLton mailing list