]> www.ginac.de Git - ginac.git/blob - INSTALL
unit_matrix(r,c) can return an evaluated matrix object.
[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.4. 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/>. Also Python version >= 2.6 is
15 required.
16
17 To build the GiNaC tutorial and reference manual the doxygen utility
18 (it can be downloaded from http://www.stack.nl/~dimitri/doxygen) and
19 TeX are necessary.
20
21 Known to work with:
22  - Linux on x86 and x86_64 using 
23    - GCC 3.4, 4.0, 4.1, 4.2, 4.3.x (x >= 1), 4.4, 4.5, 4.6, and 4.9
24    - Clang 2.8
25  - Windows on x86 using GCC 3.4 (MinGW)
26
27 Known not to work with:
28  - Clang 2.7 and earlier due to poor C++ support.
29  - GCC 4.3.0 due to the compiler bug,
30    see <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35548>.
31  - GCC 2.96 or earlier because proper exception and standard library support
32    is missing there.
33
34 If you install from git, you also need GNU autoconf (>=2.59), automake (>=1.8),
35 libtool (>= 1.5), python (>= 2.5), bison (>= 2.3), flex (>= 2.5.33) to be installed.
36
37
38 INSTALLATION
39 ============
40
41 To install from a source .tar.bz2 distribution:
42
43  $ ./configure
44  $ make
45  [become root if necessary]
46  # make install
47
48 To build the GiNaC tutorial and reference manual in HTML, DVI, PostScript,
49 or PDF formats, use one of
50
51  $ make html
52  $ make dvi
53  $ make ps
54  $ make pdf
55
56 To compile and run GiNaC's test and benchmark suite and check whether the
57 library works correctly you can use
58
59  $ make check
60
61 The "configure" script can be given a number of options to enable and
62 disable various features. For a complete list, type:
63
64  $ ./configure --help
65
66 A few of the more important ones:
67
68  --prefix=PREFIX        install architecture-independent files in PREFIX
69                         [defaults to /usr/local]
70  --exec-prefix=EPREFIX  install architecture-dependent files in EPREFIX
71                         [defaults to the value given to --prefix]
72  --disable-shared       suppress the creation of a shared version of libginac
73  --disable-static       suppress the creation of a static version of libginac
74
75 More detailed installation instructions can be found in the documentation,
76 in the doc/ directory.
77
78 The time the "make" step takes depends on optimization levels. To give you
79 a rough idea of what you have to expect the following table may be helpful.
80 It was measured on an Athlon X2/3GHz with 4Gb of RAM.
81
82 step          | GCC optimization  | comment
83               |   -O1   |   -O2   |
84 --------------+---------+---------+----------------------------------------
85 make          |   ~1m   |   ~2m   | shared library only (--disable-static),
86               |         |         | parallel compilation (MAKEFLAGS=-j2)
87 make check    |   ~6m   |   ~6m   | largely due to compilation
88
89
90 To install from git 
91 ===================
92
93 First, download the code:
94  $ git clone git://www.ginac.de/ginac.git ginac
95  $ cd ginac
96
97 Secondly, make sure all required software is installed. This is *really*
98 important step. If some package is missing, the `configure' script might
99 be misgenerated, see e.g. this discussion:
100 <http://www.ginac.de/pipermail/ginac-list/2007-November/001263.html>
101
102 Finally, run
103
104  $ autoreconf -i
105
106 to generate the `configure' script, and proceed in a standard way, i.e.
107
108  $ ./configure
109  $ make
110  [become root if necessary]
111  # make install
112
113 COMMON PROBLEMS
114 ===============
115
116 Problems with CLN
117 -----------------
118
119 You should use at least CLN-1.2.2, since during the development of GiNaC
120 various bugs have been discovered and fixed in earlier versions. Please
121 install CLN properly on your system before continuing with GiNaC.
122
123 Problems building ginsh
124 -----------------------
125
126 The GiNaC interactive shell, ginsh, makes use of GNU readline to provide 
127 command line editing and history. If readline library and/or headers are
128 missing on your system, the configure script will issue a warning. In this
129 case you have two options:
130
131 1) (the easiest) If you don't intend to use ginsh (i.e. if you need GiNaC
132 library to compile some piece of software), ignore it. ginsh builds just
133 fine without readline (obviously, it won't support the command line history
134 and editing).
135
136 2) Install GNU readline and run the configure script once again. Depending on
137 what your system/distribution is, you will have to install a package called
138 libreadline and libreadline-dev (or readline-devel). If your system's vendor
139 doesn't supply such packages, go to <ftp://ftp.gnu.org/gnu/readline/> and
140 compile it yourself. Note that non-GNU versions of libreadline (in particular
141 one shipped with Mac OS X) are not supported at the moment.
142
143 Problems with missing standard header files
144 -------------------------------------------
145
146 Building GiNaC requires many standard header files. If you get a configure
147 error complaining about such missing files your compiler and library are
148 probably not up to date enough and it's no worth continuing.