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

Upgrade: cypari2 2.1.2 #31029

Closed
videlec opened this issue Dec 8, 2020 · 21 comments
Closed

Upgrade: cypari2 2.1.2 #31029

videlec opened this issue Dec 8, 2020 · 21 comments

Comments

@videlec
Copy link
Contributor

videlec commented Dec 8, 2020

This is to upgrade cypari to 2.1.2 (which is compatible with pari 2.13 that is about to be upgraded too, see #30801)

CC: @dimpase @orlitzky @mkoeppe @slel @antonio-rojas @kiwifb @videlec @tobihan @seblabbe @fchapoton @jhpalmieri

Component: packages: standard

Keywords: sd111

Author: Vincent Delecroix

Branch/Commit: b9aadfd

Reviewer: Matthias Koeppe, John Palmieri

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

@videlec videlec added this to the sage-9.3 milestone Dec 8, 2020
@videlec
Copy link
Contributor Author

videlec commented Dec 8, 2020

New commits:

0b18fd031029: upgrade cypari2 to 2.1.2
b9aadfd31029: adapt sage library code to cypari2 version 2.1.2

@videlec
Copy link
Contributor Author

videlec commented Dec 8, 2020

Commit: b9aadfd

@videlec
Copy link
Contributor Author

videlec commented Dec 8, 2020

Branch: u/vdelecroix/31029

@slel
Copy link
Member

slel commented Dec 8, 2020

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 11, 2020

Reviewer: Matthias Koeppe, ...

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 11, 2020

comment:4

The builds on GH Actions look fine.

Someone else should look at the changes in the ticket -- I don't know anything about PARI.

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 11, 2020

Changed keywords from none to sd111

@jhpalmieri
Copy link
Member

comment:9

Unfortunately this does not fix my problem with OS X 10.15.7 and Python 3 installed via Homebrew:

  cypari2/gen.c:25980:70: error: too many arguments to function call, expected 3, have 4
    __pyx_v__ret = asympnum0(__pyx_v__expr, __pyx_v_k, __pyx_v__alpha, __pyx_v_precision);
                   ~~~~~~~~~                                           ^~~~~~~~~~~~~~~~~
  /usr/local/include/pari/paripriv.h:101:1: note: 'asympnum0' declared here
  GEN  asympnum0(GEN u, GEN alpha, long prec);
  ^
  cypari2/gen.c:30261:18: error: implicit declaration of function 'bnfcompress' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    __pyx_v__ret = bnfcompress(__pyx_v__bnf);
                   ^
  cypari2/gen.c:30261:16: warning: incompatible integer to pointer conversion assigning to 'GEN' (aka 'long *') from 'int' [-Wint-conversion]
    __pyx_v__ret = bnfcompress(__pyx_v__bnf);
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
  cypari2/gen.c:84064:52: error: too few arguments to function call, expected 3, have 2
    __pyx_v__ret = lfuntwist(__pyx_v__L, __pyx_v__chi);
                   ~~~~~~~~~                         ^
  /usr/local/include/pari/paridecl.h:4164:1: note: 'lfuntwist' declared here
  GEN     lfuntwist(GEN ldata1, GEN ldata2, long bitprec);
  ^
  cypari2/gen.c:85034:70: error: too many arguments to function call, expected 3, have 4
    __pyx_v__ret = limitnum0(__pyx_v__expr, __pyx_v_k, __pyx_v__alpha, __pyx_v_precision);
                   ~~~~~~~~~                                           ^~~~~~~~~~~~~~~~~
  /usr/local/include/pari/paripriv.h:125:1: note: 'limitnum0' declared here
  GEN  limitnum0(GEN u, GEN alpha, long prec);
  ^
  cypari2/gen.c:108195:18: error: implicit declaration of function 'nfbasis_gp' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    __pyx_v__ret = nfbasis_gp(__pyx_v__T);
                   ^
  cypari2/gen.c:108195:18: note: did you mean 'nfbasis'?
  /usr/local/include/pari/paridecl.h:2231:9: note: 'nfbasis' declared here
  GEN     nfbasis(GEN x, GEN *y);
          ^
  cypari2/gen.c:108195:16: warning: incompatible integer to pointer conversion assigning to 'GEN' (aka 'long *') from 'int' [-Wint-conversion]
    __pyx_v__ret = nfbasis_gp(__pyx_v__T);
                 ^ ~~~~~~~~~~~~~~~~~~~~~~
  cypari2/gen.c:119493:16: warning: incompatible pointer to integer conversion assigning to 'long' from 'GEN' (aka 'long *'); dereference with * [-Wint-conversion]
    __pyx_v__ret = permorder(__pyx_v__x);
                 ^ ~~~~~~~~~~~~~~~~~~~~~
                   *
  cypari2/gen.c:123101:18: error: implicit declaration of function 'isirreducible' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    __pyx_v__ret = isirreducible(__pyx_v__pol);
                   ^
  cypari2/gen.c:123101:18: note: did you mean 'polisirreducible'?
  /usr/local/include/pari/paridecl.h:4812:9: note: 'polisirreducible' declared here
  long    polisirreducible(GEN x);
          ^
  cypari2/gen.c:131353:49: error: too few arguments to function call, expected 3, have 2
    __pyx_v__ret = qfbsolve(__pyx_v__Q, __pyx_v__p);
                   ~~~~~~~~                       ^
  /usr/local/include/pari/paridecl.h:1880:1: note: 'qfbsolve' declared here
  GEN     qfbsolve(GEN Q, GEN n, long flag);
  ^
  cypari2/gen.c:141271:69: error: too many arguments to function call, expected 3, have 4
    __pyx_v__ret = rnfkummer(__pyx_v__bnr, __pyx_v__subgp, __pyx_v_d, __pyx_v_precision);
                   ~~~~~~~~~                                          ^~~~~~~~~~~~~~~~~
  /usr/local/include/pari/paridecl.h:4110:1: note: 'rnfkummer' declared here
  GEN     rnfkummer(GEN bnr, GEN subgroup, long prec);
  ^
  cypari2/gen.c:153671:18: error: implicit declaration of function 'zetamult0' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    __pyx_v__ret = zetamult0(__pyx_v__s, __pyx_v__T, __pyx_v_precision);
                   ^
  cypari2/gen.c:153671:18: note: did you mean 'zetamult'?
  /usr/local/include/pari/paridecl.h:5345:9: note: 'zetamult' declared here
  GEN     zetamult(GEN avec, long prec);
          ^
  cypari2/gen.c:153671:16: warning: incompatible integer to pointer conversion assigning to 'GEN' (aka 'long *') from 'int' [-Wint-conversion]
    __pyx_v__ret = zetamult0(__pyx_v__s, __pyx_v__T, __pyx_v_precision);
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4 warnings and 9 errors generated.

@jhpalmieri
Copy link
Member

comment:10

Just for fun I removed all of my homebrew installations and reinstalled a subset of them (brew install aspell autoconf automake boost ecm freetype gcc gd ghostscript glpk gmp gpatch gsl jpeg libmpc libpng libtiff libtool mpfi mpfr nauty openblas pari perl pkg-config ppl r suite-sparse yasm zeromq). Same error.

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 29, 2020

comment:11

And without pari from homebrew?

@jhpalmieri
Copy link
Member

comment:12

With or without pari from homebrew, Sage builds its own pari, but if I do brew uninstall pari, then cypari builds successfully. Thank you, that's helpful. Can we prevent the build process from picking up the wrong pari somehow?

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 29, 2020

comment:13

Replying to @jhpalmieri:

With or without pari from homebrew, Sage builds its own pari, but if I do brew uninstall pari, then cypari builds successfully. Thank you, that's helpful. Can we prevent the build process from picking up the wrong pari somehow?

This is now #31132.

@dimpase
Copy link
Member

dimpase commented Dec 30, 2020

comment:14

How about biting the bullet and adding the missing Pari parts (i.e. Pari packages) to Homebrew?

@jhpalmieri
Copy link
Member

comment:15

Unless I'm misunderstanding, that might fix the symptom but not the actual problem. If we go that direction and we don't address the problem of /usr/local leaking into the build, then we have to detect whether all of the relevant pieces of pari are installed in homebrew or none of them are, and refuse to continue if the system is some intermediate state (like mine with pari installed but none of the as yet non-existent packages).

@dimpase
Copy link
Member

dimpase commented Dec 31, 2020

comment:16

Replying to @jhpalmieri:

Unless I'm misunderstanding, that might fix the symptom but not the actual problem. If we go that direction and we don't address the problem of /usr/local leaking into the build, then we have to detect whether all of the relevant pieces of pari are installed in homebrew or none of them are, and refuse to continue if the system is some intermediate state (like mine with pari installed but none of the as yet non-existent packages).

you're right, that's what can be done. (Realistically though, once it's in place, people would just install the whole bunch - one can also have a Sage-components formula to install as many deps as there are)

@mkoeppe
Copy link
Contributor

mkoeppe commented Jan 6, 2021

comment:17

Contributing to homebrew packaging is beyond the scope of this ticket.

Still needs review

@jhpalmieri
Copy link
Member

comment:18

Why remove the doctest

sage: b[0][0].precision()    # in words

?

@videlec
Copy link
Contributor Author

videlec commented Jan 8, 2021

comment:19

Replying to @jhpalmieri:

Why remove the doctest

sage: b[0][0].precision()    # in words

?

sagemath/cypari2@8bd7ca3

@jhpalmieri
Copy link
Member

comment:20

Great. Let's merge this.

@jhpalmieri
Copy link
Member

Changed reviewer from Matthias Koeppe, ... to Matthias Koeppe, John Palmieri

@vbraun
Copy link
Member

vbraun commented Jan 17, 2021

Changed branch from u/vdelecroix/31029 to b9aadfd

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

No branches or pull requests

6 participants