diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-12-07 13:59:45 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-12-07 13:59:45 +0000 |
commit | bf5a0c218825eb13287a7c3ed65df5bb47d2abf6 (patch) | |
tree | 352ce780a6aa16b472de3c2a3425a78949454a24 /INSTALL | |
parent | d382d3388964bf323c1102a838ad6477176aa9b6 (diff) | |
download | mpfr-bf5a0c218825eb13287a7c3ed65df5bb47d2abf6.tar.gz |
[INSTALL] Added a section "If 'gmp.h' and 'libgmp' do not match".
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7279 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'INSTALL')
-rw-r--r-- | INSTALL | 101 |
1 files changed, 100 insertions, 1 deletions
@@ -170,7 +170,7 @@ specific architecture. *after* the ones that are currently declared, so that DIR will have a lower precedence. Also, this may not work if DIR is a system directory - (typically /usr or /usr/local). + (typically /usr or /usr/local); see below. --with-gmp-build=DIR assumes that DIR contains the GMP build directory, and enables the use of GMP internals (see above). @@ -206,6 +206,105 @@ CC/CFLAGS as explained below. Run "./configure --help" to see the other options (autoconf default options). +If 'gmp.h' and 'libgmp' do not match +==================================== + +Under some circumstances, the configure script may output a message +saying: + + 'gmp.h' and 'libgmp' seem to have different versions or + we cannot run a program linked with GMP (if you cannot + see the version numbers above). [...] + +Even though the configure script does not fail in such a case, this +message most often indicates a real error, which needs to be avoided. +Possible causes are: + +* The wanted GMP library does not have the same ABI as the one chosen + to build MPFR. The consequences may be: + + - A different GMP library (with the correct ABI) has been found, + but does not have the same version as 'gmp.h'. + + - No other GMP libraries have been found (in this case, no version + numbers should be printed above the warning message). + + This is incorrect and one of the following steps (make, make check) + will probably fail. GMP (actually gmp.h) now provides CC and CFLAGS + information to select the correct ABI, so that this problem should + no longer occur; but if GMP was provided by a binary package, such + information may not be valid. See the + + checking for CC and CFLAGS in gmp.h... + + line in the configure output (about the 11th line) and the following + few ones for more information. You may need to reinstall GMP or to + provide your own CC and/or CFLAGS. See also the remaining of this + INSTALL file. + +* A configure option like --with-gmp or --with-gmp-include was used + with a system include directory, e.g. one of the following: + + --with-gmp=/usr + --with-gmp=/usr/local + --with-gmp-include=/usr/include + --with-gmp-include=/usr/local/include + + GCC (and possibly other compilers) will ignore such a directive for + include directories (but this rule is not applied for the library + itself!). This means that the library search paths will be reordered + as declared, but the specified include directory will still be near + the end of the include search paths (thus with a low precedence). + This is not a problem if only one GMP version is installed, but + otherwise, a wrong gmp.h may be chosen, so that the versions of + gmp.h and libgmp may not match. The suggestions are the following: + + - If you want to use the GMP version under /usr, then you should + uninstall all the other GMP versions (header and library files) + that may be seen in the search paths, in particular those under + /usr/local. + + - If you want to use the GMP version under /usr/local, then you + should uninstall all the other GMP versions (header and library + files) that may be seen in the search paths, but *NOT* the one + under /usr (the version under /usr is provided by the OS vendor, + and changing/removing anything related to it may break your + system, and /usr should have a lower precedence than /usr/local + anyway). + + To find where GMP versions have been installed: + + $ locate libgmp (if you have a locate database) + + and if the compiler is GCC: + + $ gcc -print-file-name=libgmp.so (under most systems) + $ gcc -print-file-name=libgmp.dylib (under Mac OS X) + + and if this does not work, you may try: + + $ gcc -print-search-dirs + +* An official GCC version was used under Debian GNU/Linux. Problems + may come from the fact that Debian chose a different convention + for library search paths concerning 32-bit and 64-bit libraries. + A possible problem can be, for instance: + + [Debian's GCC, correct library path] + $ gcc -print-file-name=libgmp.so + /home/vlefevre/gmp/athlon64/lib/../lib/libgmp.so + + [Official GCC, incorrect library path] + $ gcc-4.3.1 -print-file-name=libgmp.so + /usr/lib/../lib64/libgmp.so + + The solution: use a GCC provided by Debian or add symbolic links + such as lib64 -> lib (on 64-bit machines) for your library paths. + +* The problem may also be temporary and only due to the fact that + libtool could not be used at this time. This is unlikely, though. + + In case of problem ================== |