bug in configure

Peter Farkas Peter.Farkas at Sun.COM
Sat Dec 9 02:05:12 CET 2006


This is a bug report in the configure scripts in GMP 4.2.1 (2006-05-04).

SYNOPSIS:

--build ABI=longlong causes inconsistent .h files on UltraSPARC based
systems running Solaris

ENVIRONMENT:

- UltraSPARC based systems, I tried SunBlade with UltraSPARC-II,
UltraSPARC-III+ and Sun-Fire with UltraSPARC-T1
- Solaris, I tried Solaris 2.9, Solaris 2.10
- I tried three compilers: SunStudio 11 from Sun, GCC for SPARC
Systems from Sun (see
http://www.sun.com/download/products.xml?id=44e24b9d ) and gcc
version 3.4.5

DESCRIPTION:

Do

./configure --prefix=<your_install_path> --build=none ABI=longlong \
CC=<your_cc_path>

Then do

make

The build will fail with something like

. . . . . . . . .
In file included from ../gmp-impl.h:104,
                  from fib_table.c:4:
../fib_table.h:4: error: syntax error before "data"
fib_table.c:7: error: syntax error before "data"
. . . . . . . . .

or

. . . . . . . . .
"../fib_table.h", line 4: syntax error before or at: data
. . . . . . . . .
cc: acomp failed for fib_table.c
. . . . . . . . .

The culprit seems to be that in fib_table.h we have

#if GMP_NUMB_BITS != 32
Error, error, this data is for 32 bits
#endif

and in gmp.h we have

#define GMP_LIMB_BITS                      64
#define GMP_NAIL_BITS                      0

#define GMP_NUMB_BITS     (GMP_LIMB_BITS - GMP_NAIL_BITS)

COMMENT:

I don't need a fix for this bug, so I am not going to investigate
it any further.  I report it so that it be documented, and if
anyone is interested, [s]he can implement a fix.

I am not attaching the content of config.log, since the description
provides enough data for reproducing the bug, so there is no point
in making the email bigger.

SUBMITTER:

Peter Farkas
Staff Engineer
Sun Microsystems, Inc.

12/08/2006


More information about the gmp-bugs mailing list