]> www.ginac.de Git - ginac.git/blob - INSTALL
[DOC] Update the tutorial for GiNaC::function resolution.
[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 <https://www.ginac.de/CLN/>.
6
7 You will also need a decent C++ compiler (ISO C++-11 or higher). We recommend
8 the C++ compiler from the GNU compiler collection or the one from the LLVM
9 project. If you have a different compiler, you are on your own. Note that you
10 may have to use the same compiler you compiled CLN with for compatibility.
11
12 The pkgconf utility is required for configuration: <http://pkgconf.org/>.
13 Alternatively, pkg-config works as well.
14
15 To build the GiNaC tutorial and reference manual, the doxygen utility
16 (it can be downloaded from <https://www.doxygen.nl/>) and TeX are necessary.
17
18 If you install from git, you also need GNU autoconf (>=2.59), automake (>=1.8),
19 libtool (>= 1.5), python (version 2.7 or 3.x), bison (>= 2.3), flex (>= 2.5.33)
20 to be installed.
21
22
23 INSTALLATION
24 ============
25
26 To install from an unpacked source .tar.bz2 distribution:
27
28  $ ./configure
29  $ make
30  [become root if necessary]
31  # make install
32
33 To build the GiNaC tutorial and reference manual in HTML, DVI, PostScript,
34 or PDF formats, use one of
35
36  $ make html
37  $ make dvi
38  $ make ps
39  $ make pdf
40
41 To compile and run GiNaC's test and benchmark suite and check whether the
42 library works correctly you can use
43
44  $ make check
45
46 The "configure" script can be given a number of options to enable and disable
47 various features. For a complete list, type:
48
49  $ ./configure --help
50
51 A few of the more important ones:
52
53  --prefix=PREFIX        install architecture-independent files in PREFIX
54                         [defaults to /usr/local]
55  --exec-prefix=EPREFIX  install architecture-dependent files in EPREFIX
56                         [defaults to the value given to --prefix]
57  --disable-shared       suppress the creation of a shared version of libginac
58  --disable-static       suppress the creation of a static version of libginac
59
60 More detailed installation instructions can be found in the documentation,
61 in the doc/ directory.
62
63 The time to build the library depends to a large degree on optimization levels.
64 Using the default high optimization, 'make' takes a few minutes on a fast
65 machine and 'make check' takes some more minutes. You can speed this up with a
66 parallel build with 'make -j2' or higher, depending on the number of available
67 CPU cores.
68
69
70 To install from git 
71 ===================
72
73 First, download the code:
74  $ git clone git://www.ginac.de/ginac.git ginac
75  $ cd ginac
76
77 Secondly, make sure all required software is installed. This is *really*
78 important step. If some package is missing, the `configure' script might
79 be misgenerated, see e.g. this discussion:
80 <https://www.ginac.de/pipermail/ginac-list/2007-November/001263.html>
81
82 Finally, run
83
84  $ autoreconf -i
85
86 to generate the `configure' script, and proceed in a standard way, i.e.
87
88  $ ./configure
89  $ make
90  [become root if necessary]
91  # make install
92
93 COMMON PROBLEMS
94 ===============
95
96 Problems with CLN
97 -----------------
98
99 You should use at least CLN-1.2.2, since during the development of GiNaC
100 various bugs have been discovered and fixed in earlier versions. Please
101 install CLN properly on your system before continuing with GiNaC.
102
103 Problems building ginsh
104 -----------------------
105
106 The GiNaC interactive shell, ginsh, makes use of GNU readline to provide 
107 command line editing and history. If readline library and/or headers are
108 missing on your system, the configure script will issue a warning. In this
109 case you have two options:
110
111 1) (the easiest) If you don't intend to use ginsh (i.e. if you need GiNaC
112 library to compile some piece of software), ignore it. ginsh builds just
113 fine without readline (obviously, it won't support the command line history
114 and editing).
115
116 2) Install GNU readline and run the configure script once again. Depending on
117 what your system/distribution is, you will have to install a package called
118 libreadline and libreadline-dev (or readline-devel). If your system's vendor
119 doesn't supply such packages, go to <ftp://ftp.gnu.org/gnu/readline/> and
120 compile it yourself. Note that non-GNU versions of libreadline (in particular
121 one shipped with Mac OS X) are not supported at the moment.