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