6.14. GMP-5.1.1

The GMP package contains math libraries. These have useful functions for arbitrary precision arithmetic.

Приблизительное время сборки: 1.2 SBU
Требует свободного места на диске: 50 MB

6.14.1. Установка GMP



If you are building for 32-bit x86, but you have a CPU which is capable of running 64-bit code and you have specified CFLAGS in the environment, the configure script will attempt to configure for 64-bits and fail. Avoid this by invoking the configure command below with

ABI=32 ./configure ...

Подготовим GMP к компиляции:

./configure --prefix=/usr --enable-cxx

The meaning of the new configure options:


This parameter enables C++ support

Cкомпилируем пакет:



The test suite for GMP in this section is considered critical. Do not skip it under any circumstances.

Test the results:

make check 2>&1 | tee gmp-check-log

Ensure that all 184 tests in the test suite passed. Check the results by issuing the following command:

awk '/tests passed/{total+=$2} ; END{print total}' gmp-check-log

Установим пакет:

make install

If desired, install the documentation:

mkdir -v /usr/share/doc/gmp-5.1.1
cp    -v doc/{isa_abi_headache,configuration} doc/*.html \

6.14.2. Содержимое GMP

Installed Libraries: libgmp.{a,so}, libgmpxx.{a,so}, and libmp.{a,so}
Установленный каталог: /usr/share/doc/gmp-5.1.1

Краткое описание


Contains precision math functions.


Contains C++ precision math functions.


Contains the Berkeley MP math functions.