[1fa2099] | 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>
|
---|
[37e35d2] | 34 | <seg>&gmp-fin-sbu;</seg>
|
---|
| 35 | <seg>&gmp-fin-du;</seg>
|
---|
[1fa2099] | 36 | </seglistitem>
|
---|
| 37 | </segmentedlist>
|
---|
| 38 |
|
---|
| 39 | </sect2>
|
---|
| 40 |
|
---|
| 41 | <sect2 role="installation">
|
---|
| 42 | <title>Installation of GMP</title>
|
---|
| 43 |
|
---|
| 44 | <note>
|
---|
| 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>
|
---|
| 51 | </note>
|
---|
| 52 |
|
---|
| 53 | <note>
|
---|
| 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:
|
---|
| 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 |
|
---|
| 63 | <para>Prepare GMP for compilation:</para>
|
---|
| 64 |
|
---|
| 65 | <screen><userinput remap="configure">./configure --prefix=/usr \
|
---|
| 66 | --enable-cxx \
|
---|
| 67 | --disable-static \
|
---|
| 68 | --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
|
---|
| 69 |
|
---|
| 70 | <variablelist>
|
---|
| 71 | <title>The meaning of the new configure options:</title>
|
---|
| 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 |
|
---|
| 80 | <varlistentry>
|
---|
| 81 | <term><parameter>--docdir=/usr/share/doc/gmp-&gmp-version;</parameter></term>
|
---|
| 82 | <listitem>
|
---|
| 83 | <para>This variable specifies the correct place for the
|
---|
| 84 | documentation.</para>
|
---|
| 85 | </listitem>
|
---|
| 86 | </varlistentry>
|
---|
| 87 |
|
---|
| 88 | </variablelist>
|
---|
| 89 |
|
---|
| 90 | <para>Compile the package and generate the HTML documentation:</para>
|
---|
| 91 |
|
---|
| 92 | <screen><userinput remap="make">make
|
---|
| 93 | make html</userinput></screen>
|
---|
| 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 |
|
---|
| 102 | <screen><userinput remap="test">make check 2>&1 | tee gmp-check-log</userinput></screen>
|
---|
| 103 |
|
---|
| 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-unknown-linux-gnu and rebuilt.</para></caution>
|
---|
| 110 |
|
---|
[0efb8e1] | 111 | <para>Ensure that all 197 tests in the test suite passed.
|
---|
[1fa2099] | 112 | Check the results by issuing the following command:</para>
|
---|
| 113 |
|
---|
| 114 | <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
|
---|
| 115 |
|
---|
| 116 | <para>Install the package and its documentation:</para>
|
---|
| 117 |
|
---|
| 118 | <screen><userinput remap="install">make install
|
---|
| 119 | make install-html</userinput></screen>
|
---|
| 120 |
|
---|
| 121 | </sect2>
|
---|
| 122 |
|
---|
[37e35d2] | 123 | <!-- - - - - - - - - - -->
|
---|
| 124 | <!-- Multilib - 32bit -->
|
---|
| 125 | <!-- - - - - - - - - - -->
|
---|
| 126 |
|
---|
[ee1a413] | 127 | <sect2 arch="ml_32,ml_all" role="installation">
|
---|
[37e35d2] | 128 | <title>Installation of GMP - 32bit</title>
|
---|
[8eb3fe4] | 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 |
|
---|
[c69f870] | 137 | <screen role="nodump"><userinput remap="pre">cp -v configfsf.guess config.guess
|
---|
[8eb3fe4] | 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" \
|
---|
[37e35d2] | 143 | CFLAGS="-m32 -O2 -pedantic -fomit-frame-pointer -mtune=generic -march=i686" \
|
---|
| 144 | CXXFLAGS="$CFLAGS" \
|
---|
| 145 | PKG_CONFIG_PATH="&usr-lib-m32;/pkgconfig" \
|
---|
[8eb3fe4] | 146 | ./configure \
|
---|
| 147 | --prefix=/usr \
|
---|
| 148 | --disable-static \
|
---|
| 149 | --enable-cxx \
|
---|
[37e35d2] | 150 | --libdir=&usr-lib-m32; \
|
---|
| 151 | --includedir=&usr-inc-m32;/gmp</userinput></screen>
|
---|
| 152 |
|
---|
| 153 | <variablelist>
|
---|
| 154 | <title>The meaning of the new configure options:</title>
|
---|
| 155 |
|
---|
| 156 | <varlistentry>
|
---|
| 157 | <term><parameter>--includedir=&usr-inc-m32;/gmp</parameter></term>
|
---|
| 158 | <listitem>
|
---|
| 159 | <para>Some definitions in gmp.h differs for each arch but
|
---|
| 160 | has same name. Therefore, the headers must be separated from
|
---|
| 161 | each other.</para>
|
---|
| 162 | </listitem>
|
---|
| 163 | </varlistentry>
|
---|
| 164 |
|
---|
| 165 | </variablelist>
|
---|
[8eb3fe4] | 166 |
|
---|
| 167 | <para>Compile the package:</para>
|
---|
| 168 |
|
---|
[37e35d2] | 169 | <screen><userinput remap="make">sed -i 's/$(exec_prefix)\/include/$\(includedir\)/' Makefile
|
---|
| 170 | make</userinput></screen>
|
---|
[8eb3fe4] | 171 |
|
---|
| 172 | <important>
|
---|
| 173 | <para>The test suite for GMP in this section is considered critical.
|
---|
| 174 | Do not skip it under any circumstances.</para>
|
---|
| 175 | </important>
|
---|
| 176 |
|
---|
| 177 | <para>Test the results:</para>
|
---|
| 178 |
|
---|
| 179 | <screen><userinput remap="test">make check 2>&1 | tee gmp-check-log</userinput></screen>
|
---|
| 180 |
|
---|
[37e35d2] | 181 | <para>Ensure that all 197 tests in the test suite passed.
|
---|
[8eb3fe4] | 182 | Check the results by issuing the following command:</para>
|
---|
| 183 |
|
---|
| 184 | <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
|
---|
| 185 |
|
---|
| 186 | <para>Install the package:</para>
|
---|
| 187 |
|
---|
| 188 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
|
---|
[37e35d2] | 189 | cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32;
|
---|
| 190 | cp -Rv DESTDIR&usr-inc-m32;/* &usr-inc-m32;/
|
---|
[8eb3fe4] | 191 | rm -rf DESTDIR</userinput></screen>
|
---|
| 192 |
|
---|
[37e35d2] | 193 | </sect2><!-- m32 -->
|
---|
| 194 |
|
---|
| 195 | <!-- - - - - - - - - - -->
|
---|
| 196 | <!-- Multilib - x32bit -->
|
---|
| 197 | <!-- - - - - - - - - - -->
|
---|
| 198 |
|
---|
[ee1a413] | 199 | <sect2 arch="ml_x32,ml_all" role="installation">
|
---|
[8eb3fe4] | 200 | <title>Installation of GMP - x32-bit</title>
|
---|
| 201 |
|
---|
| 202 | <para>Clean previous build:</para>
|
---|
| 203 |
|
---|
| 204 | <screen><userinput remap="pre">make distclean</userinput></screen>
|
---|
| 205 |
|
---|
| 206 | <para>Generic libraries can be created by running
|
---|
| 207 | the following:</para>
|
---|
| 208 |
|
---|
[c69f870] | 209 | <screen role="nodump"><userinput remap="pre">cp -v configfsf.guess config.guess
|
---|
[8eb3fe4] | 210 | cp -v configfsf.sub config.sub</userinput></screen>
|
---|
| 211 |
|
---|
| 212 | <para>Prepare GMP for compilation:</para>
|
---|
| 213 |
|
---|
| 214 | <screen><userinput remap="configure">ABI="x32" \
|
---|
[37e35d2] | 215 | CFLAGS="-mx32 -O2 -pedantic -fomit-frame-pointer -mtune=generic -march=x86-64" \
|
---|
| 216 | CXXFLAGS="$CFLAGS" \
|
---|
| 217 | PKG_CONFIG_PATH="&usr-lib-mx32;/pkgconfig" \
|
---|
[8eb3fe4] | 218 | ./configure \
|
---|
| 219 | --prefix=/usr \
|
---|
| 220 | --disable-static \
|
---|
| 221 | --enable-cxx \
|
---|
[37e35d2] | 222 | --libdir=&usr-lib-mx32; \
|
---|
| 223 | --includedir=&usr-inc-mx32;/gmp</userinput></screen>
|
---|
[8eb3fe4] | 224 |
|
---|
| 225 | <para>Compile the package:</para>
|
---|
| 226 |
|
---|
[37e35d2] | 227 | <screen><userinput remap="make">sed -i 's/$(exec_prefix)\/include/$\(includedir\)/' Makefile
|
---|
| 228 | make</userinput></screen>
|
---|
[8eb3fe4] | 229 |
|
---|
| 230 | <important>
|
---|
| 231 | <para>The test suite for GMP in this section is considered critical.
|
---|
| 232 | Do not skip it under any circumstances.</para>
|
---|
| 233 | </important>
|
---|
| 234 |
|
---|
| 235 | <para>Test the results:</para>
|
---|
| 236 |
|
---|
| 237 | <screen><userinput remap="test">make check 2>&1 | tee gmp-check-log</userinput></screen>
|
---|
| 238 |
|
---|
[37e35d2] | 239 | <para>Ensure that all 197 tests in the test suite passed.
|
---|
[8eb3fe4] | 240 | Check the results by issuing the following command:</para>
|
---|
| 241 |
|
---|
| 242 | <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
|
---|
| 243 |
|
---|
| 244 | <para>Install the package:</para>
|
---|
| 245 |
|
---|
| 246 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
|
---|
[37e35d2] | 247 | cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32;
|
---|
| 248 | cp -Rv DESTDIR&usr-inc-mx32;/* &usr-inc-mx32;/
|
---|
[8eb3fe4] | 249 | rm -rf DESTDIR</userinput></screen>
|
---|
| 250 |
|
---|
[37e35d2] | 251 | </sect2><!-- mx32 -->
|
---|
| 252 |
|
---|
[1fa2099] | 253 | <sect2 id="contents-gmp" role="content">
|
---|
| 254 | <title>Contents of GMP</title>
|
---|
| 255 |
|
---|
| 256 | <segmentedlist>
|
---|
| 257 | <segtitle>Installed Libraries</segtitle>
|
---|
| 258 | <segtitle>Installed directory</segtitle>
|
---|
| 259 |
|
---|
| 260 | <seglistitem>
|
---|
| 261 | <seg>libgmp.so and libgmpxx.so</seg>
|
---|
| 262 | <seg>/usr/share/doc/gmp-&gmp-version;</seg>
|
---|
| 263 | </seglistitem>
|
---|
| 264 | </segmentedlist>
|
---|
| 265 |
|
---|
| 266 | <variablelist>
|
---|
| 267 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 268 | <?dbfo list-presentation="list"?>
|
---|
| 269 | <?dbhtml list-presentation="table"?>
|
---|
| 270 |
|
---|
| 271 | <varlistentry id="libgmp">
|
---|
| 272 | <term><filename class="libraryfile">libgmp</filename></term>
|
---|
| 273 | <listitem>
|
---|
| 274 | <para>Contains precision math functions</para>
|
---|
| 275 | <indexterm zone="ch-system-gmp libgmp">
|
---|
| 276 | <primary sortas="c-libgmp">libgmp</primary>
|
---|
| 277 | </indexterm>
|
---|
| 278 | </listitem>
|
---|
| 279 | </varlistentry>
|
---|
| 280 |
|
---|
| 281 | <varlistentry id="libgmpxx">
|
---|
| 282 | <term><filename class="libraryfile">libgmpxx</filename></term>
|
---|
| 283 | <listitem>
|
---|
| 284 | <para>Contains C++ precision math functions</para>
|
---|
| 285 | <indexterm zone="ch-system-gmp libgmpxx">
|
---|
| 286 | <primary sortas="c-libgmpxx">libgmpxx</primary>
|
---|
| 287 | </indexterm>
|
---|
| 288 | </listitem>
|
---|
| 289 | </varlistentry>
|
---|
| 290 | </variablelist>
|
---|
| 291 |
|
---|
| 292 | </sect2>
|
---|
| 293 |
|
---|
| 294 | </sect1>
|
---|