/[svn]/INSTALL
ViewVC logotype

Contents of /INSTALL

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1071 - (show annotations)
Tue Jul 10 18:20:42 2007 UTC (5 years, 10 months ago) by abate
File size: 6761 byte(s)
[r2004-04-20 22:36:09 by afrisch] doc

Original author: afrisch
Date: 2004-04-20 22:36:09+00:00
1 Installation Notes for CDuce
2 ============================
3
4 CDuce is written in the OCaml programming language. It has been
5 successfully compiled under Intel Linux, Mac OSX, SunOS 5.7, FreeBSD 4.7.
6 and Windows XP.
7 (See INSTALL.WIN32 for installation under Windows)
8
9 ------------------------------------------------------------------------------
10 Prerequisites
11 ------------------------------------------------------------------------------
12
13 Before compiling CDuce, you need to install recent releases of the
14 following packages:
15
16 ocaml => 3.07 patchlevel 2
17 http://caml.inria.fr/ocaml/distrib.html
18 findlib => 1.0.3
19 http://www.ocaml-programming.de/packages
20 ulex => 0.3
21 http://www.cduce.org/download
22 pcre-ocaml => 5.03
23 http://www.ai.univie.ac.at/~markus/home/ocaml_sources.html
24 ocamlnet => 0.94
25 http://www.ocaml-programming.de/packages
26 pxp => 1.1.94.2
27 http://www.ocaml-programming.de/packages/documentation/pxp/index_dev.html
28
29 Furthermore if you want to load xml, html, and schema files remotely on the
30 web (http, https, ftp, ...: e.g. load_html "http://www.cduce.org") you will
31 also need either:
32
33 ocurl => 0.15
34 http://sourceforge.net/projects/ocurl/
35
36 or
37
38 netclient => 0.90.1
39 http://www.ocaml-programming.de/programming/netclient.html
40
41 netclient support only the http protocol. curl supports in addition https,
42 ftp, and other protocols.
43
44
45 There is a configure script. It will check for the presence of
46 mandatory packages, and detect automatically optional ones. It will
47 also set installation directories. Running the script produces a
48 Makefile.conf file. You can get usage information about the script
49 with: ./configure --help
50
51 Alternatively, it is also possible to copy Makefile.conf.template to
52 Makefile.conf and modify it by hand. The Makefile variables mentioned
53 below are set in this Makefile.conf file.
54
55
56 Important notes:
57
58 - OCaml: cduce uses recursive modules so versions of OCaml before 3.07
59 will not work. Also early standard distribution of 3.07 had two bugs
60 that made CDuce compilation fail. Use patchlevel 2 distribution or patch
61 OCaml source by
62
63 http://caml.inria.fr/bin/caml-bugs/fixed?id=1863;page=77;user=guest
64 http://www.cduce.org/download/patch-ocaml-3.07
65
66 or (risky) install OCaml cvs version
67 cvs -d":pserver:anoncvs@camlcvs.inria.fr:/caml" login
68 <hit enter key when asked for password>
69 cvs -z3 -d":pserver:anoncvs@camlcvs.inria.fr:/caml" co ocaml
70
71 Furthermore cduce can be interfaced with OCaml language to be called from
72 it. In order to be able to use this feature, you will have to set the
73 CDuce environment variable ML_INTERFACE to true, patch OCaml
74 Makefile and build a special library. Everything is explained bellow.
75
76 - pcre-ocaml: you may also need to install the PCRE library
77 from http://www.pcre.org/ (use version >=4.4)
78 [red-hat users: pcre (rawhide) packages may not work with the
79 latest pcre-ocaml versions, use tarballs]
80 In this case configure it with the --enable-utf8 option.
81 >= 5.03 recommended but previous versions may work
82
83 - PXP:
84 CDuce requires a development version >= 1.1.94.2.
85 Notes: It is enough to build support UTF8 and ISO-8859-1 ocamllex-lexers:
86 ./configure -without-wlex -without-wlex-compat -lexlist utf8,iso88591
87 You can also build pxp with wlex support (more compact code). This
88 can be done by installing wlex runtime support library *before* pxp
89 http://www.eleves.ens.fr/home/frisch/soft.html#wlex
90 and build pxp -with-wlex*. When building CDuce you still have the
91 choice whether to use wlex or camllex (see PXP_WLEX option below)
92
93 - ocurl:
94 you may also need to install libcurl (http://curl.haxx.se/libcurl/)
95 To use it you have to set the variable CURL = true.
96
97
98 Efficiency issues:
99
100 - OCamlnet: if you plan to load XML file with encodings other than
101 UTF-8, it is advised to use a recent version of OCamlnet (>= 0.96).
102 Indeed, the netconversion module in the previous release (0.95) was
103 very slow, and it has been rewritten since then.
104
105 - PXP: for better efficiency wlex is disabled by default.
106
107 ------------------------------------------------------------------------------
108 Compilation
109 ------------------------------------------------------------------------------
110
111 IF YOU SET ML_INTERFACE TO TRUE ...
112 that is if you want to be able to call CDuce functions from OCaml
113 then you have to build OCaml compiler lib:
114 - Copy ocaml_cdo2cmo_patch (located in cdo2cmo directory of your cduce
115 archive) in the directory where you extracted OCaml sources.
116 - Patch OCaml's Makefile with:
117 patch -Np1 < ocaml_cdo2cmo_patch
118 - Build OCaml's special library:
119 make install_liball
120 ELSE
121
122
123 THE FAST WAY:
124
125 - check local settings in Makefile.conf or do "make help" [optional]
126 - make all && make install
127
128
129 THE WISE WAY:
130
131 You need a GNU Make (or equivalent) to use the Makefile from the
132 distribution. It defines the following goals:
133
134 - make help
135 print a summary of what follows
136
137 - make cduce
138 compiles the CDuce command line interpreter
139
140 - make dtd2cduce
141 compiles the dtd2cduce tools (converts DTD to CDuce types)
142
143 - make validate
144 compiles the schema validation tool
145
146 - make webiface
147 compiles the CDuce web interface interpreter (to be used as a CGI script)
148
149 - make webpages
150 compiles in the subdirectory the web/www/html directory of cduce sources
151 the files for the CDuce website (including the tutorial and manual)
152
153 - make install_web
154 compiles webiface and webpages, and install everything
155 in the under the $WEB_PREFIX directory (see Makefile.conf)
156
157 - make all
158 equivalent to (make cduce dtd2cduce validate)
159
160 - make install
161 it installs
162 cduce validate and dtd2cduce into $(PREFIX)/bin
163 cduce.1 into $(PREFIX)/man/man1
164 (see PREFIX below)
165
166 - make clean
167 back to the starting point
168
169 - make uninstall
170 removes installed files
171
172 ------------------------------------------------------------------------------
173 Support for the expat parser
174 ------------------------------------------------------------------------------
175
176 CDuce can uses two XML parsers: PXP and expat. PXP is needed
177 to build CDuce, and expat support can be additionnaly added.
178 Here is how to do so.
179
180 You need to install the expat C library and the OCaml wrapper.
181 The wrapper can be found at:
182
183 http://home.wanadoo.nl/maas/ocaml/
184
185 Once the wrapper and be installed, you can build CDuce with
186 the Makefile option EXPAT=true (which can be set on make command
187 line or in Makefile.conf).
188
189 The interpreter is now using expat for loading XML files.
190 You can still use PXP by providing the --pxp switch on the command
191 line.
192
193 Note: the current wrapper for expat does not support inclusion
194 of external entities. Moreover, the error messages in case of
195 ill-formed XML are less informative than PXP's.

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5