GMP-4.2.2

Introduction to GMP

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

Package Information

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/gmp

Installation of GMP

Install GMP by running the following commands:

./configure --prefix=/usr --enable-cxx --enable-mpbsd &&
make

If you wish to create alternate formats of the documentation (Postscript, PDF and chunked HTML versions require a teTeX-3.0 installation), issue any or all of the following commands:

make -C doc pdf &&
make -C doc ps &&
make -C doc html &&
texi2html -o doc/gmp_nochunks.html  doc/gmp.texi &&
makeinfo --plaintext -o doc/gmp.txt doc/gmp.texi

To test the results, issue: make check. Due to various reports of mis-compilations, the maintainer strongly recommends running the test suite and reporting any failures. The libraries should not be used in a production environment if there are problems running make check. An easy way to determine if all the tests passed is to redirect the output of the tests to a file (make check >check.log 2>&1) and issue the following command:

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

139 should be returned.

Now, as the root user:

make install &&
install -v -m755 -d /usr/share/doc/gmp-4.2.2 &&
install -v -m644    doc/{isa_abi_headache,configuration} doc/*.html \
                    /usr/share/doc/gmp-4.2.2

If you created any of the alternate formats of the documentation, install it using the following commands as the root user:

install -v -m755 -d /usr/share/doc/gmp-4.2.2/html &&
install -v -m644 doc/gmp.html/* \
                    /usr/share/doc/gmp-4.2.2/html &&
install -v -m644 doc/gmp.{pdf,dvi,ps,html,txt} \
                    /usr/share/doc/gmp-4.2.2

Command Explanations

--enable-cxx: This parameter enables C++ support by building the libgmpxx libraries.

--enable-mpbsd: This parameter enables building the Berkeley MP compatibility (libmp) libraries.

Contents

Installed Programs: None
Installed Libraries: libgmp.{so,a}, libgmpxx.{so,a} and libmp.{so,a}
Installed Directories: None

Short Descriptions

libgmp.{so,a}

contains functions to operate on signed integers, rational numbers, and floating point numbers.

Last updated on 2008-04-08 21:22:47 -0500