Missing dependencies.
[ocaml-libvirt.git] / README
1 ocaml-libvirt
2 ----------------------------------------------------------------------
3
4 Copyright (C) 2007-2008 Richard W.M. Jones, Red Hat Inc.
5 http://libvirt.org/ocaml/
6 http://libvirt.org/
7
8 This is a complete set of OCaml bindings around libvirt, exposing all
9 known functionality to OCaml programs.
10
11
12 Building
13 ----------------------------------------------------------------------
14
15   ./configure           # Checks that you have all the required bits.
16
17   make all              # Builds the bytecode version of libs/programs.
18   make opt              # Builds the native code version of libs/programs.
19
20   make install          # Install in OCaml directory, and the binaries
21                         # in $prefix/bin.
22
23   make doc              # Build HTML documentation in html/ subdirectory.
24
25 Then have a look at the program 'mlvirsh.opt'.
26
27 Note: If you want to run the programs without first installing, you
28 may need to set your $LD_LIBRARY_PATH environment variable so it
29 contains the build directory.  eg:
30
31   LD_LIBRARY_PATH=libvirt/ mlvirsh/mlvirsh.opt
32
33
34 Windows
35 ----------------------------------------------------------------------
36
37 I have built libvirt (the bindings), examples, mlvirsh and virt-ctrl
38 on Windows using the MinGW port of OCaml.  It's quite likely that it
39 will also work under VC++, but I have not tested this.
40
41 You should make sure that your $PATH (environment variable) contains
42 the names of the directories containing all required DLLs, in
43 particular you will require:
44
45   libvirt-*.dll         (from libvirt)
46   libgnutls-*.dll       (from GnuTLS)
47   libgcrypt-*.dll
48   libgpg-error-*.dll
49   libtasn1-*.dll
50   libxdr.dll            (from libxdr)
51   libxml2-*.dll         (from libxml2)
52   and, a multitude of DLLs from GTK if you want to run virt-ctrl
53
54 You can use a tool such as Dependency Walker to find/check the
55 locations of dependent libraries.
56
57 To build the Windows installer, you will need NSIS.  Then do:
58
59   ./configure --with-nsis=/c/Progra~1/NSIS
60   make all opt
61   make wininstaller
62
63 This should build a Windows binary installer called
64 ocaml-libvirt-$VERSION.exe which includes the bindings, all required
65 DLLs and all programs that can be built under Windows.
66
67
68 mlvirsh
69 ----------------------------------------------------------------------
70
71 'mlvirsh' is an almost complete reimplementation of virsh, which is
72 mostly command compatible (there are a very few commands missing, and
73 some commands have a slightly different syntax, but broadly speaking
74 they are equivalent programs except that one is written in C and the
75 other in OCaml).
76
77 At the time of writing:
78
79               wc -c  wc -l
80
81   virsh     126,056  4,641
82   mlvirsh    19,427    598
83
84   % size        15%    13%
85
86
87 Programming
88 ----------------------------------------------------------------------
89
90 For documentation on these bindings, read libvirt.mli and/or 'make
91 doc' and browse the HTML documentation in the html/ subdirectory.
92
93 For documentation on libvirt itself, see http://libvirt.org/html/
94
95
96 Subdirectories
97 ----------------------------------------------------------------------
98
99 libvirt/                The OCaml bindings.
100 examples/               Some example programs using the bindings.
101 mlvirsh/                'mlvirsh' command line tool.