Help with some mpn function to package flint using gmp instead of mpir
Paulo César Pereira de Andrade
paulo.cesar.pereira.de.andrade at gmail.com
Wed Jul 31 16:35:33 CEST 2013
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:
In function `_fft_mulmod_2expp1':
reference to `mpn_mulmod_2expp1'
maybe I can just cut&paste these?
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
In function `butterfly_lshB':
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
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:
More information about the gmp-discuss