OcamIL

Sources installation notes


Links

Prerequisites

Operating system

  • Windows 98 or above (Windows XP recommended, Vista not tested).
    Cygwin is required for the sources compilation under Windows.
  • Unix

.NET Framework implementation

You can choose one of the following .NET Framework
  • Microsoft .NET Framework
  • Mono .NET Framework

Microsoft.NET Framework 1.1 Redistributable

You need to download and install Microsoft.NET Framework 1.1 Redistributable, check out .NET Framework downloads page.

You MUST set the %PATH% environment variable in order to make the .NET command-line utilities reachable.

Since the corresponding installation directory is usually C:\WINDOWS\Microsoft.NET\Framework\v1.1.[version], just type ([version]=4322 in the following example):

> set PATH=C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322;%PATH%

Microsoft.NET Framework 1.1 SDK

This is needed by the bootrapped OCamIL compiler and the OCamIL toplevel installation procedure, which requires the gacutil tool. The SDK is also available at .NET Framework downloads page.

You MUST set the %PATH% environment variable in order to make the gacutil tool reachable, for instance (assuming default SDK installation settings):

> set PATH=C:\Program Files\Microsoft.NET\FrameworkSDK\Bin;%PATH%

Mono .NET Framework

You need to download and install Mono .NET Framework, check out Mono downloads page. This framework works under Windows and Unix.

Installation pathes

  • let [CYGWINPATH] be the root of the cygwin installation (ie. C:/cygwin)
  • let [OCAML306] be the root of the untarred OCaml sources (ie. C:/ocaml-3.06)
  • let [CAMILSRC] be the location the unzipped OCamIL source distribution (ie. C:/ocamil.306).
Note: each step requires pristine new OCaml sources. If the sources of OCaml v3.06 were just used to install OCaml under, then delete and untar again. Likewise, when reaching step 2, delete and untar again in order to compile the bootstrapped compilers from fresh sources.
** ALL THE FOLLOWING STEPS MUST TAKE PLACE IN A CYGWIN SESSION **

Step 1: setting up the installation and applying the patch

a) setup OCamIL directories

Go to the OcamIL directory.
> cd [CAMILSRC]
Launch the "configure" tool.
For example :
> ./configure -windows -microsoft -cygwinpath [CYGWINPATH] -ocamlsrcpath [OCAML306]

You can find a full help with the above command

> ./configure --help

Note that by default, the installation folder for camil are:

  • Executables: [CYGWINPATH]/usr/local/bin
  • Libraries: [CYGWINPATH]/usr/local/lib/camil
  • Bootstrapped executables: C:/bscamil/bin
  • Bootstrapped libraries: C:/bscamil/lib
These default values can be changed using additional options of the 'configure' script.

b) apply the patch

> make patch
This will amend the ocaml sources in [OCAML306] to make them compile ocamil. Subsequent steps are to be taken from [CAMILSRC] (DO NOT cd to [OCAML306]!!)

Step 2: camil, ocamilyacc and ojacare.exe (compilation and installation)

This steps produces:
  • ocamil, the ocamil compiler (as caml bytecode, running in the ocaml virtual machine)
  • ocamil libraries (ocaml standard library, graphics, dynlink and thread libraries tuned for ocamil executables)
  • ocamilyacc, a replacement for ocamlyacc for .mly files compiled with ocamil (as caml bytecode, running in the ocaml virtual machine)
  • ojacare.exe, the O'Jacare.net IDL compiler (as caml bytecode, running in the ocaml virtual machine)

a) build

> make all

b) install

> make install

Step 3: camil_bs.exe and ocamiltop.exe (compilation and installation)

This steps produces:
  • ocamil_bs.exe, the ocamil bootstrapped compiler (as MSIL bytecode, running in the CLR)
  • ocamil_bs.exe libraries (bootstrapped versions of ocaml standard library, graphics, dynlink and thread libraries)
  • ocamiltop.exe, the OcamIL toplevel (as MSIL bytecode, running in the CLR)
  • toplevelform.exe, a graphical interface to ocamiltop.exe

a) build

> make bsall

b) install

> make bsinstall

c) install libraries dll to the GAC (glocal assembly cache)

[CAMIL_LIB_DIR] is the directory of the compiled libraries (You can find it in the resume notice of the "configure" tool).
> cd [CAMIL_LIB_DIR]

> gacutil /i core_camil.dll

> gacutil /i graphics.dll

> gacutil /i dynlink.dll

> gacutil /i threads.dll