[MLton] Build fails on "unset ARCHNOPSYS ARCH OPSYS HEAP_SUFFIX"

Vesa Karvonen vesa.karvonen@cs.helsinki.fi
Mon, 25 Jul 2005 13:50:39 +0300


When I tried building MLton on a university server it failed. I tracked
down the cause to the command in the subject line. The reason is that the
variable ARCHNOPSYS does not get defined by the .arch-n-opsys script (!)
of the SML/NJ version installed on the server.

  $ .arch-n-opsys
  ARCH=x86; OPSYS=linux; HEAP_SUFFIX=x86-linux

  $ sml
  Standard ML of New Jersey v110.45 [FLINT v1.5], February 13, 2004

Below is one possible way to fix the problem (for good), but it uses sed,
which may be undesirable. Is it really imperative to unset the variables?

$ cvs diff
Index: bin/mlton-script
===================================================================
RCS file: /cvsroot/mlton/mlton/bin/mlton-script,v
retrieving revision 1.12
diff -r1.12 mlton-script
17c17
<       unset ARCHNOPSYS ARCH OPSYS HEAP_SUFFIX
---
>       unset `.arch-n-opsys | sed 's#=[^ ]*##g'`