* [PATCH] Indicate minimum in-tree MPFR version handled
@ 2016-08-11 23:21 Maciej W. Rozycki
2016-08-12 5:21 ` Bernd Edlinger
2016-08-16 16:49 ` Jeff Law
0 siblings, 2 replies; 5+ messages in thread
From: Maciej W. Rozycki @ 2016-08-11 23:21 UTC (permalink / raw)
To: gcc-patches; +Cc: Bernd Edlinger
Hi,
Commit 235763 removed support for versions of MPFR below 3.1.0 which have
a flat directory structure, however it did not introduce any safety check
for such an unhandled library version present in the tree. Consequently
the system-installed version is silently chosen, which if too old, causes
a confusing configuration failure in mpc/ stating a misleading version
requirement:
checking for MPFR... yes
checking for recent GMP... yes
checking for recent MPFR... no
configure: error: MPFR version >= 2.4.2 required
make[1]: *** [configure-mpc] Error 1
I propose the check below to make people's life just a little bit easier
and indicate right away that an incorrect version of MPFR has been found
in the source tree. This is especially helpful when you just sync your
build tree from upstream and may easily miss the updated requirement. I
carefully chose to use "handled" rather than "supported" in the message as
the commit referred clearly indicates you are on your own with versions of
the libraries different from those stated in `download_prerequisites'.
2016-08-12 Maciej W. Rozycki <macro@imgtec.com>
* configure.ac: Check for the minimum in-tree MPFR version
handled.
* configure: Regenerate.
OK to apply?
Maciej
gcc-mpfr-version.diff
Index: gcc/configure
===================================================================
--- gcc.orig/configure 2016-08-11 23:23:44.104635061 +0100
+++ gcc/configure 2016-08-11 23:24:02.933019031 +0100
@@ -5566,6 +5566,10 @@ if test "x$with_mpfr_lib" != x; then
gmplibs="-L$with_mpfr_lib $gmplibs"
fi
if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
+ # MPFR v3.1.0 moved the sources into a src sub-directory.
+ if ! test -d ${srcdir}/mpfr/src; then
+ as_fn_error "Building GCC with MPFR in the source tree is only handled for MPFR 3.1.0+." "$LINENO" 5
+ fi
gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
Index: gcc/configure.ac
===================================================================
--- gcc.orig/configure.ac 2016-08-11 23:23:44.117834819 +0100
+++ gcc/configure.ac 2016-08-11 23:24:00.198745307 +0100
@@ -1546,6 +1546,11 @@ if test "x$with_mpfr_lib" != x; then
gmplibs="-L$with_mpfr_lib $gmplibs"
fi
if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
+ # MPFR v3.1.0 moved the sources into a src sub-directory.
+ if ! test -d ${srcdir}/mpfr/src; then
+ AC_MSG_ERROR([dnl
+Building GCC with MPFR in the source tree is only handled for MPFR 3.1.0+.])
+ fi
gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Indicate minimum in-tree MPFR version handled
2016-08-11 23:21 [PATCH] Indicate minimum in-tree MPFR version handled Maciej W. Rozycki
@ 2016-08-12 5:21 ` Bernd Edlinger
2016-09-12 14:37 ` Maciej W. Rozycki
2016-08-16 16:49 ` Jeff Law
1 sibling, 1 reply; 5+ messages in thread
From: Bernd Edlinger @ 2016-08-12 5:21 UTC (permalink / raw)
To: Maciej W. Rozycki, gcc-patches
On 08/12/16, Maciej W. Rozycki wrote:
> Hi,
>
> Commit 235763 removed support for versions of MPFR below 3.1.0 which have
> a flat directory structure, however it did not introduce any safety check
> for such an unhandled library version present in the tree. Consequently
> the system-installed version is silently chosen, which if too old, causes
> a confusing configuration failure in mpc/ stating a misleading version
> requirement:
>
> checking for MPFR... yes
> checking for recent GMP... yes
> checking for recent MPFR... no
> configure: error: MPFR version >= 2.4.2 required
> make[1]: *** [configure-mpc] Error 1
>
> I propose the check below to make people's life just a little bit easier
> and indicate right away that an incorrect version of MPFR has been found
> in the source tree. This is especially helpful when you just sync your
> build tree from upstream and may easily miss the updated requirement. I
> carefully chose to use "handled" rather than "supported" in the message as
> the commit referred clearly indicates you are on your own with versions of
> the libraries different from those stated in `download_prerequisites'.
>
> + # MPFR v3.1.0 moved the sources into a src sub-directory.
> + if ! test -d ${srcdir}/mpfr/src; then
> + as_fn_error "Building GCC with MPFR in the source tree is only handled for MPFR 3.1.0+." "$LINENO" 5
> + fi
I think it is a good idea to detect this situation, but you should advise the user
that he has to use exactly the same version(s) that contrib/download_prerequisites
installs.
Bernd.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Indicate minimum in-tree MPFR version handled
2016-08-12 5:21 ` Bernd Edlinger
@ 2016-09-12 14:37 ` Maciej W. Rozycki
0 siblings, 0 replies; 5+ messages in thread
From: Maciej W. Rozycki @ 2016-09-12 14:37 UTC (permalink / raw)
To: Bernd Edlinger; +Cc: gcc-patches
On Fri, 12 Aug 2016, Bernd Edlinger wrote:
> > + # MPFR v3.1.0 moved the sources into a src sub-directory.
> > + if ! test -d ${srcdir}/mpfr/src; then
> > + as_fn_error "Building GCC with MPFR in the source tree is only handled for MPFR 3.1.0+." "$LINENO" 5
> > + fi
>
> I think it is a good idea to detect this situation, but you should advise the user
> that he has to use exactly the same version(s) that contrib/download_prerequisites
> installs.
We're not doing an exhaustive check for the GMP/MPFR/MPC dependencies
here, so I think it's enough to point out the outright incompatibility.
It might make sense though to have an additional check in the component
requiring these libraries and issue a warning if a mismatch is detected
with in-tree versions.
Maciej
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Indicate minimum in-tree MPFR version handled
2016-08-11 23:21 [PATCH] Indicate minimum in-tree MPFR version handled Maciej W. Rozycki
2016-08-12 5:21 ` Bernd Edlinger
@ 2016-08-16 16:49 ` Jeff Law
2016-09-12 14:10 ` Maciej W. Rozycki
1 sibling, 1 reply; 5+ messages in thread
From: Jeff Law @ 2016-08-16 16:49 UTC (permalink / raw)
To: Maciej W. Rozycki, gcc-patches; +Cc: Bernd Edlinger
On 08/11/2016 05:20 PM, Maciej W. Rozycki wrote:
> Hi,
>
> Commit 235763 removed support for versions of MPFR below 3.1.0 which have
> a flat directory structure, however it did not introduce any safety check
> for such an unhandled library version present in the tree. Consequently
> the system-installed version is silently chosen, which if too old, causes
> a confusing configuration failure in mpc/ stating a misleading version
> requirement:
>
> checking for MPFR... yes
> checking for recent GMP... yes
> checking for recent MPFR... no
> configure: error: MPFR version >= 2.4.2 required
> make[1]: *** [configure-mpc] Error 1
>
> I propose the check below to make people's life just a little bit easier
> and indicate right away that an incorrect version of MPFR has been found
> in the source tree. This is especially helpful when you just sync your
> build tree from upstream and may easily miss the updated requirement. I
> carefully chose to use "handled" rather than "supported" in the message as
> the commit referred clearly indicates you are on your own with versions of
> the libraries different from those stated in `download_prerequisites'.
>
> 2016-08-12 Maciej W. Rozycki <macro@imgtec.com>
>
> * configure.ac: Check for the minimum in-tree MPFR version
> handled.
> * configure: Regenerate.
>
> OK to apply?
OK.
jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Indicate minimum in-tree MPFR version handled
2016-08-16 16:49 ` Jeff Law
@ 2016-09-12 14:10 ` Maciej W. Rozycki
0 siblings, 0 replies; 5+ messages in thread
From: Maciej W. Rozycki @ 2016-09-12 14:10 UTC (permalink / raw)
To: Jeff Law; +Cc: gcc-patches, Bernd Edlinger
On Tue, 16 Aug 2016, Jeff Law wrote:
> > 2016-08-12 Maciej W. Rozycki <macro@imgtec.com>
> >
> > * configure.ac: Check for the minimum in-tree MPFR version
> > handled.
> > * configure: Regenerate.
> >
> > OK to apply?
> OK.
Applied now, thanks for your review and apologies for the delay.
Maciej
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-12 14:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-11 23:21 [PATCH] Indicate minimum in-tree MPFR version handled Maciej W. Rozycki
2016-08-12 5:21 ` Bernd Edlinger
2016-09-12 14:37 ` Maciej W. Rozycki
2016-08-16 16:49 ` Jeff Law
2016-09-12 14:10 ` Maciej W. Rozycki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).