Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration: fplll: 4 to 5 #13

Conversation

jgmbenoit
Copy link
Contributor

Attempt to migrate from fplll 4 to fplll 5. Hacked on Debian Sid/experimental box.
Note that the APPLE part was commented out.
Otherwise, some hacks can certainly be improved, in particular the one in
void SET_INTOBJ(Z_NR &v, Obj z)

@laurentbartholdi
Copy link
Collaborator

Hi!
I rewrote it (merging your changes), because your PR is not compatible with fplll version 4.

Hopefully the new branch below works for both. Can you check it?

https://github.com/gap-packages/float/tree/jgmbenoit-debian/0.7.4+ds-2/migration/fplll/4to5

@jgmbenoit
Copy link
Contributor Author

Hello, my PR was purposely oriented towards version fplll 5.
I have just try the rewritten material on a Sid box (fplll 4) and on a Sid/experimental box (fplll 5).
Without surprises, the autogen.sh works well, and the following configure works as well:
$ ./configure --with-gaproot=/usr/lib/gap --with-mpfr=yes --with-mpc=yes --with-mpfi=yes --with-fplll=yes --with-cxsc=no

The build (make) with fplll 4 works, but not the one with fplll 5: I get the error I got yesterday:
fplll.C: In function 'void SET_INTOBJ(fplll::Z_NR&, Bag) [with Z = __mpz_struct [1]; Bag = long unsigned int*_; UInt = long unsigned int]':
fplll.C:49:16: error: invalid conversion from 'mpz_ptr {aka _mpz_struct}' to 'long int' [-fpermissive]
v = mpz_MPZ(MPZ_LONGINT(z));
~~~~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/fplll/nr/nr.h:15:0,
from /usr/include/fplll/nr/numvect.h:19,
from /usr/include/fplll/nr/matrix.h:21,
from /usr/include/fplll/util.h:23,
from /usr/include/fplll/fplll.h:25,
from /usr/include/fplll.h:1,
from fplll.C:29:
/usr/include/fplll/nr/nr_Z_mpz.inl:89:13: note: initializing argument 1 of 'void fplll::Z_NR::operator=(long int) [with Z = __mpz_struct [1]]'
inline void Z_NR<mpz_t>::operator=(long a) {

Hence my tricky code. I think it is a fplll issue in the sense that it cannot play with some tricky gmp code, but I am not familiar with C++ to be 100% certain.

@jgmbenoit
Copy link
Contributor Author

Please let me know whether or not you can reproduce the issue ?
Personally, I think it is rather a fplll API issue, that is, a bug report might be emitted. What do you think ?

@laurentbartholdi
Copy link
Collaborator

Yes, I can see the same problem. I didn't try different compilers, though.
In all cases, the current float master uses your workaround.

On Wed, 19 Oct 2016 at 03:08 Jérôme Benoit notifications@github.com wrote:

Please let me know whether or not you can reproduce the issue ?
Personally, I think it is rather a fplll API issue, that is, a bug report
might be emitted. What do you think ?


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACIIUF0IA3RsCpDXM1ptE_nyPAfP0hCqks5q1W13gaJpZM4KXmpy
.

Laurent Bartholdi
DMA, École Normale Supérieure, 45 rue d'Ulm, 75005 Paris. +33 14432 2060
Mathematisches Institut, Universität Göttingen, Bunsenstrasse 3-5, D-37073
Göttingen. +49 551 39 7826

@jgmbenoit
Copy link
Contributor Author

Ok. So, I emitted an issue to fplll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants