MLTon build (was: Re: [MLton] cvs commit: C types now distinguish between signed and unsigned words)

Matthew Fluet fluet@cs.cornell.edu
Fri, 14 Jan 2005 10:39:38 -0500 (EST)


> > These are the benign 'command not found' warnings mentioned on the wiki
> > page.  You can safely ignore them, as they did not abort the
> > compilation.
>
> Did not mentioned here (or I can't find it there, at least)...
> http://mlton.org/SelfCompiling

See the second and third paragraphs under the third bullet of Possible
Errors on that page.

> And how can I install mllex if MLTon was not builded? Or I miss
> something?

You can't build mlton from source without first installing a binary
version.  You should first go to
  http://mlton.org/Download
and download the Darwin package.  Simply untar it in / as root.  That will
install /usr/bin/mlton, /usr/bin/mllex, /usr/bin/mlyacc, etc.

As you noted before, if the gmp library is not in /usr/local/lib,
then you will need to adjust
  /usr/lib/mlton/include/platform/darwin.h
and you may also need to edit
  /usr/bin/mlton
and edit the -target-link-opt darwin line to read:
        -target-link-opt darwin '-L /path/to/gmp -lgmp'         \

At this point, you should have a working MLton installed, and, if you
wished, you could now continue with a self-compile.  But, there is really
no need.

> >> I found at the Wiki page that I have to have mlton source directory at
> >> the path,
> >
> > That is incorrect.  You need to have a directory with a mlton
> > executable
> > on your path.  The Wiki page is saying that the source directory's
> > /build/bin path is automatically added to your path during the make.
>
> It's better to write it like you do - because I read Wiki page about
> that for about 10 time, but I can not understand it. While your phrase
> is clear - will you add/edit it to the SelfCompile?

The meaning of the line:

    You need to have {{{mlton}}} in your path to build MLton from source.

is that the executable mlton must be on your path.  Note that with
non-text web-browser, {{{mlton}}} is displayed in a typewriter font, which
is meant to indicate that we are speaking about a particular program, not
a particular path.