Help with some mpn function to package flint using gmp instead of mpir

Fredrik Johansson fredrik.johansson at gmail.com
Wed Jul 31 19:20:29 CEST 2013


Hi Paulo,

The next release of flint (2.4) will support gmp out of the box. The
git version of flint already does this.

Best regards,
Fredrik


On Wed, Jul 31, 2013 at 4:35 PM, Paulo César Pereira de Andrade
<paulo.cesar.pereira.de.andrade at gmail.com> wrote:
>   Hi,
>
>   I have been packaging sagemath since early sagemath 3.x in Mandriva,
> and recently have been packaging in Fedora also. Only yesterday I had
> time to start working on packaging sagemath 5.10, but learned that now
> it requires flint 2.3, and that (flint 2.3) uses several mpir internals not
> available in gmp.
>
>   I cannot easily build flint using mpir if willing to use system packages,
> because everything else uses gmp, and system wide, mpir is not an
> alternative to gmp, that is, it is not the owner of gmp headers, so, there
> are conflicts starting there...
>
>   So, my initial patch looks like this:
>
> -            mpn_com_n(arr, ptr->_mp_d, size);
> +            mpn_copyi(arr, ptr->_mp_d, size);
> +            mpn_com(arr, ptr->_mp_d, size);
>
> -            mpn_com_n(p, p, l);
> +            mpn_com(p, p, l);
>
> -         mpn_neg_n(coeffs_f[i], coeff, size_j);
> +         mpn_neg(coeffs_f[i], coeff, size_j);
>
> but I am unsure how to patch the next ones:
>
> /home/pcpa/rpmbuild/BUILD/flint-2.3/libflint.a(fft_mulmod_2expp1.o):
> In function `_fft_mulmod_2expp1':
> /home/pcpa/rpmbuild/BUILD/flint-2.3/fft/mulmod_2expp1.c:124: undefined
> reference to `mpn_mulmod_2expp1'
>
> maybe I can just cut&paste these?
> http://gmplib.org/list-archives/gmp-devel/2010-January/001446.html
>
> the next one I am not sure, but could just cut&paste mpir implementation
> in flint source as a patch, as the implementation appears to be small/simple
> enough:
>
> /home/pcpa/rpmbuild/BUILD/flint-2.3/libflint.a(fft_butterfly_lshB.o):
> In function `butterfly_lshB':
> /home/pcpa/rpmbuild/BUILD/flint-2.3/fft/butterfly_lshB.c:59: undefined
> reference to `__gmpn_sumdiff_n'
>
> Probably there will be more, but so far I got make check to pass
> a lot of tests up to the above link failures:
>
> $ grep PASS log.txt | wc -l
> 222
>
>   This is still very early work in progress to package flint 2.3, but
> if you have some experience with rpm, here is the "prototype" srpm
> at the time of writing this email:
> http://pcpa.fedorapeople.org/flint-2.3-1.fc20.src.rpm
>
> Thanks,
> Paulo
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss


More information about the gmp-discuss mailing list