Florian Pritz bluewind@xinu.at writes:
Here[1] is the output of make, make check along with the PKGBUILD used to build this and a sample of the generated ecc-*.h files.
Not entirely sure what's happening, but I suspect something is wrong with your GMP installation. I take it you configure nettle with CC='gcc -m32'? Nettle's configure detects that you are building for the 32-bit ABI. But then the test
checking for GMP limb size... 64 bits
indicates that you are using a gmp.h for a 64-bit installation. Also the warning
ecc-mod.c:48:3: warning: left shift count >= width of type [enabled by default] if (bp[bn-1] < ((mp_limb_t) 1 << (GMP_NUMB_BITS - 1)))
indicates that the definitions of mp_limb_t and GMP_NUMB_BITS (both in gmp.h) are inconsistent. So you probably have a gmp.h with
typedef unsigned long mp_limb_t; #define GMP_LIMB_BITS 64 #define GMP_NUMB_BITS 64
which is typical for a 64-bit installation of GMP, but is bogus if unsigned long is only 32 bits.
Maybe you can fix it by setting CPPFLAGS (or passing the --with-include-path option to Nettle's configure) to point out a directory with a 32-bit installation of the gmp.h header file.
Regards, /Niels