`checking size of mp_limb_t... 0` and `configure: error: Oops, mp_limb_t doesn't seem to work` when compiling the Microchip XC32 compiler from source

Marc Glisse marc.glisse at inria.fr
Tue Nov 7 10:17:00 CET 2023

On Tue, 7 Nov 2023, Niels Möller wrote:

> (2) It makes no sense for any C code, in conftest.c or otherwise, to
>    ever attempt to include gmp-h.in. That's not a valid C header file,
>    since it lacks the substitutions that turns it into a valid gmp.h
>    header file.

>From acinclude.m4:

dnl  -----------------
dnl  Expand to the right way to #include gmp-h.in.  This must be used
dnl  instead of gmp.h, since that file isn't generated until the end of 
dnl  configure.
dnl  Dummy value for GMP_LIMB_BITS is enough
dnl  for all current configure-time uses of gmp.h.

[[#define __GMP_WITHIN_CONFIGURE 1   /* ignore template stuff */
#define GMP_LIMB_BITS 123
#include "$srcdir/gmp-h.in"]

Marc Glisse

More information about the gmp-bugs mailing list