MPFR 2.3.1 requires GMP 4.1.0 or higher.
The MPFR 2.3.1 source can be downloaded in the following archive formats:
Important note: If the MPFR build fails, please read the section In case of problem of the INSTALL file. In particular, GMP is known for using a different ABI from the default one on some 64-bit platforms, and in such a case, if you do not provide the same compiler flags as those automatically selected by GMP, things will probably go wrong, e.g. libgmp not found error message at configure time (this error message will be improved in future MPFR versions).
MPFR is also available via third-party packages and ports.
The bugs listed below have been fixed (latest update: 2008-05-11). The following instructions are for Linux and may be similar for other operating systems. You can apply the patches in several ways:
patch -N -Z -p1 < path_to_patches_filefrom the source directory. The -N option allows the patch command to ignore patches already applied. The -Z option sets the modification time of the patched files from time stamps given in the patch file, thus avoiding the need of some development utilities (such as autoconf); this may generate a
Not setting timewarning for the PATCHES file, but you can safely ignore it. Under Microsoft Windows, in addition to the above options, you may need the --binary option (this depends whether the end-of-lines have been converted when you downloaded the patch file). Also note that the --dry-run option does not work with this cumulative patch.
svn co svn://scm.gforge.inria.fr/svn/mpfr/branches/2.3 mpfr-2.3In this case, as said on the Gforge page, you should read the README.dev file for details on how to build MPFR. Also note that the branch may contain additional minor fixes.
With the first two ways, the PATCHES file is modified,
so that one can know what patches have been applied, using the new
mpfr_get_patches function. Moreover a suffix is added to
the version string, but note that for practical reasons, not all the
files where the version appears are patched; thus one can also track
applied patches with the MPFR_VERSION_STRING macro (header)
and the mpfr_get_version function (library). However, if
some patches are not applied or if patches are applied in a different
order, then the patch command will fail to update some chunks, so that
the suffix is not always reliable for patches.
Note: These patches are in unified diff format and some vendors' patch commands cannot deal with them; in this case, please use GNU patch (it may already be installed on your system, e.g. as /usr/local/bin/patch or gpatch).
Fixed bugs:
The thread-safe configure test (enabled when the --enable-thread-safe option is given) always fails when the build directory is different from the source directory. This is fixed by the thread-safe configure patch.
Note that two files are patched: acinclude.m4 and configure, but the timestamp of acinclude.m4 is not updated (if the -Z patch option is given as recommended above) to avoid the unnecessary rebuild of some files by additional development tools (not always available).
Other bugs: please see the BUGS file.
mpfr_strtofr and in
its documentation concerning particular cases where the code and
the documentation did not match.MPFR 2.3.1 has been successfully compiled and checked on the following platforms: