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