-
Notifications
You must be signed in to change notification settings - Fork 3
/
INSTALL
199 lines (155 loc) · 5.55 KB
/
INSTALL
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
==== 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 / ??
- cppo ( needed for conditional compilation )
- libocamlgraph-ocaml-dev >= 1.8.6
additional libraries (enable compilation with --with-<library>) :
- libzip-ocaml-dev / ?
- libbz2-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
cppo >= 1.1.2
extlib >= 1.7.0
opam users need the following packages to compile dose with the default
options :
- opam install cppo extlib camlbz2 camlzip ocamlgraph extlib ounit re cudf
OR
- opam install cppo 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-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-zip --with-bz2 --prefix=/usr
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. You need to have installed "graphviz".
Install
-------
Dose is installed using ocamlfind:
Install: ocamlfind install -destdir $LIBDIR <libs>
Remove: ocamlfind remove -destdir $LIBDIR <libs>
Binaries are installed in $BINDIR
"make printconf" shows the current configuration.
The configure script options are :
-prefix=PREFIX install files in PREFIX
-bindir=DIR user executables in DIR [PREFIX/bin]
-libdir=DIR object code libraries in DIR [PREFIX/lib/ocaml/$(OCAML_VERSION)]
if --prefix is not specified, we use the ocamlfind **destdir** as default.
$./configure
$make printconf
DESTDIR:
OCAMLFIND_DESTDIR:
Prefix: /usr/local
Libdir: /usr/local/lib/ocaml/4.02.3
Bindir: /usr/local/bin
If the Makefile is invoked using the env variable DESTDIR then the configure
script options are ignored and the installation script will behave as :
$DESTDIR=/usr make printconf
DESTDIR: /usr
OCAMLFIND_DESTDIR:
Prefix: /usr/local
Libdir: /usr/lib/ocaml
Bindir: /usr/bin
If the Makefile is invoked using the env variable OCAMLFIND_DESTDIR then
the we honor the destdir as set by ocamlfind.
$OCAMLFIND_DESTDIR=/home/software/lib/ocaml make printconf
DESTDIR:
OCAMLFIND_DESTDIR: /home/software/lib/ocaml
Prefix: /usr/local
Libdir: /home/software/lib/ocaml
Bindir: /usr/local/bin
By default dose is installed in /usr/local/bin and /usr/local/lib/ocaml
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 --with-zip --with-oUnit --with-bz2
make
make test
make testlib
To run only the unit tests : make testlib
To only run specific tests or groups of tests use unit and group parameters,
respectively:
make test group=distcheck
make test unit=distcheck_coinst