summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2010-12-03 08:55:24 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2010-12-03 08:55:24 +0000
commit2629f8083c7c1fb61d54c9f109950784d0ab7ab9 (patch)
tree33497f0d3d2f1603221ef201dcf6e396f663a5ab
parent487520495ff3e13fffccb32870c17c8f9b80621e (diff)
downloadmpfr-2629f8083c7c1fb61d54c9f109950784d0ab7ab9.tar.gz
[tests/tversion.c] Now fail if the versions of gmp.h and libgmp do not
match (error message improved); previously, the warning could remain unnoticed, in particular with automatic installations. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7275 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--tests/tversion.c38
1 files changed, 25 insertions, 13 deletions
diff --git a/tests/tversion.c b/tests/tversion.c
index 49422ab80..e312552b3 100644
--- a/tests/tversion.c
+++ b/tests/tversion.c
@@ -45,17 +45,29 @@ main (void)
/* In some cases, it may be acceptable to have different versions for
the header and the library, in particular when shared libraries are
- used (e.g., after a bug-fix upgrade of the library). Versioning takes
- care of that, as long as the user has a correct configuration (which
- is not always the case, hence the following warning). Moreover MPFR
- uses GMP internals, which may lead to incompatibilities even though
- GMP's public interface has not changed (the following warning is
- useful in that case too). */
- printf ("WARNING! The versions of gmp.h (%s) and libgmp (%s) do not "
- "match.\nThis may lead to errors, in particular with MPFR. "
- "If some tests fail,\nplease check that first. As we are not "
- "sure, we do not regard this as\nan error.\n",
- buffer, gmp_version);
-
- return 0;
+ used (e.g., after a bug-fix upgrade of the library, and versioning
+ ensures that this can be done only when the binary interface is
+ compatible). However, when recompiling software like here, this
+ should never happen (except if GMP has been upgraded between two
+ "make check" runs, but there's no reason for that). A difference
+ between the versions of gmp.h and libgmp probably indicates either
+ a bad configuration or some other inconsistency in the development
+ environment, and it is better to fail (in particular for automatic
+ installations). */
+ printf ("ERROR! The versions of gmp.h (%s) and libgmp (%s) do not "
+ "match.\nThe possible causes are:\n"
+ " * A bad configuration in your include/library search paths.\n"
+ " * An inconsistency in the include/library search paths of\n"
+ " your development environment; an example:\n"
+ " http://gcc.gnu.org/ml/gcc-help/2010-11/msg00359.html\n"
+ " * GMP has been upgraded after the first \"make check\".\n"
+ " In such a case, try again after a \"make clean\".\n"
+ " * A new or non-standard version naming is used in GMP.\n"
+ " In this case, a patch may already be available on the\n"
+ " MPFR web site. Otherwise please report the problem.\n"
+ "In the first two cases, this may lead to errors, in particular"
+ " with MPFR.\nIf some other tests fail, please solve that"
+ " problem first.\n", buffer, gmp_version);
+
+ return 1;
}