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