Difference between revisions of "OCamlInstall"

From Baka-Tsuki
Jump to navigation Jump to search
Line 32: Line 32:
 
export PATH=/opt/godi/bin:/opt/godi/sbin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/usr/local/bin
 
export PATH=/opt/godi/bin:/opt/godi/sbin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/usr/local/bin
 
export MANPATH=/opt/godi/man:$MANPATH
 
export MANPATH=/opt/godi/man:$MANPATH
  +
export OCAMLLIB=/opt/godi/lib/ocaml/std-lib/
 
Now move into the GODI folder. Run the following commands:
 
Now move into the GODI folder. Run the following commands:
 
bash
 
bash
 
./bootstrap --section=3.09
 
./bootstrap --section=3.09
 
If the command completes successfully, run:
 
If the command completes successfully, run:
export OCAMLLIB=/opt/godi/lib/ocaml/std-lib/
 
 
./bootstrap_stage2
 
./bootstrap_stage2
 
With any luck both commands will complete successfully. If they do not, have fun. Sometimes GODI will explain what went wrong, most of the time it will not. It is important that the present working directory have no spaces, I think.
 
With any luck both commands will complete successfully. If they do not, have fun. Sometimes GODI will explain what went wrong, most of the time it will not. It is important that the present working directory have no spaces, I think.

Revision as of 18:26, 11 June 2008

OCaml Install for working on RLdev

Basics

The development environment for RLdev on Windows is (as taken from the INSTALL file):

* Cygwin
* Objective Caml 3.09
* Findlib
* Omake 0.9.6.8
* ExtLib 1.4 or later
* Ulex
* XML Light
* libpng 1.2

Luckly these can be installed very easily if you make sure to install the right version of GODI.

Cygwin

Installing Cygwin is a straight forward process. Go to http://www.cygwin.com/ and download setup.exe via the "Install or update now!" link. Make sure to save this somewhere you will have it in the future. This executable will allow you to install Cygwin packages that you forgot. I recommend making the C:\cygwin folder now, and saving setup.exe there, so you can always know where to find it.

Start up the install, leave most things at default until you get to pick a mirror. Picking the right mirror is only important if you are not patient. Some are faster than others, and you may need to try several before you find one that is speedy. Click next to come to the package selection screen. Here you choose what unix utilities you want to install. We need to add some:

- All of the Devel tree (just click on the circle arrow once, and wait while it catches up)
- Utils -> bc (again just click the circle arrow once next to bc)
- Libs -> ncurses

Now keep clicking next until the install is done. This will take a while depending on your connection speed. Now you are ready to install GODI.

GODI

GODI is a package manager thingy for OCaml. You should download the latest GODI from http://godi.camlcity.org/godi/index.html . Save this somewhere in your unix tree. I saved it to my home directory for simplicity. Open up a Cygwin termal and extract the GODI download. Make sure to extract it to a path with no space in it. Example "/tmp" is fine, "/cygdrive/c/Temporary\ Files" is bad.

Because GODI requires PATH variables with no spaces, we must now modify our .bashrc to reflect this. I am assuming you will install GODI to its default directory, so just add the following lines to your .bashrc:

export PATH=/opt/godi/bin:/opt/godi/sbin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/usr/local/bin
export MANPATH=/opt/godi/man:$MANPATH
export OCAMLLIB=/opt/godi/lib/ocaml/std-lib/

Now move into the GODI folder. Run the following commands:

bash
./bootstrap --section=3.09

If the command completes successfully, run:

./bootstrap_stage2

With any luck both commands will complete successfully. If they do not, have fun. Sometimes GODI will explain what went wrong, most of the time it will not. It is important that the present working directory have no spaces, I think.

Now that GODI is installed we can install the remaining dependencies.

Run the following commands:

godi_build godi-extlib
godi_build godi-ulex
godi_build godi-xml-light

If these all installed you are have one more dependency to build.

OMake

Download the .tar.gz version 0.9.6.8 from http://omake.metaprl.org/download.html . Extract the file. Enter the extracted directed and run:

make install

It should build and install omake.

RLdev

Grab RLdev however you wish. Move into the src directory, and run:

omake
omake install

It should build successfully if all the previous steps went okay. The executables are now available to the Cygwin environment.