~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to INSTALL

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu, Stéphane Glondu, Samuel Mimram
  • Date: 2010-01-07 22:50:39 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107225039-n3cq82589u0qt0s2
Tags: 8.2pl1-1
[ Stéphane Glondu ]
* New upstream release (Closes: #563669)
  - remove patches
* Packaging overhaul:
  - use git, advertise it in Vcs-* fields of debian/control
  - use debhelper 7 and dh with override
  - use source format 3.0 (quilt)
* debian/control:
  - set Maintainer to d-o-m, set Uploaders to Sam and myself
  - add Homepage field
  - bump Standards-Version to 3.8.3
* Register PDF documentation into doc-base
* Add debian/watch
* Update debian/copyright

[ Samuel Mimram ]
* Change coq-doc's description to mention that it provides documentation in
  pdf format, not postscript, closes: #543545.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
                           The Coq documentation
2
 
                           =====================
3
 
 
4
 
The Coq documentation includes 
5
 
 
6
 
- A Reference Manual
7
 
- A Tutorial
8
 
- A document presenting the Coq standard library
9
 
- A list of questions/answers in the FAQ style
10
 
 
11
 
The sources of the documents are mainly made of LaTeX code from which
12
 
user-readable PostScript or PDF files, or a user-browsable bunch of
13
 
html files are generated.
14
 
 
15
 
Prerequisite
16
 
------------
17
 
 
18
 
To produce the documents, you need the coqtop, coq-tex, coqdoc and
19
 
gallina tools, with same version number as the current
20
 
documentation. These four tools normally come with any basic Coq
21
 
installation.
22
 
 
23
 
In addition, to produce the PostScript documents, the following tools
24
 
are needed:
25
 
 
26
 
  - latex (latex2e)
27
 
  - dvips
28
 
  - bibtex
29
 
  - makeindex
30
 
  - pngtopnm and pnmtops (for the Reference Manual and the FAQ)
31
 
 
32
 
To produce the PDF documents, the following tools are needed:
33
 
 
34
 
  - pdflatex
35
 
  - bibtex
36
 
 
37
 
To produce the html documents, the following tools are needed:
38
 
 
39
 
  - hevea (e.g. 1.07 works)
40
 
 
41
 
To produce the documentation of the standard library, a source copy of
42
 
the coq distribution is needed.
43
 
 
44
 
Compilation
45
 
-----------
46
 
 
47
 
To produce all PostScript documents, do:                make all-ps
48
 
To produce all PDF documents, do:                       make all-pdf
49
 
To produce all html documents, do:                      make all-html
50
 
To produce all formats of the Reference Manual, do:     make refman
51
 
To produce all formats of the Tutorial, do:             make tutorial
52
 
To produce all formats of the Coq Standard Library, do: make stdlib
53
 
To produce all formats of the FAQ, do:                  make faq
54
 
 
55
 
Installation
56
 
------------
57
 
 
58
 
To install all produced documents, do:
59
 
 
60
 
  make DOCDIR=/some/directory/for/documentation install
61
 
 
62
 
DOCDIR defauts to /usr/share/doc/coq-x.y were x.y is the version number
63
 
 
64
 
 
65
 
 
 
1
 
 
2
            INSTALLATION PROCEDURES FOR THE COQ V8.2 SYSTEM
 
3
            -----------------------------------------------
 
4
 
 
5
 
 
6
WHAT DO YOU NEED ?
 
7
==================
 
8
 
 
9
   Coq is designed to work on computers equipped with a POSIX (Unix or
 
10
   a clone) operating system. It also works under Microsoft Windows
 
11
   (see INSTALL.win); for a precompiled MacOS X package, see
 
12
   INSTALL.macosx.
 
13
 
 
14
   Coq is known to be actively used under GNU/Linux (i386, amd64 and
 
15
   ppc) and FreeBSD. Automated tests are run under many, many
 
16
   different architectures under GNU/Linux.
 
17
 
 
18
   Naturally, Coq will run faster on an architecture where OCaml can
 
19
   compile to native code, rather than only bytecode. At time of
 
20
   writing, that is IA32, PowerPC, AMD64, Alpha, Sparc, Mips, IA64,
 
21
   HPPA and StrongArm. See
 
22
   http://caml.inria.fr/ocaml/portability.en.html for details.
 
23
 
 
24
 
 
25
   Your OS may already contain Coq under the form of a precompiled
 
26
   package or ready-to-compile port. In this case, and if the supplied
 
27
   version suits you, follow the usual procedure for your OS to
 
28
   install it. E.g.:
 
29
 
 
30
   - Debian GNU/Linux (or Debian GNU/k*BSD or ...):
 
31
 
 
32
     aptitude install coq
 
33
 
 
34
   - Gentoo GNU/Linux: 
 
35
 
 
36
     emerge sci-mathematics/coq
 
37
 
 
38
   - Mandriva GNU/Linux:
 
39
 
 
40
     urpmi coq
 
41
 
 
42
   Should you need or prefer to compile Coq V8.2 yourself, you need:
 
43
 
 
44
     - Objective Caml version 3.07 or later
 
45
       (available at http://caml.inria.fr/)
 
46
 
 
47
       For Ocaml version >= 3.10.0, you also need to install camlp5
 
48
       (version <= 4.08, or >= 5.01 transitional)
 
49
  
 
50
 
 
51
     - GNU Make version 3.81 or later
 
52
       (
 
53
        available at http://www.gnu.org/software/make/, but also a
 
54
        standard or optional add-on part to most Unices and Unix
 
55
        clones, sometimes under the name "gmake".
 
56
 
 
57
        If a new enough version is not included in your system, nor
 
58
        easily available as an add-on, this should get you a working
 
59
        make:
 
60
 
 
61
        #Download it (wget is an example, use your favourite FTP or HTTP client)
 
62
        wget http://ftp.gnu.org/pub/gnu/make/make-3.81.tar.bz2
 
63
        bzip2 -cd make-3.81.tar.bz2 | tar x
 
64
        #If you don't have bzip2, you can download the gzipped version instead.
 
65
        cd make-3.81
 
66
        ./configure --prefix=${HOME}
 
67
        make install
 
68
 
 
69
        Then, make sure that ${HOME}/bin is first in your $PATH.
 
70
       )
 
71
 
 
72
     - a C compiler
 
73
 
 
74
     - for Coqide, the Lablgtk development files, and the GTK
 
75
       libraries, see INSTALL.ide for more details
 
76
 
 
77
   Coq sources distribution comes as a single compressed tar-file. You
 
78
   have probably already decompressed it if you are reading this
 
79
   document.
 
80
 
 
81
 
 
82
QUICK INSTALLATION PROCEDURE.
 
83
=============================
 
84
 
 
85
1. ./configure
 
86
2. make world
 
87
3. make install (you may need superuser rights)
 
88
4. make clean
 
89
 
 
90
 
 
91
INSTALLATION PROCEDURE IN DETAILS (NORMAL USERS).
 
92
=================================================
 
93
 
 
94
1- Check that you have the Objective Caml compiler version 3.07 (or later)
 
95
   installed on your computer and that "ocamlmktop" and "ocamlc" (or
 
96
   its native code version "ocamlc.opt") lie in a directory which is present
 
97
   in your $PATH environment variable. 
 
98
 
 
99
   To get Coq in native-code, (it runs 4 to 10 times faster than
 
100
   bytecode, but it takes more time to get compiled and the binary is
 
101
   bigger), you will also need the "ocamlopt" (or its native code version
 
102
   "ocamlopt.opt") command.
 
103
 
 
104
2- If you are using OCaml version >= 3.10.0, check that you have
 
105
   Camlp5 installed on your computer and that the command "camlp5"
 
106
   lies in a directory which is present in your $PATH environment
 
107
   variable path.  (You need Camlp5 in both bytecode and native
 
108
   versions if your platform supports it).
 
109
 
 
110
3- The uncompression and un-tarring of the distribution file gave birth 
 
111
   to a directory named "coq-8.xx". You can rename this directory and put 
 
112
   it wherever you want. Just keep in mind that you will need some spare
 
113
   space during the compilation (reckon on about 250 Mb of disk space
 
114
   for the whole system in native-code compilation). Once installed, the
 
115
   binaries take about 65 Mb, and the library about 60 Mb.
 
116
 
 
117
4- First you need to configure the system. It is done automatically with
 
118
   the command:
 
119
 
 
120
        ./configure <options>
 
121
 
 
122
   The "configure" script will ask you for directories where to put
 
123
   the Coq binaries, standard library, man pages, etc. It will propose
 
124
   you some default values.
 
125
 
 
126
   For a list of options accepted by the "configure" script, run
 
127
   "./configure -help". The main options accepted are:
 
128
 
 
129
-prefix <dir>
 
130
        Binaries, library, man pages and Emacs mode will be respectively
 
131
        installed in <dir>/bin, <dir>/lib/coq, <dir>/man and
 
132
        <dir>/lib/emacs/site-lisp
 
133
 
 
134
-bindir <dir>                   (default: /usr/local/bin)
 
135
        Directory where the binaries will be installed
 
136
 
 
137
-libdir <dir>                   (default: /usr/local/lib/coq)
 
138
        Directory where the Coq standard library will be installed
 
139
 
 
140
-mandir <dir>                   (default: /usr/local/man)
 
141
        Directory where the Coq manual pages will be installed
 
142
 
 
143
-emacslib <dir>                 (default: /usr/local/lib/emacs/site-lisp)
 
144
        Directory where the Coq Emacs mode will be installed
 
145
 
 
146
-arch <value>                   (default is the result of the command "arch")
 
147
        An arbitrary architecture name for your machine (useful when
 
148
        compiling Coq on two different architectures for which the
 
149
        result of "arch" is the same, e.g. Sun OS and Solaris)
 
150
 
 
151
-local
 
152
        Compile Coq to run in its source directory. The installation (step 6)
 
153
        is not necessary in that case.
 
154
 
 
155
-opt
 
156
        Use the ocamlc.opt compiler instead of ocamlc (and ocamlopt.opt 
 
157
        compiler instead of ocamlopt). Makes compilation faster (recommended).
 
158
 
 
159
-nowarnings
 
160
        Disable the Objective Caml compiler warnings. This option has no
 
161
        effect on the result of the compilation.
 
162
 
 
163
-browser <command>
 
164
        Use <command> to open an URL in a browser. %s must appear in <command>,
 
165
        and will be replaced by the URL.
 
166
 
 
167
5- Still in the root directory, do
 
168
 
 
169
        make world
 
170
 
 
171
   to compile Coq in Objective Caml bytecode (and native-code if supported).
 
172
 
 
173
   This will compile the entire system. This phase can take more or less time,
 
174
   depending on your architecture and is fairly verbose. 
 
175
 
 
176
6- You can now install the Coq system. Executables, libraries, manual pages
 
177
   and emacs mode are copied in some standard places of your system, defined at
 
178
   configuration time (step 3). Just do
 
179
 
 
180
        umask 022
 
181
        make install
 
182
 
 
183
   Of course, you may need superuser rights to do that.
 
184
   To use the Coq emacs mode you also need to put the following lines
 
185
   in you .emacs file:
 
186
 
 
187
        (setq auto-mode-alist (cons '("\\.v$" . coq-mode) auto-mode-alist))
 
188
        (autoload 'coq-mode "coq" "Major mode for editing Coq vernacular." t)
 
189
 
 
190
7- You can now clean all the sources. (You can even erase them.)
 
191
 
 
192
        make clean
 
193
 
 
194
 
 
195
INSTALLATION PROCEDURE FOR ADVANCED USERS.
 
196
==========================================
 
197
 
 
198
   If you wish to write tactics (and that really means that you belong
 
199
   to advanced users!) you *must* keep the Coq sources, without cleaning
 
200
   them. Therefore, to avoid a duplication of binaries and library, it is
 
201
   not necessary to do the installation step (6- above).
 
202
   You just have to tell it at configuration step (4- above) with the
 
203
   option -local :
 
204
 
 
205
        ./configure -local <other options>
 
206
 
 
207
   Then compile the sources as described in step 5 above. The resulting
 
208
   binaries will reside in the subdirectory bin/.
 
209
 
 
210
   If you want to compile the sources for debugging (i.e. with the option
 
211
   -g of the Caml compiler) then add the -debug option at configuration
 
212
   step :
 
213
 
 
214
        ./configure -debug <other options>
 
215
 
 
216
   and then compile the sources (step 5). Then you must make a Coq toplevel
 
217
   including your own tactics, which must be compiled with -g, with coqmktop.
 
218
   See the chapter 16 of the Coq Reference Manual for details about how
 
219
   to use coqmktop and the Objective Caml debugger with Coq.
 
220
 
 
221
 
 
222
THE AVAILABLE COMMANDS.
 
223
=======================
 
224
 
 
225
   There are two Coq commands:
 
226
        
 
227
        coqtop          The Coq toplevel
 
228
        coqc            The Coq compiler
 
229
 
 
230
   There are actually two binaries for the interactive system, coqtop.byte
 
231
   and coqtop.opt (respectively bytecode and native code versions of Coq). 
 
232
   coqtop is a link to the fastest version, i.e. coqtop.opt if any, and
 
233
   coqtop.byte otherwise. coqc also invokes the fastest version of Coq.
 
234
   Options -opt and -byte to coqtop and coqc selects a particular binary.
 
235
 
 
236
    * `coqtop' launches Coq in the interactive mode. The default state
 
237
      (see the "-inputstate" option) is `initial.coq', which contains some 
 
238
      basic logical definitions, the associated parsing and printing rules,
 
239
      and the following tactic modules: Equality, Tauto, Inv, EAuto and Refine.
 
240
 
 
241
    * `coqc' allows compilation of Coq files directly from the command line.
 
242
      To compile a file foo.v, do:
 
243
 
 
244
                coqc foo.v
 
245
 
 
246
      It will produce a file foo.vo, that you can now load through the Coq 
 
247
      command "Require". 
 
248
 
 
249
   A detailed description of these commands and of their options is given
 
250
   in the Reference Manual (which you can get by FTP, in the doc/
 
251
   directory, or read online on http://coq.inria.fr/doc/)
 
252
   and in the corresponding manual pages.
 
253
 
 
254
   There is also a tutorial and a FAQ; see http://coq.inria.fr/doc1-eng.html
 
255
 
 
256
 
 
257
COMMON PROBLEMS.
 
258
================
 
259
 
 
260
    * On some sites, when running `./configure', `pwd' returned a 
 
261
    path which is not valid from another machine (it may look like 
 
262
    "/tmp_mnt/foo/...") and, as a consequence, you won't be able to run
 
263
    coqtop or coqc. The solution is to give the correct value, with
 
264
 
 
265
        ./configure -src <correct path> <other options>
 
266
 
 
267
    * The `make install' procedure uses mkdirhier, a program that may
 
268
   not be present on certain systems. To fix that, try to replace
 
269
   mkdirhier with mkdir -p
 
270
 
 
271
    * See also section on dynamically loaded libraries.
 
272
 
 
273
 
 
274
COMPILING FOR DIFFERENT ARCHITECTURES.
 
275
======================================
 
276
 
 
277
   This section explains how to compile Coq for several architecture,
 
278
   sharing the same sources. The important fact is that some files are 
 
279
   architecture dependent (.cmx, .o and executable  files for instance)
 
280
   but others are not (.cmo and .vo). Consequently, you can :
 
281
 
 
282
   o  save some time during compilation by not cleaning the architecture
 
283
      independent files;
 
284
 
 
285
   o  save some space during installation by sharing the Coq standard
 
286
      library (which is fully architecture independent).
 
287
 
 
288
   So, in order to compile Coq for a new architecture, proceed as follows:
 
289
 
 
290
   * Omit step 7 above and clean only the architecture dependent files:
 
291
     it is done automatically with the command
 
292
 
 
293
                make archclean
 
294
 
 
295
   * Configure the system for the new architecture:
 
296
 
 
297
                ./configure <options>
 
298
 
 
299
     You can specify the same directory for the standard library but you
 
300
     MUST specify a different directory for the binaries (of course).
 
301
 
 
302
   * Compile and install the system as described in steps 5 and 6 above.
 
303
 
 
304
 
 
305
MOVING BINARIES OR LIBRARY.
 
306
===========================
 
307
 
 
308
   If you move the binaries or the library, Coq will be "lost".
 
309
   Running "coqtop" would then return an error message of the kind:
 
310
 
 
311
        Error during initialization :
 
312
        Error: Can't find file initial.coq on loadpath
 
313
 
 
314
   If you really have (or want) to move the binaries or the library, then
 
315
   you have to indicate where Coq will find the libraries:
 
316
 
 
317
        coqtop -coqlib <directory>
 
318
 
 
319
 
 
320
DYNAMICALLY LOADED LIBRARIES FOR BYTECODE EXECUTABLES.
 
321
======================================================
 
322
 
 
323
   Some bytecode executables of Coq use the OCaml runtime, which dynamically
 
324
   loads a shared library (.so or .dll). When it is not installed properly, you
 
325
   can get an error message of this kind:
 
326
 
 
327
        Fatal error: cannot load shared library dllcoqrun
 
328
        Reason: dllcoqrun.so: cannot open shared object file: No such file or directory
 
329
 
 
330
   In this case, you need either:
 
331
     - to set the CAML_LD_LIBRARY_PATH environment variable to point to the
 
332
       directory where dllcoqrun.so is; this is suitable when you want to run
 
333
       the command a limited number of times in a controlled environment (e.g.
 
334
       during compilation of binary packages);
 
335
     - install dllcoqrun.so in a location listed in the file ld.conf that is in
 
336
       the directory of the standard library of OCaml;
 
337
     - recompile your bytecode executables after reconfiguring the location of
 
338
       of the shared library:
 
339
         ./configure -coqrunbyteflags "-dllib -lcoqrun -dllpath <path>" ...
 
340
       where <path> is the directory where the dllcoqrun.so is installed;
 
341
     - (not recommended) compile bytecode executables with a custom OCaml
 
342
       runtime by using:
 
343
         ./configure -custom ...
 
344
       be aware that stripping executables generated this way, or performing
 
345
       other executable-specific operations, will make them useless.