]> www.ginac.de Git - ginac.git/blob - INSTALL
kill spurious comma in flags.h
[ginac.git] / INSTALL
1 PREREQUISITES
2 =============
3
4 GiNaC requires the CLN library by Bruno Haible installed on your system.
5 It is available from <ftp://ftpthep.physik.uni-mainz.de/pub/gnu/>.
6
7 You will also need a decent ANSI-compliant C++-compiler. We recommend the
8 C++ compiler from the GNU compiler collection, GCC >= 3.0. If you have a
9 different or older compiler you are on your own. Note that you may have to
10 use the same compiler you compiled CLN with because of differing
11 name-mangling schemes.
12
13 The pkg-config utility is required for configuration, it can be downloaded
14 from <http://pkg-config.freedesktop.org/>.
15
16 To build the GiNaC tutorial and reference manual the doxygen utility
17 (it can be downloaded from http://www.stack.nl/~dimitri/doxygen) and
18 TeX are necessary.
19
20 Known to work with:
21  - Linux on x86, Alpha and Sparc using GCC 3.x and 4.0.
22
23 Known not to work with:
24  - GCC 2.96 or earlier because proper exception and standard library support
25    is missing there.
26
27 If you install from CVS, you also need GNU autoconf (>=2.59), automake (>=1.7),
28 libtool (>= 1.5), bison (>= 2.3), flex (>= 2.5.33) to be installed.
29
30
31 INSTALLATION
32 ============
33
34 To install from a source .tar.bz2 distribution:
35
36  $ ./configure
37  $ make
38  [become root if necessary]
39  # make install
40
41 To build the GiNaC tutorial and reference manual in HTML, DVI, PostScript,
42 or PDF formats, use one of
43
44  $ make html
45  $ make dvi
46  $ make ps
47  $ make pdf
48
49 To compile and run GiNaC's test and benchmark suite and check whether the
50 library works correctly you can use
51
52  $ make check
53
54 The "configure" script can be given a number of options to enable and
55 disable various features. For a complete list, type:
56
57  $ ./configure --help
58
59 A few of the more important ones:
60
61  --prefix=PREFIX        install architecture-independent files in PREFIX
62                         [defaults to /usr/local]
63  --exec-prefix=EPREFIX  install architecture-dependent files in EPREFIX
64                         [defaults to the value given to --prefix]
65  --disable-shared       suppress the creation of a shared version of libginac
66  --disable-static       suppress the creation of a static version of libginac
67
68 More detailed installation instructions can be found in the documentation,
69 in the doc/ directory.
70
71 The time the "make" step takes depends heavily on optimization levels. Large
72 amounts of memory (>128MB) will be required by the compiler, also depending
73 on optimization. To give you a rough idea of what you have to expect the
74 following table may be helpful. It was measured on an Athlon/800MHz with
75 "enough" memory:
76
77 step          | GCC optimization  | comment
78               |   -O1   |   -O2   |
79 --------------+---------+---------+----------------------------------------
80 make          |   ~6m   |   ~8m   | shared and static library
81 make check    |   ~8m   |  ~12m   | largely due to compilation
82
83
84 To install from CVS
85 ===================
86
87 First, download the code:
88
89  $ cvs -d :pserver:anoncvs@cvs.ginac.de:/home/cvs/GiNaC login
90  [enter "anoncvs" as the password]
91  $ cvs -d :pserver:anoncvs@cvs.ginac.de:/home/cvs/GiNaC co GiNaC
92  $ cd GiNaC
93
94 Secondly, make sure all required software is installed. This is *really*
95 important step. If some package is missing, the `configure' script might
96 be misgenerated, see e.g. this discussion:
97 <http://www.ginac.de/pipermail/ginac-list/2007-November/001263.html>
98
99 Finally, run
100
101  $ autoreconf -i
102
103 to generate the `configure' script, and proceed in a standard way, i.e.
104
105  $ ./configure
106  $ make
107  [become root if necessary]
108  # make install
109
110 COMMON PROBLEMS
111 ===============
112
113 Problems with CLN
114 -----------------
115
116 You should use at least CLN-1.1, since during the development of GiNaC
117 various bugs have been discovered and fixed in earlier versions. Please
118 install CLN properly on your system before continuing with GiNaC.
119
120 Problems building ginsh
121 -----------------------
122
123 The most common reason why this doesn't succeed is the absence of GNU
124 libreadline and/or the corresponding header files. Depending on what your
125 system/distribution is, you will have to install a package called
126 libreadline and maybe libreadline-dev. If your system's vendor doesn't
127 supply such packages, go to <ftp://ftp.gnu.org/gnu/readline/> and compile
128 it yourself. Note that non-GNU versions of libreadline (in particular
129 one shipped with Mac OS X) are not supported at the moment.
130
131 Problems with missing standard header files
132 -------------------------------------------
133
134 Building GiNaC requires many standard header files. If you get a configure
135 error complaining about such missing files your compiler and library are
136 probably not up to date enough and it's no worth continuing.