Installing MetaPRL

Warning: MetaPRL is currently Beta and could still have some nasty bugs.

Downloading MetaPRL

In order to compile and run MetaPRL you are going to need the following packages:

  1. Objective Caml: our version contains a small patch to CamlP4 to compile the CamlP4 distribution in native code.
  2. The OMake build system.
  3. OpenSSL libraries and header files are optional, but highly recommended.
  4. MetaPRL sources.

OCaml is currently available as source, Fedora Core 2, 3, 4 and 5, Mandrake 10.1, and Red Hat Enterprize Linux 3 and 4 RPM files for Linux x86. You can get the listing of available RPMs and download them from http://rpm.nogin.org/ocaml.html or a plain listing directly from http://rpmbin.nogin.org/MetaPRL/. If you are going to build OCaml yourself, get OCaml sources from http://caml.inria.fr/ocaml/release.en.html and our patches at http://svn.metaprl.org/viewcvs/mojave/metaprl/patches/ (see the README file for the list of patches you need to apply).

OMake source and binaries for a number of Linux distributions OS X and Windows can be dowloaded from http://omake.metaprl.org/download.html.

OCaml and OMake may also be obtained via the GODI Distribution Framework.

If you are using a Unix-like operation system, you probably already have a copy of OpenSSL around (note that you need the development files as well, which are often distributed in a separate openssl-devel or libopenssl-devel package). OpenSSL for Windows is available at http://www.slproweb.com/products/Win32OpenSSL.html.

You should be able to download MetaPRL sources tarball from http://files.metaprl.org/, but if you plan to participate in MetaPRL development, you should consider using the Subversion access to MetaPRL sources.

Subversion Access to MetaPRL Sources

You can browse the MetaPRL sources repository.

If you plan any development in MetaPRL or if you want to download the latest version of MetaPRL, you may consider using the public Subversion repository. This will allow you to have access to the latest changes in the distribution. The normal service is read-only, but if you would like to become a contributor with write access, read the read-write Subversion instructions.

The Subversion server is on the machine svn.metaprl.org. You can checkout the distribution by running:

% svn co svn://svn.metaprl.org/metaprl 
From the same server you can also checkout the OMake distribution by running:
% svn co svn://svn.metaprl.org/omake-branches/0.9.8.x omake
If for some reason (firewall, etc) you are having trouble using the svn:// access method, you can use http:// instead:
% svn co http://svn.metaprl.org/svnroot/mojave/metaprl
% svn co http://svn.metaprl.org/svnroot/mojave/omake-branches/0.9.8.x omake

You can find more information on Subversion from the Subversion Home Page, Subversion FAQ, and from The Subversion Book.

Installation and configuration

OCaml

If you are not using the provided RPMs, then in order to install OCaml and CamlP4 download and unpack the distributions, than apply the patches (see the README file for the list of patches you need to apply). After that, proceed as described in the INSTALL files in the distributions. If your OS supports pthreads, run OCaml configure script with -with-pthread option in order to get pthreads support in OCaml. After you have compiled and installed OCaml and Camlp4, go to the OCaml source tree and copy the following files:

into the OCaml library directory.

OMake

To build OMake from sources change to the OMake source directory and run ./configure followed by make and make install

MetaPRL

To install MetaPRL, unpack the distribution into some directory <metaprl> and build the distribution with these steps:

% cd <metaprl>
% omake

After you run omake for the first time, it will create the mk/config file (as well as an empty mk/config.local file) that you will need to customize, before the omake process can continue. The mk/config file is self-documenting.

You may need to set variables CAMLLIB and CAMLP4LIB to point to the directories where you have installed OCaml and Camlp4 files. You can either set them in the mk/config.local file, for example:
CAMLLIB=/usr/lib/ocaml
CAMLP4LIB=/usr/lib/ocaml/camlp4

or in the environment. If a variable is set in both, mk/config.local takes precedence over the environment. The defaults are /usr/lib/ocaml and /usr/lib/ocaml/camlp4 respectively.

Additional configuration options might be necessary on Windows and Mac OS X. See the corresponding README files in the top-level MetaPRL directory for more information.

MetaPRL can be run with the

<metaprl>/editor/ml/mp

script. By default, this will attempt to start your browser or prompt you to connect using your browser. MetaPRL looks better if you use Mozilla or Firefox, but other browsers (including Konqueror and IE) are likely to work as well. Internet Explorer is known to work well when "Arial Unicode MS" font is installed (arialuni.ttf is available on Microsoft Office CD inside office1.cab; note that it is not always installed automatically with MS Office) otherwise some symbols might not by displayed; some other "rich" font might work as well.

You don't have to use the browser. You can also use the command-line interface by running MetaPRL with the -cli option, which will expect to be running in a console with Unicode fonts. To run mp -cli in an xterm with the correct fonts, use <metaprl>/editor/ml/mpxterm (normal fonts), <metaprl>/editor/ml/mpxterm-large (larger font), or <metaprl>/editor/ml/mpkonsole (to run in KDE's konsole)

If starting MetaPRL by hands (or from Emacs), the programs to use are <metaprl>/editor/ml/mpopt (native code) and <metaprl>/editor/ml/mptop (bytecode). You will need to use a Unicode (iso10646-1) font to be able to interact with some sense. We currently recommend using the -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1 font (which is what mpxterm script uses), but in some cases another font may work better.

That's it. To navigate the MetaPRL logics and programs, you will need to read the <metaprl>/QUICKSTART file or the User Guide. To start developing new code, read the Developer Guide.

If you need help installing MetaPRL, please feel free to contact us at metaprl at metaprl.org.