- OCaml 4.02.3 (Code is highly dependent on the specific compiler version. Do not try compiling with other versions.)
- OPAM >= 1.2, findlib and OMake to build.
- spotlib >= 2.5.2
- ppx_meta_conv >= 2.2
- ppx_orakuda >= 2.0.0
- treeprint >= 2.0.0 (2.1 is better, avoid the hack below)
- levenshtein >= 1.1.0
- ppx_test >= 1.2.1
- ocsigenserver >= 2.6
- eliom >= 4.2.0
Windows is not supported.
OPAM package for OCamlOScope is not yet available... since it requires the following mending of external softwares.
treeprint.2.0.0 needs ppx_ocaml_conv to compile, but it is now named ppx_meta_conv_ocaml. You have to build it manually with opam source treeprint, then ocaml setup.ml -{configure,build,install}.
treeprint.2.1 should no longer be concerned.
Some of the above packages lack cmxs files and you have to build them manually to run the native build of OCamlOScope on Ocsigen. This is not needed at all if you use only bytecode.
The following should create ocamlcommon.cmxs:
$ DIR=`ocamlc -where`
$ cd $DIR
$ ocamlopt -linkall -shared compiler-libs/ocamlcommon.cmxa -o compiler-libs/ocamlcommon.cmxsHowever, I find it stopped working in recent Mac OS X. It required the following fixes:
- Build
ocamlcommon2.cmxajust like asocamlcommn.cmxabut link withbyterun/prims.o,-lccopt byterun/libcamlrun_shared.soand-ccopt -lcurses. - Then create
ocamlcommon.cmxsfrom thisocamlcommon2.cmxa.
It seems due to Clang and its use in OCaml compiler build, but I do not understand why it requires.
The following command should create odoc_info.cmxs:
$ ocamlopt -linkall -shared ocamldoc/odoc_info.cmxa -o ocamldoc/odoc_info.cmxs$ cp OMakeroot.in OMakeroot
$ omakeWhat does scraping need:
cmtfiles. OCaml modules must be compiled withOCAMLPARAM=_,bin-annot=1, and the compiled source tree withcmtfiles must be kept.- For softwares installed by OPAM,
OPAMKEEPBUILDDIR=yesis required to keep ths source files
The following command should scrape the OCaml compiler source code and all the installed OCamlFind libraries and their corresponding OPAM build directorires, and stores the result under data/ directory.
$ ./oco -d -c <ocaml compiler source dir>NB: I do not really understand what is <ocaml compiler source dir> and why it is needed (indeed, if the switch is installed with the two flags given above, there is a directory ocaml in build).
After scraping, oco goes to its console query mode against the dumped data file.
Change directory to eliom/, copy eliom/oco.conf.in to oco.conf and change @PORT@ and @OCAMLLIB@. You must also create a file called oco_conf.ml containing something of the form {ocamlc_source_dir = "<ocaml compiler source dir>"}. I assume that this parameter is the same as the one used in the command line above.
$ ./starteliom.sh