[6cc0516] | 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">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-system-gmp" role="wrap">
|
---|
| 9 | <?dbhtml filename="gmp.html"?>
|
---|
| 10 |
|
---|
| 11 | <sect1info condition="script">
|
---|
| 12 | <productname>gmp</productname>
|
---|
| 13 | <productnumber>&gmp-version;</productnumber>
|
---|
| 14 | <address>&gmp-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
| 17 | <title>GMP-&gmp-version;</title>
|
---|
| 18 |
|
---|
| 19 | <indexterm zone="ch-system-gmp">
|
---|
| 20 | <primary sortas="a-GMP">GMP</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect2 role="package">
|
---|
| 24 | <title/>
|
---|
| 25 |
|
---|
| 26 | <para>The GMP package contains math libraries. These have useful functions
|
---|
| 27 | for arbitrary precision arithmetic.</para>
|
---|
| 28 |
|
---|
| 29 | <segmentedlist>
|
---|
| 30 | <segtitle>&buildtime;</segtitle>
|
---|
| 31 | <segtitle>&diskspace;</segtitle>
|
---|
| 32 |
|
---|
| 33 | <seglistitem>
|
---|
[6dfcfecc] | 34 | <seg>&gmp-fin-sbu;</seg>
|
---|
| 35 | <seg>&gmp-fin-du;</seg>
|
---|
[6cc0516] | 36 | </seglistitem>
|
---|
| 37 | </segmentedlist>
|
---|
| 38 |
|
---|
| 39 | </sect2>
|
---|
| 40 |
|
---|
| 41 | <sect2 role="installation">
|
---|
| 42 | <title>Installation of GMP</title>
|
---|
| 43 |
|
---|
[e4eb4cce] | 44 | <note>
|
---|
[1018fd3] | 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
|
---|
[b21778b] | 50 | <screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para>
|
---|
[e4eb4cce] | 51 | </note>
|
---|
| 52 |
|
---|
[f63c0c3] | 53 | <note>
|
---|
| 54 | <para>The default settings of GMP produce libraries optimized for
|
---|
| 55 | the host processor. If libraries suitable for processors less
|
---|
[d672ab7] | 56 | capable than the host's CPU are desired, generic libraries can be
|
---|
[f63c0c3] | 57 | created by running the following:
|
---|
| 58 |
|
---|
| 59 | <screen role="nodump"><userinput>cp -v configfsf.guess config.guess
|
---|
| 60 | cp -v configfsf.sub config.sub</userinput></screen></para>
|
---|
| 61 | </note>
|
---|
| 62 |
|
---|
[6cc0516] | 63 | <para>Prepare GMP for compilation:</para>
|
---|
| 64 |
|
---|
[73b2841] | 65 | <screen><userinput remap="configure">./configure --prefix=/usr \
|
---|
| 66 | --enable-cxx \
|
---|
| 67 | --disable-static \
|
---|
[c296646] | 68 | --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
|
---|
[6cc0516] | 69 |
|
---|
[0bb67603] | 70 | <variablelist>
|
---|
[f1994dc] | 71 | <title>The meaning of the new configure options:</title>
|
---|
[0bb67603] | 72 |
|
---|
| 73 | <varlistentry>
|
---|
| 74 | <term><parameter>--enable-cxx</parameter></term>
|
---|
| 75 | <listitem>
|
---|
| 76 | <para>This parameter enables C++ support</para>
|
---|
| 77 | </listitem>
|
---|
| 78 | </varlistentry>
|
---|
| 79 |
|
---|
[b06fc9c] | 80 | <varlistentry>
|
---|
[94ea3c4] | 81 | <term><parameter>--docdir=/usr/share/doc/gmp-&gmp-version;</parameter></term>
|
---|
[b06fc9c] | 82 | <listitem>
|
---|
| 83 | <para>This variable specifies the correct place for the
|
---|
| 84 | documentation.</para>
|
---|
| 85 | </listitem>
|
---|
| 86 | </varlistentry>
|
---|
| 87 |
|
---|
[0bb67603] | 88 | </variablelist>
|
---|
| 89 |
|
---|
[b06fc9c] | 90 | <para>Compile the package and generate the HTML documentation:</para>
|
---|
[6cc0516] | 91 |
|
---|
[b06fc9c] | 92 | <screen><userinput remap="make">make
|
---|
| 93 | make html</userinput></screen>
|
---|
[6cc0516] | 94 |
|
---|
| 95 | <important>
|
---|
| 96 | <para>The test suite for GMP in this section is considered critical.
|
---|
| 97 | Do not skip it under any circumstances.</para>
|
---|
| 98 | </important>
|
---|
| 99 |
|
---|
| 100 | <para>Test the results:</para>
|
---|
| 101 |
|
---|
[10d231d] | 102 | <screen><userinput remap="test">make check 2>&1 | tee gmp-check-log</userinput></screen>
|
---|
[d672ab7] | 103 |
|
---|
[98bed7f] | 104 | <caution><para>The code in gmp is highly optimized for the processor where
|
---|
[1118b17] | 105 | it is built. Occasionally, the code that detects the processor misidentifies
|
---|
[98bed7f] | 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
|
---|
[ceebda5] | 109 | --build=x86_64-pc-linux-gnu and rebuilt.</para></caution>
|
---|
[10d231d] | 110 |
|
---|
[c7e74d6] | 111 | <para>Ensure that all 197 tests in the test suite passed.
|
---|
[98d78cf] | 112 | Check the results by issuing the following command:</para>
|
---|
[10d231d] | 113 |
|
---|
[53366411] | 114 | <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
|
---|
[10d231d] | 115 |
|
---|
[b06fc9c] | 116 | <para>Install the package and its documentation:</para>
|
---|
[e7c8034] | 117 |
|
---|
[b06fc9c] | 118 | <screen><userinput remap="install">make install
|
---|
| 119 | make install-html</userinput></screen>
|
---|
[6cc0516] | 120 |
|
---|
[e7c8034] | 121 | </sect2>
|
---|
[6cc0516] | 122 |
|
---|
[6dfcfecc] | 123 | <!-- - - - - - - - - - -->
|
---|
| 124 | <!-- Multilib - 32bit -->
|
---|
| 125 | <!-- - - - - - - - - - -->
|
---|
| 126 |
|
---|
[fd48baa] | 127 | <sect2 arch="ml_32,ml_all" role="installation">
|
---|
[6dfcfecc] | 128 | <title>Installation of GMP - 32bit</title>
|
---|
[b3f1ebb3] | 129 |
|
---|
| 130 | <para>Clean previous build:</para>
|
---|
| 131 |
|
---|
| 132 | <screen><userinput remap="pre">make distclean</userinput></screen>
|
---|
| 133 |
|
---|
| 134 | <para>Generic libraries can be created by running
|
---|
| 135 | the following:</para>
|
---|
| 136 |
|
---|
[2d66549] | 137 | <screen role="nodump"><userinput remap="pre">cp -v configfsf.guess config.guess
|
---|
[b3f1ebb3] | 138 | cp -v configfsf.sub config.sub</userinput></screen>
|
---|
| 139 |
|
---|
| 140 | <para>Prepare GMP for compilation:</para>
|
---|
| 141 |
|
---|
| 142 | <screen><userinput remap="configure">ABI="32" \
|
---|
[6dfcfecc] | 143 | CFLAGS="-m32 -O2 -pedantic -fomit-frame-pointer -mtune=generic -march=i686" \
|
---|
| 144 | CXXFLAGS="$CFLAGS" \
|
---|
[0ebda11] | 145 | PKG_CONFIG_PATH="/usr/lib32/pkgconfig" \
|
---|
[70aadfb] | 146 | ./configure \
|
---|
| 147 | --host=i686-pc-linux-gnu \
|
---|
| 148 | --prefix=/usr \
|
---|
| 149 | --disable-static \
|
---|
| 150 | --enable-cxx \
|
---|
| 151 | --libdir=/usr/lib32 \
|
---|
[0ebda11] | 152 | --includedir=/usr/include/m32/gmp</userinput></screen>
|
---|
[6dfcfecc] | 153 |
|
---|
| 154 | <variablelist>
|
---|
| 155 | <title>The meaning of the new configure options:</title>
|
---|
| 156 |
|
---|
| 157 | <varlistentry>
|
---|
[0ebda11] | 158 | <term><parameter>--includedir=/usr/include/m32/gmp</parameter></term>
|
---|
[6dfcfecc] | 159 | <listitem>
|
---|
| 160 | <para>Some definitions in gmp.h differs for each arch but
|
---|
| 161 | has same name. Therefore, the headers must be separated from
|
---|
| 162 | each other.</para>
|
---|
| 163 | </listitem>
|
---|
| 164 | </varlistentry>
|
---|
| 165 |
|
---|
| 166 | </variablelist>
|
---|
[b3f1ebb3] | 167 |
|
---|
| 168 | <para>Compile the package:</para>
|
---|
| 169 |
|
---|
[6dfcfecc] | 170 | <screen><userinput remap="make">sed -i 's/$(exec_prefix)\/include/$\(includedir\)/' Makefile
|
---|
| 171 | make</userinput></screen>
|
---|
[b3f1ebb3] | 172 |
|
---|
| 173 | <important>
|
---|
| 174 | <para>The test suite for GMP in this section is considered critical.
|
---|
| 175 | Do not skip it under any circumstances.</para>
|
---|
| 176 | </important>
|
---|
| 177 |
|
---|
| 178 | <para>Test the results:</para>
|
---|
| 179 |
|
---|
| 180 | <screen><userinput remap="test">make check 2>&1 | tee gmp-check-log</userinput></screen>
|
---|
| 181 |
|
---|
[6dfcfecc] | 182 | <para>Ensure that all 197 tests in the test suite passed.
|
---|
[b3f1ebb3] | 183 | Check the results by issuing the following command:</para>
|
---|
| 184 |
|
---|
| 185 | <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
|
---|
| 186 |
|
---|
| 187 | <para>Install the package:</para>
|
---|
| 188 |
|
---|
| 189 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
|
---|
[0ebda11] | 190 | cp -Rv DESTDIR/usr/lib32/* /usr/lib32
|
---|
| 191 | cp -Rv DESTDIR/usr/include/m32/* /usr/include/m32/
|
---|
[b3f1ebb3] | 192 | rm -rf DESTDIR</userinput></screen>
|
---|
| 193 |
|
---|
[6dfcfecc] | 194 | </sect2><!-- m32 -->
|
---|
| 195 |
|
---|
| 196 | <!-- - - - - - - - - - -->
|
---|
| 197 | <!-- Multilib - x32bit -->
|
---|
| 198 | <!-- - - - - - - - - - -->
|
---|
| 199 |
|
---|
[fd48baa] | 200 | <sect2 arch="ml_x32,ml_all" role="installation">
|
---|
[b3f1ebb3] | 201 | <title>Installation of GMP - x32-bit</title>
|
---|
| 202 |
|
---|
| 203 | <para>Clean previous build:</para>
|
---|
| 204 |
|
---|
| 205 | <screen><userinput remap="pre">make distclean</userinput></screen>
|
---|
| 206 |
|
---|
| 207 | <para>Generic libraries can be created by running
|
---|
| 208 | the following:</para>
|
---|
| 209 |
|
---|
[2d66549] | 210 | <screen role="nodump"><userinput remap="pre">cp -v configfsf.guess config.guess
|
---|
[b3f1ebb3] | 211 | cp -v configfsf.sub config.sub</userinput></screen>
|
---|
| 212 |
|
---|
| 213 | <para>Prepare GMP for compilation:</para>
|
---|
| 214 |
|
---|
| 215 | <screen><userinput remap="configure">ABI="x32" \
|
---|
[6dfcfecc] | 216 | CFLAGS="-mx32 -O2 -pedantic -fomit-frame-pointer -mtune=generic -march=x86-64" \
|
---|
| 217 | CXXFLAGS="$CFLAGS" \
|
---|
[0ebda11] | 218 | PKG_CONFIG_PATH="/usr/libx32/pkgconfig" \
|
---|
[70aadfb] | 219 | ./configure \
|
---|
| 220 | --host=x86_64-pc-linux-gnux32 \
|
---|
| 221 | --prefix=/usr \
|
---|
| 222 | --disable-static \
|
---|
| 223 | --enable-cxx \
|
---|
| 224 | --libdir=/usr/libx32 \
|
---|
[0ebda11] | 225 | --includedir=/usr/include/mx32/gmp</userinput></screen>
|
---|
[b3f1ebb3] | 226 |
|
---|
| 227 | <para>Compile the package:</para>
|
---|
| 228 |
|
---|
[6dfcfecc] | 229 | <screen><userinput remap="make">sed -i 's/$(exec_prefix)\/include/$\(includedir\)/' Makefile
|
---|
| 230 | make</userinput></screen>
|
---|
[b3f1ebb3] | 231 |
|
---|
| 232 | <important>
|
---|
| 233 | <para>The test suite for GMP in this section is considered critical.
|
---|
| 234 | Do not skip it under any circumstances.</para>
|
---|
| 235 | </important>
|
---|
| 236 |
|
---|
| 237 | <para>Test the results:</para>
|
---|
| 238 |
|
---|
| 239 | <screen><userinput remap="test">make check 2>&1 | tee gmp-check-log</userinput></screen>
|
---|
| 240 |
|
---|
[6dfcfecc] | 241 | <para>Ensure that all 197 tests in the test suite passed.
|
---|
[b3f1ebb3] | 242 | Check the results by issuing the following command:</para>
|
---|
| 243 |
|
---|
| 244 | <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
|
---|
| 245 |
|
---|
| 246 | <para>Install the package:</para>
|
---|
| 247 |
|
---|
| 248 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
|
---|
[0ebda11] | 249 | cp -Rv DESTDIR/usr/libx32/* /usr/libx32
|
---|
| 250 | cp -Rv DESTDIR/usr/include/mx32/* /usr/include/mx32/
|
---|
[b3f1ebb3] | 251 | rm -rf DESTDIR</userinput></screen>
|
---|
| 252 |
|
---|
[6dfcfecc] | 253 | </sect2><!-- mx32 -->
|
---|
| 254 |
|
---|
[6cc0516] | 255 | <sect2 id="contents-gmp" role="content">
|
---|
| 256 | <title>Contents of GMP</title>
|
---|
| 257 |
|
---|
| 258 | <segmentedlist>
|
---|
| 259 | <segtitle>Installed Libraries</segtitle>
|
---|
[fe05b08] | 260 | <segtitle>Installed directory</segtitle>
|
---|
[6cc0516] | 261 |
|
---|
| 262 | <seglistitem>
|
---|
[040ecb6] | 263 | <seg>libgmp.so and libgmpxx.so</seg>
|
---|
[fe05b08] | 264 | <seg>/usr/share/doc/gmp-&gmp-version;</seg>
|
---|
[6cc0516] | 265 | </seglistitem>
|
---|
| 266 | </segmentedlist>
|
---|
| 267 |
|
---|
| 268 | <variablelist>
|
---|
| 269 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 270 | <?dbfo list-presentation="list"?>
|
---|
| 271 | <?dbhtml list-presentation="table"?>
|
---|
| 272 |
|
---|
[0bb67603] | 273 | <varlistentry id="libgmp">
|
---|
[5f7456b] | 274 | <term><filename class="libraryfile">libgmp</filename></term>
|
---|
[6cc0516] | 275 | <listitem>
|
---|
[afba93b] | 276 | <para>Contains precision math functions</para>
|
---|
[0bb67603] | 277 | <indexterm zone="ch-system-gmp libgmp">
|
---|
| 278 | <primary sortas="c-libgmp">libgmp</primary>
|
---|
| 279 | </indexterm>
|
---|
| 280 | </listitem>
|
---|
| 281 | </varlistentry>
|
---|
| 282 |
|
---|
| 283 | <varlistentry id="libgmpxx">
|
---|
[5f7456b] | 284 | <term><filename class="libraryfile">libgmpxx</filename></term>
|
---|
[0bb67603] | 285 | <listitem>
|
---|
[afba93b] | 286 | <para>Contains C++ precision math functions</para>
|
---|
[0bb67603] | 287 | <indexterm zone="ch-system-gmp libgmpxx">
|
---|
| 288 | <primary sortas="c-libgmpxx">libgmpxx</primary>
|
---|
| 289 | </indexterm>
|
---|
| 290 | </listitem>
|
---|
| 291 | </varlistentry>
|
---|
[6cc0516] | 292 | </variablelist>
|
---|
| 293 |
|
---|
| 294 | </sect2>
|
---|
| 295 |
|
---|
| 296 | </sect1>
|
---|