It is a good idea to install everything locally. Here is what I did (using bash shell):
export HOLNATDIR=$HOME/holnat mkdir $HOLNATDIR
You can of course choose some other directory for $HOLNATDIR.
Next, download the following source files and save them to $HOLNATDIR.
http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-3.11.1.tar.gz http://pauillac.inria.fr/~ddr/camlp5/distrib/src/camlp5-5.12.tgz http://www.cl.cam.ac.uk/~jrh13/hol-light/hol_light_090717.tgz
Then issue the following commands in sequence:
cd $HOLNATDIR tar zxvf ocaml-3.11.1.tar.gz tar zxvf camlp5-5.12.tgz tar zxvf hol_light_090717.tgz cd ocaml-3.11.1 ./configure -prefix $HOLNATDIR make world.opt make install make ocamlnat cp ocamlnat $HOLNATDIR/bin export PATH="$HOLNATDIR/bin:$PATH" cd ../camlp5-5.12 ./configure -prefix $HOLNATDIR make world make opt make install cd top sed -e 's/Toploop/Opttoploop/g' camlp5_top.ml \ | sed -e 's/Topdirs/Opttopdirs/g' > camlp5_opttop.ml ocamlrun ../boot/camlp5r -nolib -I ../boot pa_macro.cmo q_MLast.cmo \ -mode T -o camlp5_opttop.ppo camlp5_opttop.ml ocamlopt -warn-error A -I ../main -I ../boot -I ../ocaml_stuff/3.11.1/utils \ -I ../ocaml_stuff/3.11.1/parsing -I ../ocaml_stuff/3.11.1/typing -I \ ../ocaml_stuff/3.11.1/toplevel -I $HOLNATDIR/ocaml-3.11.1/toplevel \ -c -impl camlp5_opttop.ppo rm -f camlp5_opttop.ppo cp camlp5_opttop.cmx camlp5_opttop.cmi camlp5_opttop.o \ $HOLNATDIR/lib/ocaml/camlp5 cd .. cp main/*.cmx main/*.cmi main/*.o $HOLNATDIR/lib/ocaml/camlp5 cp lib/*.cmx lib/*.cmi lib/*.o $HOLNATDIR/lib/ocaml/camlp5 cd ocaml_stuff/3.11.1/utils cp pconfig.cmx pconfig.cmi pconfig.o $HOLNATDIR/lib/ocaml/camlp5 cd $HOLNATDIR/hol_light make ocamlopt -c -pp "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo" \ -I +camlp5 pa_j.ml sed -e 's/nums\.cma/nums.cmxa/g' sys.ml > sysnat.ml
cd $HOLNATDIR/hol_light $HOLNATDIR/bin/ocamlnat -I $HOLNATDIR/lib/ocaml/camlp5Once you get the toplevel prompt, type:
#use "holnat.ml";;Now, take a cup of coffee and you are on your way!
Update: I have figured out a way to compile all of HOL Light into native binary. Initial load time on my Mac Pro is now down to 21 seconds. The instructions are found below.
cd $HOLNATDIR/hol_light export PATH="$HOLNATDIR/bin:$PATH" ocamlc -c -pp "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo" \ -I +camlp5 pa_j.ml ocamlopt -c -pp "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo" \ -I +camlp5 pa_j.ml ocamlopt -c -pp "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo \ -I . pa_j.cmo" -I +camlp5 -I $HOLNATDIR/lib -I $HOLNATDIR/lib/camlp5 \ holcore.ml ocamlopt -c -pp "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo \ -I . pa_j.cmo" -I +camlp5 -I $HOLNATDIR/lib -I $HOLNATDIR/lib/camlp5 \ proved1.ml ocamlopt -c -pp "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo \ -I . pa_j.cmo" -I +camlp5 -I $HOLNATDIR/lib -I $HOLNATDIR/lib/camlp5 \ proved2.ml ocamlopt -c -pp "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo \ -I . pa_j.cmo" -I +camlp5 -I $HOLNATDIR/lib -I $HOLNATDIR/lib/camlp5 \ proved3.mlThen start ocamlnat by doing the following:
$HOLNATDIR/bin/ocamlnat -I $HOLNATDIR/lib/ocaml/camlp5Once you get the toplevel prompt, type:
#use "holx.ml";;