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