[MLton-user] mlton and netbsd
mtf at cs.rit.edu
Fri Oct 9 10:03:11 PDT 2009
On Tue, 6 Oct 2009, fulvio ciriaco wrote:
> fortunately bootstrapping with smlnj-mlton resulted quite feasable,
> as soon as I increased memory to 2 Gb.
> I used smlnj v110.70.
> I left it compiling in the evening and found it done in the morning.
Well, bootstrapping mlton with mlton is a 10min compile; so don't get the
impression that the speed with which SML/NJ executes the compiler is the
speed with which MLton executes the compiler.
> Only the following needed fixing:
> the install procedure
> the mlyacc Makefile, seems to require mlyacc, I patched it so:
> - mllex src/yacc.lex && \
> + (mllex src/yacc.lex || ml-lex src/yacc.lex) && \
> - mlyacc src/yacc.grm && \
> + (mlyacc src/yacc.grm || ml-yacc src/yacc.grm) && \
> chmod -w src/yacc.grm.*
> so it accepts ml-yacc from smlnj when mlyacc is not found.
You would presumably also need SML/NJ's ml-yacc and ml-lex for the
<src>/mlton/front-end/Makefile (not just for the <src>/mlyacc/Makefile),
since none of the generated files are part of the source distribution.
Also, the above is a little noisy, as the shell will print an error when
it doesn't find mllex or mlyacc.
In any case, I've committed a patch that looks for MLton's tools first,
and then falls back to SML/NJ's tools.
However, bootstrapping from SML/NJ is not considered an "official" method
of compiling MLton. Please do not make SML/NJ a build requirement for
> Also, benchmark/main.sml has no support for netbsd and is not
> documented for mlton:
The benchmark program isn't part of the installed programs; it is only
used by developers, and isn't fully documented. (There are a number of
other flags besides those on the usage line.) And it has no explicit
support for many SML/NJ platforms.
I've committed a more robust method of determining the SML/NJ heap suffix.
More information about the MLton-user