Just so there is a record of this on sage-devel, Paul now thinks the bug 
is in the compiler, which I have observed with some versions of gcc

gcc-3.4.3 : 0 MPFR failures
gcc-4.1.1 : 0 MPFR failures
gcc-4.2.1 : 0 MPFR failures
gcc-4.2.4 : 0 MPFR failures
gcc-4.3.0 : gcc 4.3.0 builds, but will not install for me.
gcc-4.3.1 : 20 MPFR failures
gcc-4.3.3 : 20 MPFR failures
gcc-4.4.0 : 20 MPFR failures

Paul, the mpfr build instructions say to download the latest mpfr 
patches using:

wget http://www.mpfr.org/mpfr-2.4.1/patches
patch -N -Z -p1 < patches

or

curl http://www.mpfr.org/mpfr-2.4.1/patches | patch -N -Z -p1

Can you apply your fix so doing that will fix the problem? If so, I can 
produce an updated version for Sage which includes all fixes. Last time 
I checked, there were 5 of them. I did apply them to Sage, but it did 
not resolve any issues I was encountering.

PS, you might want to make a note in the README that on Solaris, the GNU 
version of 'patch' at /usr/bin/gpatch must be used, as those 
instructions file if the Sun patch command is used.


Dave

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

--- Begin Message ---
       Hi,

after all, I now believe this is a compiler failure, since the MPN_ZERO
instruction is not passed to GMP, but it is converted into memset by
mpfr-gmp.h. The documentation for memset does not forbid a zero size.
However I was not able to reproduce the problem with the following
simple program:

#include <stdio.h>
#include <string.h>
#include "gmp.h"
#define BYTES_PER_MP_LIMB 4
#define MPN_ZERO(dst, n) memset((dst), 0, (n)*BYTES_PER_MP_LIMB)
main(int argc, char *argv[])
{
  mp_limb_t a[1];
  mp_size_t n = atoi(argv[1]);
  a[0] = (mp_limb_t) 2684354560;
  printf ("a[0]=%lu\n", a[0]);
  MPN_ZERO(a,n-1);
  printf ("a[0]=%lu\n", a[0]);
}

zimme...@t2:~$ ./a.out 1
a[0]=2684354560
a[0]=2684354560

Some more investigation is needed.

Paul


--- End Message ---

Reply via email to