I'm building gcc against mpfr-2.4.2.tar.bz2, which is the minimum version stated at: https://gcc.gnu.org/install/prerequisites.html which says "MPFR Library version 2.4.2 (or later)". I'm seeing build failures of the form: ../../../src/gcc/go/gofrontend/expressions.cc: In member function ‘unsigned int Numeric_constant::hash(unsigned int) const’: ../../../src/gcc/go/gofrontend/expressions.cc:17290:40: error: ‘MPFR_RNDN’ was not declared in this scope; did you mean ‘GMP_RNDN’? 17290 | mpc_abs(m, this->u_.complex_val, MPFR_RNDN); | ^~~~~~~~~ | GMP_RNDN The usage of MPFR_RNDN was added in r269242 (akak 0ab323427675e178efdefc397fa82f7f8530a182), in Numeric_constant::hash. I note r244966 (aka17a58f8aef6dfbfaf7f360cce0524c7d82307a83) poisoned MPFR_RNDN, in favor of using GMP_RNDN for compat with older MPFRs; presumably that should be done here? (See also this thread: https://gcc.gnu.org/ml/gcc-patches/2019-02/msg01767.html )
Author: ian Date: Tue Mar 5 19:41:42 2019 New Revision: 269399 URL: https://gcc.gnu.org/viewcvs?rev=269399&root=gcc&view=rev Log: PR go/89598 compiler: use GMP_RNDN rather than MPFR_RNDN This fixes the build with mpfr 2.4.2. Fixes https://gcc.gnu.org/PR89598 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/165418 Modified: trunk/gcc/go/gofrontend/MERGE trunk/gcc/go/gofrontend/expressions.cc
Fixed, I hope.
Sadly no, I still get: ../../../src/gcc/go/gofrontend/expressions.cc: In member function ‘unsigned int Numeric_constant::hash(unsigned int) const’: ../../../src/gcc/go/gofrontend/expressions.cc:17295:51: error: ‘MPFR_RNDN’ was not declared in this scope; did you mean ‘GMP_RNDN’? 17295 | f = mpfr_get_d_2exp(&e, this->u_.float_val, MPFR_RNDN) * 4294967295.0; | ^~~~~~~~~ | GMP_RNDN I *think* that's the only remaining one.
Author: ian Date: Wed Mar 6 05:02:16 2019 New Revision: 269411 URL: https://gcc.gnu.org/viewcvs?rev=269411&root=gcc&view=rev Log: PR go/89598 compiler: use GMP_RNDN rather than MPFR_RNDN Missed one last time around. This fixes the build with mpfr 2.4.2. Fixes https://gcc.gnu.org/PR89598 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/165420 Modified: trunk/gcc/go/gofrontend/MERGE trunk/gcc/go/gofrontend/expressions.cc
This time for sure.
(In reply to Ian Lance Taylor from comment #5) > This time for sure. Indeed: r269411 did fix the build against mpfr 2.4.2 for my test config. Thanks.