INSTALL 4.11 KB
Newer Older
1
2
Installation Notes for CDuce
============================
3

4
CDuce is written in the OCaml programming language. It has been
5
6
successfully compiled under Intel Linux, Mac OSX, SunOS 5.7, FreeBSD 4.7.
and Windows XP.
7
8
(See INSTALL.WIN32 for installation under Windows)

9
10
11
------------------------------------------------------------------------------
Prerequisites
------------------------------------------------------------------------------
12

13
14
Before compiling CDuce, you need to install recent releases of the
following packages:
15

16
17
18
19
20
21
22
23
24
ocaml      
  http://caml.inria.fr/ocaml/distrib.html
findlib    
  http://www.ocaml-programming.de/packages
wlex       
  http://www.eleves.ens.fr/home/frisch/soft.html#wlex
pcre-ocaml 
  http://www.ai.univie.ac.at/~markus/home/ocaml_sources.html
ocamlnet   
25
  http://sourceforge.net/projects/ocamlnet
26
27
pxp
  http://www.ocaml-programming.de/packages/documentation/pxp/index_dev.html
28
29


30
Important notes:
31

32
33
34
- the packages above must be installed in the order we used above. In
  particular wlex _must_ be installed before pcre-ocaml and pxp.

35
36
- wlex: you only need to build and install the runtime support library
  (not the wlex tool itself):
37

38
     make runtime.all && make install_runtime
39

40
41
- pcre-ocaml: you may also need to install the PCRE library
  from http://www.pcre.org/
42

43
44
- PXP:
  CDuce requires a development version >= 1.1.93.
45

46
47
48
  Note:
  It is enough to build support UTF8 and ISO-8859-1 ocamllex-lexers:
  ./configure -without-wlex -without-wlex-compat -lexlist utf8,iso88591
49

50
Efficiency issues:
51
52

- OCamlnet: if you plan to load XML file with encodings other than
53
54
  UTF-8, it is advised to use a recent version of OCamlnet (>= 0.96).
  Indeed, the netconversion module in the previous release (0.95) was
55
56
  very slow, and it has been rewritten since then.

57
58
59
------------------------------------------------------------------------------
Compilation
------------------------------------------------------------------------------
60

61
62
You need a GNU Make (or equivalent) to use the Makefile from the
distribution. It defines the following goals:
63

64
- make cduce
65
  compiles the CDuce command line interpreter
66

67
68
- make dtd2cduce
  compiles the dtd2cduce tools (converts DTD to CDuce types)
69

70
- make webiface
71
  compiles the CDuce web interface interpreter (to be used as a CGI script)
72

73
- make webpages
74
75
  compiles in the web/www/ subdirectory the HTML files for the CDuce website
  (including the tutorial and manual)
76

77
78
79
- make install_web
  compiles webiface and webpages, and install everything (see Makefile.conf)

80
- make all
81
  equivalent to (make cduce dtd2cduce webiface webpages)
82

83
84
- make install
  (see PREFIX below)
85

86
Makefile accepts the following options.
87
88
89
90
91
92
93
94
95

NATIVE=true   : use the OCaml native code compiler (ocamlopt) to build CDuce
NATIVE=false  : use the OCaml bytecode compiler (ocamlc)
  default: true  (the native code version is much faster)

PXP_WLEX=true : use wlex for parsing UTF-8 XML files
PXP_WLEX=false: use ocamllex for parsing UTF-8 XML files
  default: false (ocamllex is faster; wlex is more compact)

96
97
98
PREFIX=/usr/local by default: where to install CDuce files (see
 Makefile.conf)

99
E.g.:
100
  make cduce NATIVE=false
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115

You can also modify Makefile.conf to set values for these choices.

------------------------------------------------------------------------------
Support for the expat parser
------------------------------------------------------------------------------

This release includes an experimental support for the expat XML
parser, using the OCaml wrapper written by Maas-Maarten Zeeman, and
included in the expat/ subdirectory for convenience (see
expat/README).

If you have the expat C library installed, you can build
the OCaml wrapper:

116
  cd expat
117
118
119
120
121
122
123
124
125
126
127
128
  make all     (* may need to modify Makefile.conf *)
  make install (* may require root privileges *)
  cd ..

Then set EXPAT=true in Makefile.conf, and rebuild CDuce (make clean;
make all).

The interpreter is now using expat for loading XML files.
You can still use PXP by providing the --pxp switch on the command
line.

Note: the current wrapper for expat does not support inclusion
129
130
of external entities. Moreover, the error messages in case of
ill-formed XML are less informative than PXP's.