make failure trying to build gmp-5.1.0a on Tru64unix v5.1b system
Bill.Glessner at cwu.EDU
Bill.Glessner at cwu.EDU
Fri Feb 15 18:55:21 CET 2013
Hello,
I downloaded the GMP-5.1.1 distribution.
The first attempt for GMP-5.1.1 to build using the same configuration options
./configure "ac_cv_prog_cc_c99=" \
--with-cxx CPPFLAGS=-D__USE_STD_IOSTREAM
as previously reported produced the same results:
# gnumake
./gen-fac 64 0 >fac_table.h || (rm -f fac_table.h; exit 1)
Assertion failed: dp[dn-1] & GMP_LIMB_HIGHBIT, file mini-gmp/mini-gmp.c, line 99
6
/bin/bash: line 1: 403478 IOT/Abort trap ./gen-fac 64 0 > fac_table.h
gnumake: *** [fac_table.h] Error 1
I have found that the Tru64unix 5.1B-6 C compiler,
Compaq C V6.5-011 on HP Tru64 UNIX V5.1B (Rev. 2650)
Compiler Driver V6.5-003 (sys) cc Driver
apparently has issues with a form of 'assert' that is used in the
./mini-gmp/mini-gmp.c component. Specifically it appears that:
an 'assert' containing an array reference such as 'dp[dn-1]' or
a conditional statement that does not contain an explicit relational
operator 'assert (dp[dn-1] & GMP_LIMB_HIGHBIT);' rather than
''assert ((dp[dn-1] & GMP_LIMB_HIGHBIT) != 0);' do not evaluate/compile
correctly.
The following changes in the ./mini-gmp.mini-gmp.c module allowed the
Tru64unix 5.1B-6 C compiler to produce a result that continued the build:
Replace
/* assert ((dp[dn-1] & GMP_LIMB_HIGHBIT) != 0); */
With
mp_limb_t dpVAL;
dpVAL = dp[dn-1];
assert ((dpVAL & GMP_LIMB_HIGHBIT) != 0);
And Replace
assert (dp[dn-1] & GMP_LIMB_HIGHBIT);
With
mp_limb_t dpVAL;
dpVAL = dp[dn-1];
assert ((dpVAL & GMP_LIMB_HIGHBIT) != 0);
Later in the build I encountered the following C++ issues:
libtool: compile: cxx -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMPXX -I.. -D__US
E_STD_IOSTREAM -nocompress -c limits.cc -DPIC -o .libs/limits.o
cxx: Error: ../gmpxx.h, line 1516: no instance of function template
"std::swap" matches the argument list
argument types are: (__mpz_struct, __mpz_struct)
void swap(__gmp_expr& z) __GMPXX_NOEXCEPT { std::swap(*mp, *z.mp); }
----------------------------------------------^
cxx: Error: ../gmpxx.h, line 1710: no instance of function template
"std::swap" matches the argument list
argument types are: (__mpq_struct, __mpq_struct)
void swap(__gmp_expr& q) __GMPXX_NOEXCEPT { std::swap(*mp, *q.mp); }
----------------------------------------------^
cxx: Error: ../gmpxx.h, line 1931: no instance of function template
"std::swap" matches the argument list
argument types are: (__mpf_struct, __mpf_struct)
void swap(__gmp_expr& f) __GMPXX_NOEXCEPT { std::swap(*mp, *f.mp); }
----------------------------------------------^
cxx: Info: 3 errors detected in the compilation of "limits.cc".
I am not that familiar with C++, so that pursuing these will take some
additional time.
By changing the configure options to
./configure "ac_cv_prog_cc_c99=" \
--disable-cxx
The GMP-5.1.1 build completes successfully and the 'make check' passes all
tests with only the additional message
...
PASS: t-fat
Warning, IEEE overflow tests skipped due to SIGFPE (exp=1024)
PASS: t-get_d
...
which has appeared in previous gmp-5.0.x 'make check's and which has not
seemed to indicate any usage problems. There are a number of IEEE
floating-point support switches for the Tru64unix version 5.1B C compiler
which may be relevant to the above warning; however, I haven't had time yet
to experiment with them.
For my work in the Tru64unix version 5.1B environemnt, I can proceed using
the GMP-5.1.1 that has been successfully built so far; but, I will continue
to investigate the remaining issues.
Regards,
Bill
>Return-path: <tg at gmplib.org>
>Date: Tue, 12 Feb 2013 20:04:58 +0100
>From: Torbjorn Granlund <tg at gmplib.org>
>Subject: Re: make failure trying to build gmp-5.1.0a on Tru64unix v5.1b system
>Sender: tg at gmplib.org
>To: Bill.Glessner at cwu.edu
>
>Bill!
>
>Please follow up to the list, so that the community can follow the
>effort.
>--
>Torbjörn
>>
>>Torbjorn,
>>
>>Thank you for your resonse.
>>I understand about OSF1 access/availablilty issues. I would certainly
>>be willing to assist in any way that I am able to figure out the cause
>>of the make problems that I am encountering. We use gmp in a number of
>>mathematics and physics student/faculty research projects that have been
>>developed in the AlphaServer/OSF1 environment so maintaining the availability
>>of gmp is important. As a bit of background, I have been able to build all
>>of the gmp 5.0.x releases in the OSF1 environment using the same configuration
>>options and compilers that were used for gmp 5.1.0 and 5.1.0a.
>>I notice that gmp 5.1.1 has been released. I will download it and have a try
>>at building it so I can focus my efforts on getting that version to build.
>>I will let you know how gmp 5.1.1 build works out.
>>Thanks again for your assistance.
>>
>>Bill
More information about the gmp-bugs
mailing list