/[svn]/INSTALL
ViewVC logotype

Diff of /INSTALL

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 362 by abate, Tue Jul 10 17:28:08 2007 UTC revision 705 by abate, Tue Jul 10 17:57:13 2007 UTC
# Line 1  Line 1 
1  Installation notes  Installation Notes for CDuce
2  ==================  ============================
3    
4  [In case of problems refer to the installation notes of each  CDuce is written in the OCaml programming language. It has been
5  package]  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  - ocaml 3.06  ------------------------------------------------------------------------------
10    (http://caml.inria.fr/ocaml/distrib.html)  Prerequisites
11    ------------------------------------------------------------------------------
12    
13    (  Before compiling CDuce, you need to install recent releases of the
14     We used at some point in CDuce development a patched  following packages:
    version of the file nat_stubs.c in OCaml distribution;  
    this patch should no longer be necessary.  
    If someone gets the error "Abstract value", please report it to  
    <Alain.Frisch@ens.fr>  
    and try to replace the file in the OCaml source with the one that  
    can be retrieved at http://www.cduce.org/nat_stubs.c)  
    Follow normal instructions in the INSTALL file; typically:  
    ./configure && make world && make opt && make install.  
   )  
15    
16    ocaml  => 3.07
17      http://caml.inria.fr/ocaml/distrib.html
18    findlib
19      http://www.ocaml-programming.de/packages
20    ulex
21      http://www.cduce.org/download
22    pcre-ocaml
23      http://www.ai.univie.ac.at/~markus/home/ocaml_sources.html
24    ocamlnet
25      http://sourceforge.net/projects/ocamlnet
26    pxp    => 1.9.93
27      http://www.ocaml-programming.de/packages/documentation/pxp/index_dev.html
28    
29  - ocamlfind  Important notes:
   (http://www.ocaml-programming.de/packages/findlib-0.8.1.tar.gz)  
    Usually it suffices to do:  
30    
31     ./configure && make all && make opt && make install  - OCaml: cduce uses recursive modules so versions of OCaml before 3.07
32      will not work. Also the standard distribution has two bugs that make
33      CDuce compilation fail. Patch OCaml source by
34    
35          http://caml.inria.fr/bin/caml-bugs/fixed?id=1863;page=77;user=guest
36          http://www.cduce.org/download/patch-ocaml-3.07
37    
38  - wlex    or (better) install OCaml cvs version
39    (http://www.eleves.ens.fr/home/frisch/soft.html)       cvs -d":pserver:anoncvs@camlcvs.inria.fr:/caml" login
40    specify in Makefile where is the source code (of the lex library)    hit enter key when asked for password
41    of OCaml [default is $HOME/ocaml-3.06/lex]:       cvs -d":pserver:anoncvs@camlcvs.inria.fr:/caml" co ocaml
   OCAMLLEX_SRC = <source directory>  
42    
43    then  - pcre-ocaml: you may also need to install the PCRE library
44    make wlex && make install_wlex && make runtime && \    from http://www.pcre.org/ [red-hat users: 4.3 package does
45      make runtime.opt && make install_runtime    not work with the latest pcre-ocaml version, use tarballs]
46      >= 5.03 recommended but previous versions may work
47    
48    it is important to do make runtime.opt otherwise  - PXP:
49    the web interface does not compile.    CDuce requires a development version >= 1.1.93.
50    
51  - pcre    Note:
52    (http://www.pcre.org/)    It is enough to build support UTF8 and ISO-8859-1 ocamllex-lexers:
53    To install first do a simple:    ./configure -without-wlex -without-wlex-compat -lexlist utf8,iso88591
54    
55    ./configure  Efficiency issues:
56    
57    For a custom configuration use options:  - OCamlnet: if you plan to load XML file with encodings other than
58      UTF-8, it is advised to use a recent version of OCamlnet (>= 0.96).
59      Indeed, the netconversion module in the previous release (0.95) was
60      very slow, and it has been rewritten since then.
61    
62     --prefix=<prefix directory> --disable-shared  ------------------------------------------------------------------------------
63    Compilation
64    ------------------------------------------------------------------------------
65    
66    then as usual make, make install  You need a GNU Make (or equivalent) to use the Makefile from the
67    distribution. It defines the following goals:
68    
69    - make cduce
70      compiles the CDuce command line interpreter
71    
72  - pcre-ocaml  - make dtd2cduce
73    (http://pcre-ocaml.sourceforge.net/)    compiles the dtd2cduce tools (converts DTD to CDuce types)
74    
75    If pcre was installed in non standard place then in Makefile.conf:  - make webiface
76    export STATIC = yes     #this may help but first try without    compiles the CDuce web interface interpreter (to be used as a CGI script)
   export INCDIRS := <prefix_directory>/include  
   export LIBDIRS := <prefix_directory>/lib  
77    
78    After make all && make opt:  - make webpages
79      cd lib    compiles in the web/www/ subdirectory the HTML files for the CDuce website
80      cp ../META .    (including the tutorial and manual)
     ocamlfind install pcre META *.a *.cma *.cmxa *.cmi *.mli  
81    
82  - ocamlnet  - make install_web
83    (http://ocamlnet.sourceforge.net/)    compiles webiface and webpages, and install everything (see Makefile.conf)
   cd in the src directory and then  
84    
85     ./configure && make all && make opt && make install  - make all
86      equivalent to (make cduce dtd2cduce)
87    
88    - make install
89      it installs
90      cduce and dtd2cduce into $(PREFIX)/bin
91      cduce.1 into $(PREFIX)/man/man1
92      (see PREFIX below)
93    
94  - pxp (development version 1.1.93)  Makefile accepts the following options.
   (http://www.ocaml-programming.de/programming/pxp.html)  
95    
96    ./configure && make all && make opt && make install  NATIVE=true   : use the OCaml native code compiler (ocamlopt) to build CDuce
97    NATIVE=false  : use the OCaml bytecode compiler (ocamlc)
98      default: true  (the native code version is much faster)
99    
100    PXP_WLEX=true : use wlex for parsing UTF-8 XML files
101    PXP_WLEX=false: use ocamllex for parsing UTF-8 XML files
102      default: false (ocamllex is faster; wlex is more compact)
103    
104    EXPAT=true: build expat support (see below)
105    
106  WEB SITE INSTALATION  PREFIX=/usr/local by default: where to install CDuce files (see
107  ====================   Makefile.conf)
108    
109  If you want to install CDuce site, with its online demo and tutorial  E.g.:
110  then you can study the Makefile (just do make web/files webiface.opt    make cduce NATIVE=false
 and install the generated files by hand).  
111    
112  For the Apache server you may have to change its configuration file  You can also modify Makefile.conf to set values for these choices.
 httpd.conf. In particular you have to load php_mod and add to the  
 directives of the directory you installed the files the following:  
113    
 <Directory "cduce_root">  
     Options MultiViews  
 # if .php is not in mime-types then also add:  
     MultiviewsMatch Any  
 </Directory>  
114    ------------------------------------------------------------------------------
115    Support for the expat parser
116    ------------------------------------------------------------------------------
117    
118    CDuce can uses two XML parsers: PXP and expat. PXP is needed
119    to build CDuce, and expat support can be additionnaly added.
120    Here is how to do so.
121    
122    You need to install the expat C library and the OCaml wrapper.
123    The wrapper can be found at:
124    
125    http://home.wanadoo.nl/maas/ocaml/
126    
127    Once the wrapper and be installed, you can build CDuce with
128    the Makefile option EXPAT=true (which can be set on make command
129    line or in Makefile.conf).
130    
131    The interpreter is now using expat for loading XML files.
132    You can still use PXP by providing the --pxp switch on the command
133    line.
134    
135    Note: the current wrapper for expat does not support inclusion
136    of external entities. Moreover, the error messages in case of
137    ill-formed XML are less informative than PXP's.

Legend:
Removed from v.362  
changed lines
  Added in v.705

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