‘mpq_cmp_z’ was not declared in this scope

Rafael Guglielmetti rafael at rgug.ch
Tue Aug 16 10:28:44 UTC 2016


Hello GMP devs,
I downloaded GMP 6.1.1 from the website, and configured and built it via:
./configure --prefix=/usr -enable-cxx
make
sudo make install

When trying to #include <gmpxx.h>, I get the following errors:
/usr/include/gmpxx.h: In static member function ‘static int 
__gmp_cmp_function::eval(mpq_srcptr, mpz_srcptr)’:
/usr/include/gmpxx.h:893:26: error: ‘mpq_cmp_z’ was not declared in this 
scope
    { return mpq_cmp_z(q, z); }
                           ^
/usr/include/gmpxx.h: In static member function ‘static int 
__gmp_cmp_function::eval(mpz_srcptr, mpq_srcptr)’:
/usr/include/gmpxx.h:895:27: error: ‘mpq_cmp_z’ was not declared in this 
scope
    { return -mpq_cmp_z(q, z); }
                            ^
/usr/include/gmpxx.h: In static member function ‘static int 
__gmp_cmp_function::eval(mpf_srcptr, mpz_srcptr)’:
/usr/include/gmpxx.h:912:26: error: ‘mpf_cmp_z’ was not declared in this 
scope
    { return mpf_cmp_z(f, z); }
                           ^
/usr/include/gmpxx.h: In static member function ‘static int 
__gmp_cmp_function::eval(mpz_srcptr, mpf_srcptr)’:
/usr/include/gmpxx.h:914:27: error: ‘mpf_cmp_z’ was not declared in this 
scope
    { return -mpf_cmp_z(f, z); }
                            ^
/usr/include/gmpxx.h: In static member function ‘static bool 
__gmp_binary_equal::eval(mpq_srcptr, mpz_srcptr)’:
/usr/include/gmpxx.h:961:26: error: ‘mpq_cmp_z’ was not declared in this 
scope
    { return mpq_cmp_z(q, z) == 0; }
                           ^
/usr/include/gmpxx.h: In static member function ‘static bool 
__gmp_binary_equal::eval(mpf_srcptr, mpz_srcptr)’:
/usr/include/gmpxx.h:980:26: error: ‘mpf_cmp_z’ was not declared in this 
scope
    { return mpf_cmp_z(f, z) == 0; }
                           ^
/usr/include/gmpxx.h: In static member function ‘static bool 
__gmp_binary_less::eval(mpq_srcptr, mpz_srcptr)’:
/usr/include/gmpxx.h:1021:26: error: ‘mpq_cmp_z’ was not declared in 
this scope
    { return mpq_cmp_z(q, z) < 0; }
                           ^
/usr/include/gmpxx.h: In static member function ‘static bool 
__gmp_binary_less::eval(mpz_srcptr, mpq_srcptr)’:
/usr/include/gmpxx.h:1023:26: error: ‘mpq_cmp_z’ was not declared in 
this scope
    { return mpq_cmp_z(q, z) > 0; }
                           ^
/usr/include/gmpxx.h: In static member function ‘static bool 
__gmp_binary_less::eval(mpf_srcptr, mpz_srcptr)’:
/usr/include/gmpxx.h:1040:26: error: ‘mpf_cmp_z’ was not declared in 
this scope
    { return mpf_cmp_z(f, z) < 0; }
                           ^
/usr/include/gmpxx.h: In static member function ‘static bool 
__gmp_binary_less::eval(mpz_srcptr, mpf_srcptr)’:
/usr/include/gmpxx.h:1042:26: error: ‘mpf_cmp_z’ was not declared in 
this scope
    { return mpf_cmp_z(f, z) > 0; }


About my machine:
Linux Mint 18
Linux rafael-desktop 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 
UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

The problem does not exist when I do the same steps with GMP 6.0.0

Best,

Rafael


More information about the gmp-bugs mailing list