sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.44k stars 480 forks source link

Bug with PARI interface gen.eval on Cygwin #21637

Closed embray closed 8 years ago

embray commented 8 years ago

With certain operating systems, certain compilers and certain compiler flags (in particular Cygwin with SAGE_DEBUG=yes), the PARI function is_universal_constant() can be broken. This leads to a 0 return value for closures returning gnil:

sage: pari("x -> print(x);")("hello")
hello
0

Upstream report: http://pari.math.u-bordeaux.fr/archives/pari-dev-1610/msg00006.html

This branch simply adds a patch from upstream.

Depends on #21582

Upstream: Fixed upstream, but not in a stable release.

Component: packages: standard

Keywords: pari windows cygwin

Author: Jeroen Demeyer

Branch: 0e7d231

Reviewer: Erik Bray

Issue created by migration from https://trac.sagemath.org/ticket/21637

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 8 years ago
comment:40

Attachment: pari-2.8-2771-gb70b447.p0.log

I have trouble compiling 7.5beta0 with #20523 (R 3.1.1, a priori unrelated), and this patch is the prime suspect.

I'll annotate #20523 (reminder...).

jdemeyer commented 8 years ago
comment:41

pari-2.8-2771-gb70b447 is an old version. Please delete that log file such that you are no longer confused by it.

pari-2.8.0.alpha.p2 is the current version which built correctly. So I see no problem here.

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 8 years ago
comment:42

Replying to @jdemeyer:

pari-2.8-2771-gb70b447 is an old version. Please delete that log file such that you are no longer confused by it.

I have already tried that : The damn thing sprouts back (and the error is the same...).

pari-2.8.0.alpha.p2 is the current version which built correctly. So I see no problem here.

I see it : I've spent a large part of Sunday trying to get 7.5beta0+#20523 to compile, to no avail... the problem comes back even after a make distclean.

Currently I'm compiling 7.4+#20523+#a preliminary version of 21744 (not yet pushed), which seems to have passed the critical point. However, each passage from 7.4 to 7.5.beta0 needs >1h to compile (something seems to have radically changed, and I don't see what...).

I'll keep you posted after a ptestlong of this 7.4 patched version.

[EDIT] According to Volker's announcement, the present patch (#21637) has been added between 7.4 and 7.5beta0... To me, it's newer than 2.8.0.alpha.p2 (which I seem to remember to have seen late 7.4 betas...). Hasn't it been merged in error ? On my workin sage installation(7.4) :

{{{charpent@asus16-ec:/usr/local/sage-7$ sage -standard [package]...............................[latest version] ([version]) .... pari....................................2.8.0.alpha.p1 (2.8.0.alpha.p1) ...}}}

jdemeyer commented 8 years ago
comment:43

Replying to @EmmanuelCharpentier:

Replying to @jdemeyer:

pari-2.8-2771-gb70b447 is an old version. Please delete that log file such that you are no longer confused by it.

I have already tried that : The damn thing sprouts back (and the error is the same...).

In that case, you are either using an old version of Sage (if so: merge current develop) or there is something wrong with your branch (which git branch is that?).

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 8 years ago
comment:44

Replying to @jdemeyer:

Replying to @EmmanuelCharpentier:

Replying to @jdemeyer:

pari-2.8-2771-gb70b447 is an old version. Please delete that log file such that you are no longer confused by it.

I have already tried that : The damn thing sprouts back (and the error is the same...).

In that case, you are either using an old version of Sage (if so: merge current develop) or there is something wrong with your branch (which git branch is that?).

develop##20523+#21744 (and, yes, I did git fetch and git pull before that.

Maybe I should try a fresh tree ?

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 8 years ago
comment:45

Replying to @EmmanuelCharpentier, because my edit didn't went through the mail...

[EDIT] According to ​Volker's announcement, the present patch (#21637) has been added between 7.4 and 7.5beta0... To me, it's newer than 2.8.0.alpha.p2 (which I seem to remember to have seen late 7.4 betas...). Hasn't it been merged in error ? On my workin sage installation(7.4) :

charpent@asus16-ec:/usr/local/sage-7$ sage -standard [package]...............................[latest version] ([version]) .... pari....................................2.8.0.alpha.p1 (2.8.0.alpha.p1) ...

jdemeyer commented 8 years ago
comment:46

Replying to @EmmanuelCharpentier:

develop##20523+#21744

Double-check that your develop branch is really what you think it is (should be 7.5.beta0). If it is, you somehow messed up the merging of develop with those 2 branches.

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 8 years ago
comment:47

Starting from a fresh tree, I managed to build and ptestlong successfully (modulo the usual transient error on simplicial_complex.py) #20523+#21744 over both 7.4 and 7.5beta0.

I still do not understand how I managed to mess up my previous attempts.