1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
|
==== Dependencies ====
Dose3 needs ocaml >= 3.11.2
On debian, dose3 **does not compile** on debian lenny.
required libraries ( DEBIAN / RPM ) :
- libextlib-ocaml-dev / ocaml-extlib-devel
- libre-ocaml-dev / ??
- camlp4 ( needed for conditional compilation )
additional libraries (enable compilation with --with-<library>) :
- libzip-ocaml-dev / ?
- libbz2-ocaml-dev and libbz2-dev / ?
- libjson-static-camlp4-dev / ?
- libocamlgraph-ocaml-dev / ?
- libounit-ocaml-dev / ocaml-ounit-devel
- librpm-dev / librpm-devel
- libexpat-ocaml-dev (for --with-xml)
- libbenchmark-ocaml-dev (for --with-benchmark)
To use rpm support, dose3 needs librpm > 4.6
To use ocamlgraph support, dose3 needs libocamlgraph-ocaml-dev >= 1.8.5
opam users need the following packages to compile dose with the default
options :
- opam install extlib camlbz2 camlzip ocamlgraph extlib ounit re cudf
OR
- opam install extlib re cudf
to compile the core dose library.
To compile from git :
aclocal -I m4
autoconf
./configure
make
--with-rpm4
--with-rpm5
--with-xml
--with-ocamlgraph
--with-parmap
--with-zip
--with-bz2
--with-oUnit
--with-curl
--with-experimental (not working at the moment?)
libcudf is included in the source tree of dose3 available by git but
not in the dose3 release tarball. By default dose3 uses the system
wide version of libcudf. To use the version of libcudf in the source
tree you can specify --without-libcudf as configure option. If using
an independently installed version of libcudf you'll need version >=
0.7.
Example:
./configure --with-ocamlgraph --with-zip --with-bz2
Compiling applications
----------------------
In order to compile the a selection of applications do "make". To
compile specific application
$ocamlbuild -use-ocamlfind applications/$app.native
$ocamlbuild -use-ocamlfind experimental/$app.native
Some application might benefit from a fine-tune of the ocaml garbage collector.
You migth try to set the following values before running your application:
OCAMLRUNPARAM=s=4M,i=32M,o=150
Compiling experimental applications
-----------------------------------
From the dose top level directory, for instance to compile outdated.ml:
$ocamlbuild -use-ocamlfind experimental/outdated.native
Building the documentation
--------------------------
"make doc" builds the documentation. For this it is necessary to have
configured with option --with-ocamlgraph. You also need to have
installed "graphviz".
Install
-------
./configure --prefix=/path/to/
make
make install
by default dose is installed in /usr/local/{lib,bin}
Ocaml interpreter
----------------------------------
$ocaml
Objective Caml version 3.12.1
Findlib has been successfully loaded. Additional directives:
#require "package";; to load a package
#list;; to list the available packages
#camlp4o;; to load camlp4 (standard syntax)
#camlp4r;; to load camlp4 (revised syntax)
#predicates "p,q,...";; to set these predicates
Topfind.reset();; to force that packages will be reloaded
#thread;; to enable threads
/usr/lib/ocaml/extlib: added to search path
/usr/lib/ocaml/extlib/extLib.cma: loaded
# #require "dose3";;
/usr/lib/ocaml/str.cma: loaded
/usr/lib/ocaml/pcre: added to search path
/usr/lib/ocaml/pcre/pcre.cma: loaded
/usr/local/lib/ocaml/3.12.1/cudf: added to search path
/usr/local/lib/ocaml/3.12.1/cudf/cudf.cma: loaded
/usr/lib/ocaml/ocamlgraph: added to search path
/usr/lib/ocaml/ocamlgraph/graph.cma: loaded
/usr/lib/ocaml/unix.cma: loaded
/usr/lib/ocaml/zip: added to search path
/usr/lib/ocaml/zip/zip.cma: loaded
/usr/lib/ocaml/bz2: added to search path
/usr/lib/ocaml/bz2/bz2.cma: loaded
/usr/local/lib/ocaml/3.12.1/dose3: added to search path
/usr/local/lib/ocaml/3.12.1/dose3/common.cma: loaded
/usr/local/lib/ocaml/3.12.1/dose3/algo.cma: loaded
/usr/local/lib/ocaml/3.12.1/dose3/debian.cma: loaded
/usr/local/lib/ocaml/3.12.1/dose3/eclipse.cma: loaded
# #require "dose3.boilerplate";;
/usr/local/lib/ocaml/3.12.1/dose3/rpm.cma: loaded
/usr/local/lib/ocaml/3.12.1/dose3/boilerplate.cma: loaded
#
How to create a tarball for distribution
----------------------------------------
edit configure.ac: put new version number in macro AC_INIT
aclocal -I m4
autoconf
make
make dist
How to run the tests
--------------------
The test script of the applications needs:
python
python-yaml
./configure --without-libcudf --with-ocamlgraph --with-zip --with-oUnit --with-bz2 --with-rpm4
make
make test
make testlib
To run only the unit tests : make testlib
|