1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
8 <sect1 id="ch-system-gmp" role="wrap">
9 <?dbhtml filename="gmp.html"?>
11 <sect1info condition="script">
12 <productname>gmp</productname>
13 <productnumber>&gmp-version;</productnumber>
14 <address>&gmp-url;</address>
17 <title>GMP-&gmp-version;</title>
19 <indexterm zone="ch-system-gmp">
20 <primary sortas="a-GMP">GMP</primary>
23 <sect2 role="package">
26 <para>The GMP package contains math libraries. These have useful functions
27 for arbitrary precision arithmetic.</para>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
34 <seg>&gmp-fin-sbu;</seg>
35 <seg>&gmp-fin-du;</seg>
41 <sect2 role="installation">
42 <title>Installation of GMP</title>
45 <para>If you are building for 32-bit x86, but you have a CPU which is
46 capable of running 64-bit code <emphasis>and</emphasis> you have specified
47 <envar>CFLAGS</envar> in the environment, the configure script will
48 attempt to configure for 64-bits and fail.
49 Avoid this by invoking the configure command below with
50 <screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para>
54 <para>The default settings of GMP produce libraries optimized for
55 the host processor. If libraries suitable for processors less
56 capable than the host's CPU are desired, generic libraries can be
57 created by running the following:
59 <screen role="nodump"><userinput>cp -v configfsf.guess config.guess
60 cp -v configfsf.sub config.sub</userinput></screen></para>
63 <para>Prepare GMP for compilation:</para>
65 <screen><userinput remap="configure">./configure --prefix=/usr \
68 --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
71 <title>The meaning of the new configure options:</title>
74 <term><parameter>--enable-cxx</parameter></term>
76 <para>This parameter enables C++ support</para>
81 <term><parameter>--docdir=/usr/share/doc/gmp-&gmp-version;</parameter></term>
83 <para>This variable specifies the correct place for the
90 <para>Compile the package and generate the HTML documentation:</para>
92 <screen><userinput remap="make">make
93 make html</userinput></screen>
96 <para>The test suite for GMP in this section is considered critical.
97 Do not skip it under any circumstances.</para>
100 <para>Test the results:</para>
102 <screen><userinput remap="test">make check 2>&1 | tee gmp-check-log</userinput></screen>
104 <caution><para>The code in gmp is highly optimized for the processor where
105 it is built. Occasionally, the code that detects the processor misidentifies
106 the system capabilities and there will be errors in the tests or other
107 applications using the gmp libraries with the message "Illegal
108 instruction". In this case, gmp should be reconfigured with the option
109 --build=x86_64-pc-linux-gnu and rebuilt.</para></caution>
111 <para>Ensure that all 197 tests in the test suite passed.
112 Check the results by issuing the following command:</para>
114 <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
116 <para>Install the package and its documentation:</para>
118 <screen><userinput remap="install">make install
119 make install-html</userinput></screen>
123 <sect2 id="contents-gmp" role="content">
124 <title>Contents of GMP</title>
127 <segtitle>Installed Libraries</segtitle>
128 <segtitle>Installed directory</segtitle>
131 <seg>libgmp.so and libgmpxx.so</seg>
132 <seg>/usr/share/doc/gmp-&gmp-version;</seg>
137 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
138 <?dbfo list-presentation="list"?>
139 <?dbhtml list-presentation="table"?>
141 <varlistentry id="libgmp">
142 <term><filename class="libraryfile">libgmp</filename></term>
144 <para>Contains precision math functions</para>
145 <indexterm zone="ch-system-gmp libgmp">
146 <primary sortas="c-libgmp">libgmp</primary>
151 <varlistentry id="libgmpxx">
152 <term><filename class="libraryfile">libgmpxx</filename></term>
154 <para>Contains C++ precision math functions</para>
155 <indexterm zone="ch-system-gmp libgmpxx">
156 <primary sortas="c-libgmpxx">libgmpxx</primary>