Yes, this is definitely a deprecation issue and definitely fixed in
MPFR's svn (they have been excellent at updating to support MPIR).

The correct procedure here is not to use MPFR-svn however.

I think one will need the following define:

#define gmp_randinit(xxx, yyy, zzz) gmp_randinit_default(xxx)

Not technically the same thing, but should be good enough for MPFR I think.

While you are at it, you should probably add:

#ifndef mpz_div_2exp
#define mpz_div_2exp mpz_tdiv_q_2exp
#endif

#ifndef mpz_div_ui
#define mpz_div_ui mpz_tdiv_q_ui
#endif

Some idiot who wrote a quadratic sieve some years ago used these
deprecated functions. He's about to issue a new release of his package
to fix this in about 5 minutes.

Bill.

On 8 April 2010 21:31, William Stein <wst...@gmail.com> wrote:
> Hi,
>
> Next problem:  MPFR-2.4.2 doesn't build with MPIR-2.0.0.   Is this
> another deprecation issue?
>
> mv -f .deps/mpf_compat.Tpo .deps/mpf_compat.Po
> /bin/bash ../libtool --tag=CC   --mode=link gcc  -O2
> -L/home/wstein/build/mpir2/sage-4.3.5/local/lib -o mpf_compat
> mpf_compat.o libfrtests.la -lm ../libmpfr.la -lgmp
> libtool: link: gcc -O2 -o .libs/mpf_compat mpf_compat.o
> -L/home/wstein/build/mpir2/sage-4.3.5/local/lib ./.libs/libfrtests.a
> -lm ../.libs/libmpfr.so
> /home/wstein/build/mpir2/sage-4.3.5/local/lib/libgmp.so -Wl,-rpath
> -Wl,/home/wstein/build/mpir2/sage-4.3.5/local/lib
> mpf_compat.o: In function `main':
> mpf_compat.c:(.text+0x3bc): undefined reference to `gmp_randinit'
> collect2: ld returned 1 exit status
> make[4]: *** [mpf_compat] Error 1
> make[4]: Leaving directory
> `/mnt/usb1/scratch/wstein/build/mpir2/sage-4.3.5/spkg/build/mpfr-2.4.2/src/tests'
> make[3]: *** [check-am] Error 2
> make[3]: Leaving directory
> `/mnt/usb1/scratch/wstein/build/mpir2/sage-4.3.5/spkg/build/mpfr-2.4.2/src/tests'
> make[2]: *** [check-recursive] Error 1
> make[2]: Leaving directory
> `/mnt/usb1/scratch/wstein/build/mpir2/sage-4.3.5/spkg/build/mpfr-2.4.2/src'
> There was a problem during the mpfr tests.
>
> real    0m51.807s
> user    1m4.630s
> sys     0m30.060s
> sage: An error occurred while installing mpfr-2.4.2
>
> --
> You received this message because you are subscribed to the Google Groups 
> "mpir-devel" group.
> To post to this group, send email to mpir-de...@googlegroups.com.
> To unsubscribe from this group, send email to 
> mpir-devel+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/mpir-devel?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-de...@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to