Re: installation instructions
Matthew Fluet <[email protected]> Mon, 21 Dec 2015 10:26:02 -0500
| Newsgroups | gmane.comp.lang.ml.mlton.user |
|---|---|
| Message-ID | <CAMrhFL5g7Y8QuGCMdjrZ+5mCnOhfdqtXn1ENSXNxqjNmo6u=fQ@mail.gmail.com> |
On Tue, Dec 15, 2015 at 11:07 PM, Jeremy Dawson <[email protected]> wrote: > I couldn't find installation instructions - there's a page > http://www.mlton.org/Installation > which tells you what happens if you succeed (and as it puts stuff in > /usr/lib and /usr/bin it won't succeed if you don't have the right > permissions). There is also the page: http://www.mlton.org/SelfCompiling that has some more details on building from source. > How do I actually (1) install mlton and (2) install it somewhere other > than /usr/{lib,bin} > > I did try typing "make" which seemed to do a lot but finished up with > make[4]: Entering directory `/mnt/local/mlton/mlton/front-end' > rm -f ml.lex.* > no-mllex ml.lex > make[4]: no-mllex: Command not found > make[4]: *** [ml.lex.sml] Error 127 > make[4]: Leaving directory `/mnt/local/mlton/mlton/front-end' > make[3]: *** [front-end/ml.lex.sml] Error 2 > make[3]: Leaving directory `/mnt/local/mlton/mlton' > make[2]: *** [compiler] Error 2 > make[2]: Leaving directory `/mnt/local/mlton' > make[1]: *** [all-no-docs] Error 2 > make[1]: Leaving directory `/mnt/local/mlton' > make: *** [all] Error 2 When building from sources, there are a number of components that get built. The first is the runtime system, which is written in C. That's the "seems to do a lot" portion of the build that you saw. The next is building the compiler proper, which is written in SML (and using SML scanner- and parser-generator tools); that's where you are seeing failure, since the mllex tool cannot be found (and, presumably, would go on to not find the mlyacc tool nor a mlton compiler). As Ian mentioned, you will need to install a binary version of MLton if you wish to build from source. If you want to install the binary version somewhere other than "/usr/local/", then simply proceed something like: [matthew@shadow ~]$ cd ~/sw/ [matthew@shadow sw]$ mkdir mlton-20130715-1 [matthew@shadow sw]$ cd mlton-20130715-1 [matthew@shadow mlton-20130715-1]$ cp ~/Downloads/mlton-20130715-1.amd64-linux.tgz . [matthew@shadow mlton-20130715-1]$ tar -xzf mlton-20130715-1.amd64-linux.tgz [matthew@shadow mlton-20130715-1]$ mv usr/bin bin [matthew@shadow mlton-20130715-1]$ mv usr/lib/mlton lib [matthew@shadow mlton-20130715-1]$ rmdir usr/lib [matthew@shadow mlton-20130715-1]$ mv usr/man man [matthew@shadow mlton-20130715-1]$ mv usr/share/doc/mlton doc [matthew@shadow mlton-20130715-1]$ rmdir usr/share/doc [matthew@shadow mlton-20130715-1]$ rmdir usr/share [matthew@shadow mlton-20130715-1]$ rmdir usr [matthew@shadow mlton-20130715-1]$ sed --in-place '/^lib=/s;.*;lib=`cd "$dir/../lib" \&\& pwd`;' bin/mlton [matthew@shadow mlton-20130715-1]$ cd .. [matthew@shadow sw]$ ./mlton-20130715-1/bin/mlton MLton 20130715 (built Wed Jul 17 03:58:25 EDT 2013 on shadowvm02) -- You received this message because you are subscribed to the Google Groups "MLton-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. ------------------------------------------------------------------------------