GMP 6.1.0 without assembly lacks ‘__gmpn_invert_lib’ on ARM

Torbjörn Granlund tg at
Thu Dec 17 01:07:59 UTC 2015

ludo at (Ludovic Courtès) writes:

  The undefined references come up when linking for instance GCC against
  .../build/./gmp/.libs/libgmp.a(powm_ui.o): In function `__gmpz_powm_ui':
  .../build/gmp/mpz/../../../gcc-4.9.3/gmp/mpz/powm_ui.c:162: undefined reference to `__gmpn_invert_limb'
  > It also puzzles me that you would get link errors given that
  > __gmpn_invert_limb is defined in your libgmp.a.
  Sorry, I pasted the “wrong” one.  Here’s what I have for a no-asm build:
Ok, but these are both __gmpn_invert_limb.

  $ nm /gnu/store/924bg8ws2fkk4z0bifzkqg5d57pgc4w1-gmp-6.1.0/lib/libgmp.a|grep invert_limb
  00000000 R __gmp_binvert_limb_table
           U __gmp_binvert_limb_table
           U __gmp_binvert_limb_table
           U __gmp_binvert_limb_table
           U __gmp_binvert_limb_table
OK, so here we have a different defined and referenced symbol.  In what
way is that relevant for the linker error above?

  I hope this clarifies things.
Unfortunately, no.

This is wasting everyone's time.  Here is how:

Please encrypt, key id 0xC8601622

More information about the gmp-bugs mailing list