6.17. GMP-6.0.0a

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

Approximate build time: 1.3 SBU
Required disk space: 65 MB

6.17.1. Installation of GMP

[Note]

Note

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 ...

Prepare GMP for compilation:

./configure --prefix=/usr    \
            --enable-cxx     \
            --disable-static \
            --docdir=/usr/share/doc/gmp-6.0.0a

The meaning of the new configure options:

--enable-cxx

This parameter enables C++ support

--docdir=/usr/share/doc/gmp-6.0.0a

This variable specifies the correct place for the documentation.

Compile the package and generate the HTML documentation:

make
make html
[Important]

Important

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 188 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

Install the package and its documentation into a temporary directory:

make install DESTDIR=$(pwd)/debian/tmp
make install-html DESTDIR=$(pwd)/debian/tmp

Create the package archive:

buildpkg --version=6.0.0a

Install the package:

dpkg -i ../gmp_6.0.0a_*.deb

6.17.2. Contents of GMP

Installed Libraries: libgmp.{a,so} and libgmpxx.{a,so}
Installed directory: /usr/share/doc/gmp-6.0.0a

Short Descriptions

libgmp

Contains precision math functions

libgmpxx

Contains C++ precision math functions