gmp.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. <note>
  42. <para>The default settings of GMP produce libraries optimized for
  43. the host processor. If libraries suitable for processors less
  44. capable than the host's CPU are desired, generic libraries can be
  45. created by running the following:
  46. <screen role="nodump"><userinput>cp -v configfsf.guess config.guess
  47. cp -v configfsf.sub config.sub</userinput></screen></para>
  48. </note>
  49. <para>Prepare GMP for compilation:</para>
  50. <screen><userinput remap="configure">./configure --prefix=/usr \
  51. --enable-cxx \
  52. --disable-static \
  53. --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
  54. <variablelist>
  55. <title>The meaning of the new configure options:</title>
  56. <varlistentry>
  57. <term><parameter>--enable-cxx</parameter></term>
  58. <listitem>
  59. <para>This parameter enables C++ support</para>
  60. </listitem>
  61. </varlistentry>
  62. <varlistentry>
  63. <term><parameter>--docdir=/usr/share/doc/gmp-&gmp-version;</parameter></term>
  64. <listitem>
  65. <para>This variable specifies the correct place for the
  66. documentation.</para>
  67. </listitem>
  68. </varlistentry>
  69. </variablelist>
  70. <para>Compile the package and generate the HTML documentation:</para>
  71. <screen><userinput remap="make">make
  72. make html</userinput></screen>
  73. <important>
  74. <para>The test suite for GMP in this section is considered critical.
  75. Do not skip it under any circumstances.</para>
  76. </important>
  77. <para>Test the results:</para>
  78. <screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
  79. <caution><para>The code in gmp is highly optimized for the processor where
  80. it is built. Occasionally, the code that detects the processor misidentifies
  81. the system capabilities and there will be errors in the tests or other
  82. applications using the gmp libraries with the message "Illegal
  83. instruction". In this case, gmp should be reconfigured with the option
  84. --build=x86_64-unknown-linux-gnu and rebuilt.</para></caution>
  85. <para>Ensure that all 197 tests in the test suite passed.
  86. Check the results by issuing the following command:</para>
  87. <screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
  88. <para>Install the package and its documentation:</para>
  89. <screen><userinput remap="install">make install
  90. make install-html</userinput></screen>
  91. </sect2>
  92. <sect2 id="contents-gmp" role="content">
  93. <title>Contents of GMP</title>
  94. <segmentedlist>
  95. <segtitle>Installed Libraries</segtitle>
  96. <segtitle>Installed directory</segtitle>
  97. <seglistitem>
  98. <seg>libgmp.so and libgmpxx.so</seg>
  99. <seg>/usr/share/doc/gmp-&gmp-version;</seg>
  100. </seglistitem>
  101. </segmentedlist>
  102. <variablelist>
  103. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  104. <?dbfo list-presentation="list"?>
  105. <?dbhtml list-presentation="table"?>
  106. <varlistentry id="libgmp">
  107. <term><filename class="libraryfile">libgmp</filename></term>
  108. <listitem>
  109. <para>Contains precision math functions</para>
  110. <indexterm zone="ch-system-gmp libgmp">
  111. <primary sortas="c-libgmp">libgmp</primary>
  112. </indexterm>
  113. </listitem>
  114. </varlistentry>
  115. <varlistentry id="libgmpxx">
  116. <term><filename class="libraryfile">libgmpxx</filename></term>
  117. <listitem>
  118. <para>Contains C++ precision math functions</para>
  119. <indexterm zone="ch-system-gmp libgmpxx">
  120. <primary sortas="c-libgmpxx">libgmpxx</primary>
  121. </indexterm>
  122. </listitem>
  123. </varlistentry>
  124. </variablelist>
  125. </sect2>
  126. </sect1>