gmp.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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. <sect1 id="ch-system-gmp" role="wrap">
  8. <?dbhtml filename="gmp.html"?>
  9. <sect1info condition="script">
  10. <productname>gmp</productname>
  11. <productnumber>&gmp-version;</productnumber>
  12. <address>&gmp-url;</address>
  13. </sect1info>
  14. <title>GMP-&gmp-version;</title>
  15. <indexterm zone="ch-system-gmp">
  16. <primary sortas="a-GMP">GMP</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The GMP package contains math libraries. These have useful functions
  21. for arbitrary precision arithmetic.</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&gmp-ch6-sbu;</seg>
  27. <seg>&gmp-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of GMP</title>
  33. <note>
  34. <para>If you are building for 32-bit x86, but you have a CPU which is
  35. capable of running 64-bit code <emphasis>and</emphasis> you have specified
  36. <envar>CFLAGS</envar> in the environment, the configure script will
  37. attempt to configure for 64-bits and fail.
  38. Avoid this by invoking the configure command below with
  39. <screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para>
  40. </note>
  41. <para>Prepare GMP for compilation:</para>
  42. <screen><userinput remap="configure">./configure --prefix=/usr \
  43. --enable-cxx \
  44. --disable-static \
  45. --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
  46. <variablelist>
  47. <title>The meaning of the new configure options:</title>
  48. <varlistentry>
  49. <term><parameter>--enable-cxx</parameter></term>
  50. <listitem>
  51. <para>This parameter enables C++ support</para>
  52. </listitem>
  53. </varlistentry>
  54. <varlistentry>
  55. <term><parameter>--docdir=/usr/share/doc/gmp-&gmp-version;</parameter></term>
  56. <listitem>
  57. <para>This variable specifies the correct place for the
  58. documentation.</para>
  59. </listitem>
  60. </varlistentry>
  61. </variablelist>
  62. <para>Compile the package and generate the HTML documentation:</para>
  63. <screen><userinput remap="make">make
  64. make html</userinput></screen>
  65. <important>
  66. <para>The test suite for GMP in this section is considered critical.
  67. Do not skip it under any circumstances.</para>
  68. </important>
  69. <para>Test the results:</para>
  70. <screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
  71. <caution><para>The code in gmp is highly optimized for the processor where
  72. it is built. Occasionally, the code that detects the processor
  73. misidentifies the system capabilities and there will be errors in the
  74. tests or other applications using the gmp libraries with the message
  75. "Illegal instruction". In this case, gmp should be reconfigured with the
  76. option --build=x86_64-unknown-linux-gnu and rebuilt.</para></caution>
  77. <para>Ensure that all 190 tests in the test suite passed.
  78. Check the results by issuing the following command:</para>
  79. <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
  80. <para>Install the package and its documentation:</para>
  81. <screen><userinput remap="install">make install
  82. make install-html</userinput></screen>
  83. </sect2>
  84. <sect2 id="contents-gmp" role="content">
  85. <title>Contents of GMP</title>
  86. <segmentedlist>
  87. <segtitle>Installed Libraries</segtitle>
  88. <segtitle>Installed directory</segtitle>
  89. <seglistitem>
  90. <seg>libgmp.so and libgmpxx.so</seg>
  91. <seg>/usr/share/doc/gmp-&gmp-version;</seg>
  92. </seglistitem>
  93. </segmentedlist>
  94. <variablelist>
  95. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  96. <?dbfo list-presentation="list"?>
  97. <?dbhtml list-presentation="table"?>
  98. <varlistentry id="libgmp">
  99. <term><filename class="libraryfile">libgmp</filename></term>
  100. <listitem>
  101. <para>Contains precision math functions</para>
  102. <indexterm zone="ch-system-gmp libgmp">
  103. <primary sortas="c-libgmp">libgmp</primary>
  104. </indexterm>
  105. </listitem>
  106. </varlistentry>
  107. <varlistentry id="libgmpxx">
  108. <term><filename class="libraryfile">libgmpxx</filename></term>
  109. <listitem>
  110. <para>Contains C++ precision math functions</para>
  111. <indexterm zone="ch-system-gmp libgmpxx">
  112. <primary sortas="c-libgmpxx">libgmpxx</primary>
  113. </indexterm>
  114. </listitem>
  115. </varlistentry>
  116. </variablelist>
  117. </sect2>
  118. </sect1>