[configure PATCH] [PR32258] configure != prerequisites + no check install errors
Rob1weld@aol.com
Rob1weld@aol.com
Sat Jun 23 09:59:00 GMT 2007
Page http://gcc.gnu.org/install/prerequisites.html requires MPFR 2.2.1 (or
later) but GCC 4.3.0 's main configure script will allow one to build gcc using
mpfr-2.2.0 - this is less than allowed on the prerequisites page. Patch
level 5 should be used it is the most current. Using level 1 - 3 generates too
many errors in the testsuite.
More than one person has ran into installation difficulties where the
library and the header files do not match. The mpfr.info has macros to test for
this along with suggested code, lets use it.
Bug report: _http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32258Index_
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32258Index) :
Complete patch ( cd gcc-4_3-trunk & patch < configure_mpfr.patch ) :
configure
===================================================================
--- configure (revision 125970)
+++ configure (working copy)
@@ -4474,7 +4474,7 @@
main ()
{
- #if MPFR_VERSION < MPFR_VERSION_NUM(2,2,0)
+ #if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1)
choke me
#endif
mpfr_t n;
@@ -4524,7 +4524,7 @@
main ()
{
- #if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1)
+ #if MPFR_VERSION < MPFR_VERSION_NUM(2,2,5)
choke me
#endif
mpfr_t n; mpfr_init(n);
@@ -4600,6 +4600,51 @@
fi
fi
+
+
+# Rob - June 15 2007 - Confirm that MPFR Library and mpfr.h versions match
exactly
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* #include <gmp.h> */
+#include <mpfr.h>
+int
+main ()
+{
+ if (strcmp (mpfr_get_version (), MPFR_VERSION_STRING)) {
+ return 1;
+ }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+echo $ECHO_N "mpfr library version and header version mismatch - re-install
!!!" >&6
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+( exit $ac_status )
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext
conftest.$ac_ext
+
+
# Flags needed for both GMP and/or MPFR
More information about the Gcc-patches
mailing list