GMP on IA64-HPUX

FX Coudert fxcoudert at gmail.com
Sat Dec 3 19:07:45 CET 2005


Hi,

I'm trying to build and debug gfortran (part of gcc-4) on IA64-HPUX, 
which requires building GMP and MPFR. The first bug is with the 
configury, which doesn't detect the value for gmp_cv_asm_label_suffix 
(see http://gmplib.org/list-archives/gmp-bugs/2004-August/000157.html for 
details and possible workaround).

With that workaround, I can get the library to build, but tests fail 
(with three different compilers: gcc-3.4.4, gcc-4.0.2 and HP compiler):

--------------------------------------
gmake[3]: Entering directory `/house/coudert/gmp-4.1.4/tests'
/bin/sh: 20851 Memory fault(coredump)
FAIL: t-bswap
BYTES_PER_MP_LIMB == 8, but sizeof(mp_limb_t) == 4
BITS_PER_MP_LIMB == 64, but calculated 32
BITS_PER_ULONG == 64, but calculated 32
PP_INVERTED == c938b36b, but pp_inverted_calc == 0

After gmp.h,
   ULONG_MAX  not defined
   LONG_MAX   not defined
   UINT_MAX   not defined
   INT_MAX    not defined
   USHRT_MAX  not defined
   SHRT_MAX   not defined

ULONG_MAX      FFFFFFFF
ULONG_HIGHBIT  80000000
LONG_MAX       7FFFFFFF
LONG_MIN       80000000
UINT_MAX       FFFFFFFF
UINT_HIGHBIT   80000000
INT_MAX        7FFFFFFF
INT_MIN        80000000
USHRT_MAX      FFFF
USHRT_HIGHBIT  8000
SHRT_MAX       7FFF
SHRT_MIN       8000

Bits
   long           32
   int            32
   short          16
   unsigned long  32
   unsigned int   32
   unsigned short 16
   mp_size_t      32
/bin/sh: 20869 Abort(coredump)
FAIL: t-constants
tests_reallocate(): bad old size 4, should be 8
/bin/sh: 20887 Abort(coredump)
FAIL: t-count_zeros
PASS: t-gmpmax
tests_reallocate(): bad old size 4, should be 8
/bin/sh: 20922 Abort(coredump)
FAIL: t-modlinv
===================
4 of 5 tests failed
===================


I don't know where this comes from, perhaps the warnings on mp_bases.c 
and hamdist.c (and many others indeed) are right:

/opt/hp-gcc/4.0.2/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. 
-D__GMP_WITHIN_GMP -I.. -DOPERATION_mp_bases -g -O2 -c mp_bases.c  -DPIC 
-o .libs/mp_bases.o
mp_bases.c:2145: warning: integer constant is too large for 'long' type
[...]

or

/opt/hp-gcc/4.0.2/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. 
-D__GMP_WITHIN_GMP -I.. -g -O2 -c hamdist.c  -DPIC -o .libs/hamdist.o
hamdist.c: In function '__gmpz_hamdist':
hamdist.c:100: warning: integer constant is too large for 'long' type
hamdist.c:100: warning: integer constant is too large for 'long' type
hamdist.c:100: warning: integer constant is too large for 'long' type
hamdist.c:100: warning: integer constant is too large for 'long' type
hamdist.c:100: warning: right shift count >= width of type


So, in short, my questions are: is gmp-4.1.4 supposed to work on 
ia64-hpux? will it be working in the next version (and when?)? if it 
already works in the devel sources (not generally available), would it 
be possible to have a snapshot of these devel sources?

Thanks,
François-Xavier


More information about the gmp-bugs mailing list