#31563 closed enhancement (fixed)
Upgrade giac to 1.9.015
Reported by:  Matthias Köppe  Owned by:  

Priority:  critical  Milestone:  sage9.7 
Component:  packages: standard  Keywords:  
Cc:  Michael Orlitzky, François Bissey, Antonio Rojas, Han Frederic, Bernard Parisse, Thierry Monteil, Dima Pasechnik  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  François Bissey 
Report Upstream:  N/A  Work issues:  
Branch:  b4e5c6e (Commits, GitHub, GitLab)  Commit:  
Dependencies:  #33226, #34037, #31403, #34088  Stopgaps: 
Description
Attachments (4)
Change History (115)
comment:1 Changed 20 months ago by
comment:2 Changed 20 months ago by
Cc:  Michael Orlitzky added 

comment:3 Changed 20 months ago by
Cc:  François Bissey added 

comment:4 Changed 20 months ago by
I've updated the system version check in #31594 because it should be a trivial review.
comment:5 Changed 17 months ago by
Milestone:  sage9.4 → sage9.5 

comment:6 Changed 15 months ago by
Dependencies:  #31562 → #32449 

comment:7 Changed 15 months ago by
Branch:  → u/mkoeppe/upgrade_giac_to_1_7_0 

Changed 15 months ago by
Attachment:  giac1.7.0.25p0.tar.bz2 added 

comment:8 Changed 15 months ago by
Cc:  Antonio Rojas added 

Commit:  → 4df014a66c7c6c0dea73a10fbb2ac18369e1ada3 
I have made a new tarball using spkgsrc
. Patches in build/pkgs/giac/patches/
still need updating/review, help welcome
New commits:
7d6a7b8  Make test pass with giac 1.7

ffa2679  Merge #32449

1127597  build/pkgs/giac/patches/autotools/0001configure.acDonotlinktolibintlifUSE_NLSisno.patch: Remove, not needed for giac 1.7

35111c9  build/pkgs/giac: Update to 1.7.0.25

4df014a  build/pkgs/giac/checksums.ini: Update upstream_url

comment:9 Changed 15 months ago by
Cc:  Han Frederic Bernard Parisse added 

These are the current patches:
https://github.com/sagemath/sage/tree/develop/build/pkgs/giac/patches
(I have already taken care of the ones in autotools/
)
comment:10 followup: 16 Changed 14 months ago by
I just tested the latest giac (1.7.0.33) against sage 9.5.beta2. The only doctests failing are
sage t long randomseed=0 /usr/lib/python3.9/sitepackages/sage/functions/min_max.py too many failed tests, not using stored timings Running doctests with ID 20210927122106b85d81e2. Using optional=dochtml,pip,sage Doctesting 1 file. sage t long randomseed=0 /usr/lib/python3.9/sitepackages/sage/functions/min_max.py ********************************************************************** File "/usr/lib/python3.9/sitepackages/sage/functions/min_max.py", line 236, in sage.functions.min_max.MaxSymbolic._evalf_ Failed example: r Expected: sqrt(2)  cos(1) Got: 0.873911256505000 ********************************************************************** File "/usr/lib/python3.9/sitepackages/sage/functions/min_max.py", line 238, in sage.functions.min_max.MaxSymbolic._evalf_ Failed example: r.n() Expected: 0.873911256504955 Got: 0.873911256505000 ********************************************************************** 1 item had failures: 2 of 11 in sage.functions.min_max.MaxSymbolic._evalf_ [69 tests, 2 failures, 0.53 s]
I'll note that recent giac unconditionally look for usb connecting libraries. It seems to be related to giac being able to go in embedded devices as far as I can tell. No real impact on the maths but the functionality is not clearly or cleanly separated.
comment:11 Changed 14 months ago by
Cc:  Thierry Monteil added 

comment:12 Changed 13 months ago by
1.7.0.39 out. Did anyone notice that it was looking for curl
before or is it recent?
dnl AC_CHECK_LIB(curl, main) CONFIG_CURL="yes" AC_ARG_ENABLE([curl], [AS_HELP_STRING([enablecurl], [Use CURL [[default=yes]]])], [if test "$enableval" = "no"; then CONFIG_CURL="no"; fi], []) if test "$CONFIG_CURL" = "yes"; then AC_CHECK_HEADER(curl/curl.h, [], [CONFIG_CURL="no"]) fi if test "$CONFIG_CURL" = "yes"; then AC_CHECK_LIB(curl, main, [], [CONFIG_CURL="no"]) fi AC_SUBST(CONFIG_CURL) AC_SUBST(CURL_LIBS) AM_CONDITIONAL(CONFIG_CURL, [test "$CONFIG_CURL" = "yes"])
It may have been there some time because it is an alternative to a code branch that can never be reached (pragma constant EMCC
and EMCC2
are never defined anywhere).
comment:13 Changed 13 months ago by
curl
is in my dependency list in Gentoo, so I just didn't look properly the first _couple_ of times.
comment:14 followup: 15 Changed 13 months ago by
curl is used for the read command, if the argument is a string beginning with http. For example read("https://wwwfourier.univgrenoblealpes.fr/~parisse/numworks/py.py")
comment:15 followup: 17 Changed 13 months ago by
Replying to parisse:
curl is used for the read command, if the argument is a string beginning with http. For example read("https://wwwfourier.univgrenoblealpes.fr/~parisse/numworks/py.py")
That's certainly an interesting option. What about all that EMCC(2) code for emscript all around it that has no way of being enabled. Is it dead code or something in gestation?
comment:16 Changed 13 months ago by
Replying to fbissey:
I just tested the latest giac (1.7.0.33) against sage 9.5.beta2. The only doctests failing are
sage t long randomseed=0 /usr/lib/python3.9/sitepackages/sage/functions/min_max.py too many failed tests, not using stored timings Running doctests with ID 20210927122106b85d81e2. Using optional=dochtml,pip,sage Doctesting 1 file. sage t long randomseed=0 /usr/lib/python3.9/sitepackages/sage/functions/min_max.py ********************************************************************** File "/usr/lib/python3.9/sitepackages/sage/functions/min_max.py", line 236, in sage.functions.min_max.MaxSymbolic._evalf_ Failed example: r Expected: sqrt(2)  cos(1) Got: 0.873911256505000 ********************************************************************** File "/usr/lib/python3.9/sitepackages/sage/functions/min_max.py", line 238, in sage.functions.min_max.MaxSymbolic._evalf_ Failed example: r.n() Expected: 0.873911256504955 Got: 0.873911256505000 ********************************************************************** 1 item had failures: 2 of 11 in sage.functions.min_max.MaxSymbolic._evalf_ [69 tests, 2 failures, 0.53 s]
This is really bizarre. min_max
uses sympy not giac  at least directly. The only thing I can think of, is that giac is used to perform the integral and the result is numerical instead of symbolic. See the context of the failing tests
sage: f = max_symbolic(sin(x), cos(x)) sage: r = integral(f, x, 0, 1) ... sage: r sqrt(2)  cos(1) sage: r.n() 0.873911256504955
comment:17 Changed 13 months ago by
Replying to fbissey:
Replying to parisse:
curl is used for the read command, if the argument is a string beginning with http. For example read("https://wwwfourier.univgrenoblealpes.fr/~parisse/numworks/py.py")
That's certainly an interesting option. What about all that EMCC(2) code for emscript all around it that has no way of being enabled. Is it dead code or something in gestation?
It's not dead, it is enabled by commandline D options, or by the compiler itself (emcc). Try this [url=https://wwwfourier.univgrenoblealpes.fr/%7eparisse/xcasen.html#exec&filename=%40session&python=1&radian=1&cas=0,0,read(%22https%3A%2F%2Fwwwfourier.univgrenoblealpes.fr%2F~parisse%2Fnumworks%2Fpy.py%22)&cas=0,200,go(f1)&cas=0,400,%3B&]session Xcasurl
comment:18 followup: 19 Changed 12 months ago by
The test failure above seems to be a regression in giac 1.7.0:
 giac 1.6.0 (as compiled by sage)
0>> int(max(sin(x),cos(x)), x, 0, 1) Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real): Check [abs(sin(x)cos(x))] Discontinuities at zeroes of sin(x)cos(x) were not checked sqrt(2)cos(1) // Time 0.11
 giac 1.7.0 (void linux)
0>> int(max(sin(x),cos(x)), x, 0, 1) Piecewise definite integration: can only handle linear < or > condition 0.873911256505 // Time 0.01
Note that sympy_integrator is able to correctly evaluate this integral, but the order is maxima, then giac, then sympy.
sage: f = max_symbolic(sin(x), cos(x)) sage: sage.symbolic.integration.external.sympy_integrator(f, x, 0, 1) sqrt(2)  cos(1)
comment:19 Changed 12 months ago by
Replying to tornaria:
The test failure above seems to be a regression in giac 1.7.0:
Yes, more precisely it's a regression in 1.7.029. Since their forum is a gated community, it would be nice if someone with an account could report it.
comment:20 Changed 12 months ago by
This is a consequence of the fact that certified definite integration is hard. For this example Xcas session there is only one point of discontinuity and it can easily be found by solving sin(x)=cos(x) on x=0..1, but for a large interval (say x=0..10000) or for a more complicated equation it's not the case. In order to make sure that I do not return a false answer, I have decided to return an exact answer only if I'm certain I did not miss a discontinuity in the antiderivative. It's certainly possible to improve, but not easy...
comment:21 Changed 12 months ago by
OTOH, this still works on 1.7.039
0>> int((sin(x)+cos(x)+abs(cos(x)sin(x)))/2, x, 0, 1) Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real): Check [abs(cos(x)sin(x))] Discontinuities at zeroes of cos(x)sin(x) were not checked sqrt(2)cos(1) // Time 0.14
comment:22 Changed 12 months ago by
Note that the warnings get through into sage
sage: integral((cos(x)+sin(x)+abs(cos(x)sin(x)))/2, x, 0, 1) Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real): Check [abs(cos(sageVARx)sin(sageVARx))] Discontinuities at zeroes of cos(sageVARx)sin(sageVARx) were not checked sqrt(2)  cos(1)
Would it be possible to integrate max(A,B) with a similar warning?
comment:23 Changed 12 months ago by
BTW, did you notice that sage is reading giac output with less than 53bit precision? We are getting 0.873911256505000 instead of 0.873911256504955, not because giac answer is incorrect but because its output is rounded to 0.873911256505 (which is correct rounding but less than 53bit).
Is there a simple way to setup giac with more output precision so that sage gets the right answer correctly rounded?
comment:24 Changed 12 months ago by
max is translated internally to piecewise, it does not use the formula with max, and the checks differ. If you run Digits:=14, you will get 14 digits printed. You can not get 53 bits of mantissa without multiprecision floats in giac, because the generic type of giac stores double in 8 bytes, and 5 bits are used to store the type > the mantissa is rounded to 0 with 48 bits precision.
comment:25 Changed 12 months ago by
Since there doesn't seem to be a fix available, I'm patching out the two failing doctests as follows:
 a/src/sage/functions/min_max.py +++ b/src/sage/functions/min_max.py @@ 233,9 +233,9 @@ class MaxSymbolic(MinMax_base): sage: f = max_symbolic(sin(x), cos(x)) sage: r = integral(f, x, 0, 1) ...  sage: r + sage: r # not tested  broken with giac 1.7.0 sqrt(2)  cos(1)  sage: r.n() + sage: r.n() # not tested  broken with giac 1.7.0 0.873911256504955 """ return max_symbolic(args)
I don't know if this is acceptable for including it in sagemath, but I can't downgrade giac and I rather skip this failing doctests. Is there a way to label a doctest as "expected fail" instead of "not tested" ?
comment:26 Changed 12 months ago by
Ironically, I think this test was added to showcase the fact that, given a difficult integral, sage would iterate through its available backends until it got an answer it liked. It seems now that giac is evolving towards the status quo, and refusing to give a possiblyincorrect exact answer.
We should still test the fallback behavior somehow, but these integrals have given us headaches for decades. I think we should stop promising to integrate them exactly, i.e. change/delete the tests.
comment:27 Changed 11 months ago by
Milestone:  sage9.5 → sage9.6 

comment:28 Changed 10 months ago by
Priority:  major → critical 

Changed 10 months ago by
Attachment:  giac1.7.0.47p0.tar.bz2 added 

comment:29 Changed 10 months ago by
Commit:  4df014a66c7c6c0dea73a10fbb2ac18369e1ada3 → 30df1ced0e3abce86c00933916c74bc582d357a6 

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
88a0c41  build/pkgs/giac/patches/autotools/0001configure.acDonotlinktolibintlifUSE_NLSisno.patch: Remove, not needed for giac 1.7

ffdb161  build/pkgs/giac: Update to 1.7.0.25

debe803  build/pkgs/giac/checksums.ini: Update upstream_url

30df1ce  build/pkgs/giac: Update to 1.7.0.47

comment:30 Changed 10 months ago by
Summary:  Upgrade giac to 1.7.0 → Upgrade giac to 1.7.047 

comment:31 Changed 10 months ago by
Ran spkgsrc
for the latest upstream. Patches still need work (anyone?)
comment:32 Changed 10 months ago by
Commit:  30df1ced0e3abce86c00933916c74bc582d357a6 → a701a79aae25f778382b21115ad20c269ba3fe4c 

Branch pushed to git repo; I updated commit sha1. New commits:
a701a79  build/pkgs/giac/patches/macosifactor.patch: Update

comment:34 followup: 35 Changed 10 months ago by
[giac1.7.0.47p0] quickjs.c:11282:9: error: implicit declaration of function 'fesetround' is invalid in C99 [Werror,Wimplicitfunctiondeclaration] [giac1.7.0.47p0] fesetround(rounding_mode);
comment:35 Changed 10 months ago by
Replying to mkoeppe:
[giac1.7.0.47p0] quickjs.c:11282:9: error: implicit declaration of function 'fesetround' is invalid in C99 [Werror,Wimplicitfunctiondeclaration] [giac1.7.0.47p0] fesetround(rounding_mode);
Who is setting Werror
? It's not coming from upstream as far as I can see.
comment:36 Changed 10 months ago by
There's no Werror
. The full command line is /bin/bash ../libtool tag=CC mode=compile gcc DHAVE_CONFIG_H I. I.. DIN_GIAC I. I.. I. I.. I/Users/mkoeppe/s/sage/sagerebasing/worktreerebase/local/include g O2 g O2 D_GNU_SOURCE DQUICKJS DCONFIG_BIGNUM DCONFIG_VERSION=\"20201108\" c o quickjs.lo quickjs.c
and what's happening here is that the file fenv.h
in the same directory shadows the systemprovided header file
comment:37 Changed 10 months ago by
$ gcc E DHAVE_CONFIG_H I. I.. DIN_GIAC I. I.. I. I.. I/Users/mkoeppe/s/sage/sagerebasing/worktreerebase/local/include g O2 g O2 D_GNU_SOURCE DQUICKJS DCONFIG_BIGNUM DCONFIG_VERSION=\"20201108\" Wp,v  < /dev/null clang cc1 version 13.0.0 (clang1300.0.29.30) default target x86_64appledarwin20.6.0 ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include" ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/Library/Frameworks" ignoring duplicate directory "." ignoring duplicate directory ".." ignoring duplicate directory "." ignoring duplicate directory ".." ignoring duplicate directory "/Users/mkoeppe/s/sage/sagerebasing/worktreerebase/local/include" ignoring duplicate directory "/usr/local/include" #include "..." search starts here: #include <...> search starts here: . .. /Users/mkoeppe/s/sage/sagerebasing/worktreerebase/local/include /usr/local/opt/primesieve/include /usr/local/opt/bdwgc/include /usr/local/opt/libpng/include /usr/local/opt/polymake/include /usr/local/opt/ntl/include /usr/local/opt/bzip2/include /usr/local/opt/readline/include /usr/local/include /Library/Developer/CommandLineTools/usr/lib/clang/13.0.0/include /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include /Library/Developer/CommandLineTools/usr/include /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory) End of search list. # 1 "<stdin>" # 1 "<builtin>" 1 # 1 "<builtin>" 3 # 368 "<builtin>" 3 # 1 "<command line>" 1 # 1 "<builtin>" 2 # 1 "<stdin>" 2
comment:38 Changed 10 months ago by
We may have discussed this before  do we need this quickjs stuff for Sage or should we use configure disablequickjs
?
comment:39 Changed 10 months ago by
I am fairly sure we don't need it https://bellard.org/quickjs/. That being said, I missed a few versions, I don't remember a disable switch.
comment:40 Changed 10 months ago by
Commit:  a701a79aae25f778382b21115ad20c269ba3fe4c → 991b383e165a9e8dd9226eeea37f2d64f2330f19 

Branch pushed to git repo; I updated commit sha1. New commits:
991b383  build/pkgs/giac/spkginstall.in: Use configure disablequickjs

comment:42 Changed 10 months ago by
Dependencies:  #32449 

comment:43 Changed 10 months ago by
Authors:  → Matthias Koeppe 

comment:44 followups: 46 49 Changed 10 months ago by
Status:  needs_review → needs_work 

The failure in comment:18 still needs to be addressed
comment:45 Changed 10 months ago by
Reviewers:  → https://github.com/mkoeppe/sage/actions/runs/1777286660, https://github.com/mkoeppe/sage/actions/runs/1777286661 

comment:46 followup: 48 Changed 10 months ago by
Replying to arojas:
The failure in comment:18 still needs to be addressed
Does it affect also system installations of giac 1.7.x?
comment:47 Changed 10 months ago by
Authors:  Matthias Koeppe → Matthias Koeppe, ... 

comment:48 Changed 10 months ago by
Replying to mkoeppe:
Replying to arojas:
The failure in comment:18 still needs to be addressed
Does it affect also system installations of giac 1.7.x?
Yes, it's a (intentional) regression in giac itself, see comment:20
comment:49 followup: 50 Changed 10 months ago by
Dependencies:  → #33226 

Status:  needs_work → needs_review 
Replying to arojas:
The failure in comment:18 still needs to be addressed
It's done in #33226 apparently
comment:50 Changed 10 months ago by
Replying to arojas:
Replying to arojas:
The failure in comment:18 still needs to be addressed
It's done in #33226 apparently
I don't know why we were testing that result anyway. It's in the docstring of an _evalf_
method. What we really want is the numerical answer.
comment:51 Changed 10 months ago by
Authors:  Matthias Koeppe, ... → Matthias Koeppe 

comment:52 Changed 10 months ago by
Reviewers:  https://github.com/mkoeppe/sage/actions/runs/1777286660, https://github.com/mkoeppe/sage/actions/runs/1777286661 → https://github.com/mkoeppe/sage/actions/runs/1779328737, https://github.com/mkoeppe/sage/actions/runs/1779328743 

comment:53 Changed 10 months ago by
Reviewers:  https://github.com/mkoeppe/sage/actions/runs/1779328737, https://github.com/mkoeppe/sage/actions/runs/1779328743 → https://github.com/mkoeppe/sage/actions/runs/1780912483, https://github.com/mkoeppe/sage/actions/runs/1780912484 

comment:54 Changed 10 months ago by
Status:  needs_review → needs_work 

Fails on Cygwin  https://github.com/mkoeppe/sage/runs/5031119487?check_suite_focus=true
comment:55 Changed 10 months ago by
/usr/bin/bash ../libtool tag=CXX mode=link g++ std=gnu++11 g O2 g O2 fnostrictaliasing DGIAC_GENERIC_CONSTANTS DTIMEOUT noundefined L/opt/sage628803ef0f0817c0876342b66da54660ce208124/lib Wl,rpath,/opt/sage628803ef0f0817c0876342b66da54660ce208124/lib L/opt/sage628803ef0f0817c0876342b66da54660ce208124/lib Wl,rpath,/opt/sage628803ef0f0817c0876342b66da54660ce208124/lib o libgiac.la rpath /opt/sage628803ef0f0817c0876342b66da54660ce208124/lib input_lexer.lo sym2poly.lo gausspol.lo threaded.lo moyal.lo maple.lo ti89.lo mathml.lo misc.lo permu.lo quater.lo desolve.lo input_parser.lo symbolic.lo index.lo modpoly.lo modfactor.lo ezgcd.lo derive.lo solve.lo intg.lo intgab.lo risch.lo lin.lo series.lo subst.lo vecteur.lo sparse.lo csturm.lo tex.lo global.lo ifactor.lo alg_ext.lo gauss.lo isom.lo plot.lo plot3d.lo rpn.lo prog.lo pari.lo cocoa.lo unary.lo usual.lo identificateur.lo gen.lo tinymt32.lo first.lo TmpLESystemSolver.lo TmpFGLM.lo help.lo lpsolve.lo optimization.lo signalprocessing.lo graphe.lo graphtheory.lo nautywrapper.lo markup.lo kdisplay.lo kadd.lo caseval.lo cutils.lo graphic.lo libbf.lo libregexp.lo libunicode.lo qjsgiac.lo quickjs.lo quickjslibc.lo js.lo lntl lpari lgsl lopenblas lm lopenblas lopenblas lrt lpthread lcurl lglpk ldl lm lmpfi lmpfr lgmp libtool: link: g++ std=gnu++11 shared nostdlib /usr/lib/gcc/x86_64pccygwin/11/crtbeginS.o .libs/input_lexer.o .libs/sym2poly.o .libs/gausspol.o .libs/threaded.o .libs/moyal.o .libs/maple.o .libs/ti89.o .libs/mathml.o .libs/misc.o .libs/permu.o .libs/quater.o .libs/desolve.o .libs/input_parser.o .libs/symbolic.o .libs/index.o .libs/modpoly.o .libs/modfactor.o .libs/ezgcd.o .libs/derive.o .libs/solve.o .libs/intg.o .libs/intgab.o .libs/risch.o .libs/lin.o .libs/series.o .libs/subst.o .libs/vecteur.o .libs/sparse.o .libs/csturm.o .libs/tex.o .libs/global.o .libs/ifactor.o .libs/alg_ext.o .libs/gauss.o .libs/isom.o .libs/plot.o .libs/plot3d.o .libs/rpn.o .libs/prog.o .libs/pari.o .libs/cocoa.o .libs/unary.o .libs/usual.o .libs/identificateur.o .libs/gen.o .libs/tinymt32.o .libs/first.o .libs/TmpLESystemSolver.o .libs/TmpFGLM.o .libs/help.o .libs/lpsolve.o .libs/optimization.o .libs/signalprocessing.o .libs/graphe.o .libs/graphtheory.o .libs/nautywrapper.o .libs/markup.o .libs/kdisplay.o .libs/kadd.o .libs/caseval.o .libs/cutils.o .libs/graphic.o .libs/libbf.o .libs/libregexp.o .libs/libunicode.o .libs/qjsgiac.o .libs/quickjs.o .libs/quickjslibc.o .libs/js.o L/opt/sage628803ef0f0817c0876342b66da54660ce208124/lib lntl lpari lgsl lopenblas lrt lpthread lcurl lglpk ldl lmpfi lmpfr lgmp L/opt/sage628803ef0f0817c0876342b66da54660ce208124/lib/../lib L/usr/lib/gcc/x86_64pccygwin/11 L/usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/lib/../lib L/usr/lib/gcc/x86_64pccygwin/11/../../../../lib L/lib/../lib L/usr/lib/../lib L/usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/lib L/usr/lib/gcc/x86_64pccygwin/11/../../.. lstdc++ lgcc_s lgcc lcygwin ladvapi32 lshell32 luser32 lkernel32 lgcc_s lgcc /usr/lib/gcc/x86_64pccygwin/11/crtend.o g O2 g O2 Wl,rpath Wl,/opt/sage628803ef0f0817c0876342b66da54660ce208124/lib Wl,rpath Wl,/opt/sage628803ef0f0817c0876342b66da54660ce208124/lib o .libs/cyggiac0.dll Wl,enableautoimagebase Xlinker outimplib Xlinker .libs/libgiac.dll.a /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/sym2poly.o:/opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/sym2poly.cc:215: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/sym2poly.o:/opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/sym2poly.cc:236: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/sym2poly.o:/opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/sym2poly.cc:2163: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/sym2poly.o: in function `giac::r2sym(giac::gen const&, giac::index_m const&, giac::dbgprint_vector<giac::gen> const&, giac::context const*)': /opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/sym2poly.cc:2009: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/sym2poly.o:/opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/sym2poly.cc:194: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/sym2poly.o:/opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/sym2poly.cc:199: more undefined references to `libintl_gettext' follow /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/global.o: in function `giac::init_geogebra(bool, giac::context const*)': /opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/global.cc:6823: undefined reference to `libintl_setlocale' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/global.o: in function `giac::gen::gen(void*, short)': /opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/gen.h:597: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/global.o: in function `giac::thread_eval(giac::gen const&, int, giac::context*, void (*)(giac::context*))': /opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/global.cc:5620: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: /opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/global.cc:5642: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/global.o: in function `giac::gen::gen(void*, short)': /opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/gen.h:597: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/global.o: in function `giac::check_thread(giac::context*)': /opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/global.cc:5534: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/global.o:/opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/global.cc:5550: more undefined references to `libintl_gettext' follow /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/gen.o: in function `giac::chartab2gen(char*, giac::context const*)': /opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/gen.cc:12084: undefined reference to `libintl_setlocale' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: /opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/gen.cc:12085: undefined reference to `libintl_setlocale' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: /opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/gen.cc:12087: undefined reference to `libintl_setlocale' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/gen.o: in function `giac::irem(giac::gen const&, giac::gen const&, giac::gen&)': /opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/gen.cc:11245: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/gen.o: in function `giac::operator_plus(giac::gen const&, giac::gen const&, unsigned int, giac::context const*)': /opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/gen.cc:4727: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/gen.o:/opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/gen.cc:4579: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/gen.o:/opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/gen.cc:4479: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/gen.o: in function `giac::operator_plus(giac::gen const&, giac::gen const&, unsigned int, giac::context const*)': /opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/gen.cc:4761: undefined reference to `libintl_gettext' /usr/lib/gcc/x86_64pccygwin/11/../../../../x86_64pccygwin/bin/ld: .libs/gen.o:/opt/sage628803ef0f0817c0876342b66da54660ce208124/var/tmp/sage/build/giac1.7.0.47p0/src/src/gen.cc:4707: more undefined references to `libintl_gettext' follow collect2: error: ld returned 1 exit status
comment:56 Changed 10 months ago by
@parisse Is there a public repository for giac? The link to the geogebra SVN in https://wwwfourier.ujfgrenoble.fr/~parisse/giac_compile.html is broken.
comment:58 Changed 10 months ago by
This repo does not seem to have all of giac, in particular the autotools build system (configure.ac, ...)
comment:60 Changed 9 months ago by
Milestone:  sage9.6 → sage9.7 

comment:61 Changed 7 months ago by
Commit:  991b383e165a9e8dd9226eeea37f2d64f2330f19 → 0a4dab2ed895b2efc3136e3dc25fb03592f72b2b 

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
042b059  build/pkgs/giac/patches/autotools/0001configure.acDonotlinktolibintlifUSE_NLSisno.patch: Remove, not needed for giac 1.7

c40e201  build/pkgs/giac: Update to 1.7.0.25

c7d898b  build/pkgs/giac/checksums.ini: Update upstream_url

a67d6a4  build/pkgs/giac: Update to 1.7.0.47

839ce7c  build/pkgs/giac/patches/macosifactor.patch: Update

0a4dab2  build/pkgs/giac/spkginstall.in: Use configure disablequickjs

comment:62 Changed 7 months ago by
Summary:  Upgrade giac to 1.7.047 → Upgrade giac to 1.9.05 

Changed 7 months ago by
Attachment:  giac1.9.0.5p0.tar.bz2 added 

comment:63 Changed 7 months ago by
Commit:  0a4dab2ed895b2efc3136e3dc25fb03592f72b2b → 11156a843e637fb5a15e983b29431538a8b04b6c 

Branch pushed to git repo; I updated commit sha1. New commits:
11156a8  build/pkgs/giac: Update to 1.9.05

comment:64 Changed 7 months ago by
The branch upstream
of https://salsa.debian.org/scienceteam/giac tracks the upstream releases nicely
comment:65 Changed 7 months ago by
Commit:  11156a843e637fb5a15e983b29431538a8b04b6c → b953c7dc17565da0ff4d238306f858bf352b2633 

Branch pushed to git repo; I updated commit sha1. New commits:
b953c7d  build/pkgs/giac/dependencies: Add ecm

comment:66 Changed 7 months ago by
Reviewers:  https://github.com/mkoeppe/sage/actions/runs/1780912483, https://github.com/mkoeppe/sage/actions/runs/1780912484 → https://github.com/sagemath/sagetracmirror/actions/runs/2178226151 

Status:  needs_work → needs_review 
Running the cygwin tests at https://github.com/sagemath/sagetracmirror/actions/runs/2178226151
comment:67 Changed 7 months ago by
Still getting the same linker errors on cygwin: https://github.com/sagemath/sagetracmirror/runs/6051870023?check_suite_focus=true
comment:68 Changed 7 months ago by
Status:  needs_review → needs_work 

comment:69 Changed 5 months ago by
What is the status of this? Latest 9.7 beta still does not have latest giac 1.9 in it. Will the final 9.7 sagemath release have giac 1.9 included?
comment:70 Changed 5 months ago by
Dependencies:  #33226 → #33226 #34037 

Summary:  Upgrade giac to 1.9.05 → Upgrade giac to 1.9.07 
comment:71 Changed 5 months ago by
Summary:  Upgrade giac to 1.9.07 → Upgrade giac to 1.9.011 

And of course 1.9.011 came out just after I updated the description to 1.9.07. Testing in sageongentoo shortly.
comment:72 Changed 5 months ago by
Doctest failure with 1.9.011
sage t long randomseed=207046070893293649350070796495889591871 /usr/lib/python3.10/sitepackages/sage/libs/giac/giac.pyx ********************************************************************** File "/usr/lib/python3.10/sitepackages/sage/libs/giac/giac.pyx", line 415, in sage.libs.giac.giac._giac Failed example: libgiac.fMax(f,'x=0..pi').simplify() Expected: pi/4,3*pi/4 Got: 0,pi/2,pi **********************************************************************
this is a fairly weird result. Either a bug has been introduced in giac or the meaning of something changed.
comment:73 Changed 5 months ago by
The section tested is
sage: x = libgiac('x') sage: f = 1/(5+cos(4*x)) sage: oldrep = 1/2/(2*sqrt(6))*(atan(2*tan(4*x/2)/sqrt(6))+pi*floor(4*x/2/pi+1/2)) sage: newrep = 1/2/(2*sqrt(6))*(atan((sqrt(6)*sin(4*x)+2*sin(4*x))/(sqrt(6)*cos(4*x)+sqrt(6)2*cos(4*x)+2))+4*x/2) sage: ((f.int(x)  newrep)*(f.int(x)oldrep)).normal() 0 sage: libgiac.fMax(f,'x=0..pi').simplify() pi/4,3*pi/4 sage: libgiac.fMax.help() # doctest: +SKIP "Returns the abscissa of the maximum of the expression.
and I plotted f
. The previous answer are the correct maxima over the interval, the new answer are actually the minima.
I'll also note
sage: libgiac.fMax.help()  TypeError Traceback (most recent call last) Input In [6], in <cell line: 1>() > 1 libgiac.fMax.help() TypeError: 'str' object is not callable sage: libgiac.fMax.help '"Description: Returns the abscissa of the maximum of the expression.\nRelated: fMin\nExamples:\nfMax(x^2+2*x+1,x);fMax(x^2+2*x+1,x=1..2)"'
So the skipped doctest is not written correctly in the first place which mean documentation is showing something incorrect.
comment:74 Changed 5 months ago by
How do you if you are running 1.905 or 1.911? The version number just says 1.9.
This giac is so confusing. I go to https://wwwfourier.ujfgrenoble.fr/~parisse/giac.html and it says at the top 1.9.011 but when I click to download the source from https://wwwfourier.ujfgrenoble.fr/~parisse/giac/giac_stable.tgz which is the link on same page, it says giac_stable.tgz. I downloaded now and build the source, but when I say
>which giac /usr/local/bin/giac >giac version // Using locale /usr/local/share/locale/ // C.UTF8 // /usr/local/share/locale/ // giac // UTF8 // Maximum number of parallel threads 24 // (c) 2001, 2021 B. Parisse & others 1.9.0 >
So I have no idea now if I am using 1.905 or 1.911
How do you know that sagemath is using the correct version 1.911 then? Do you have another way to check?
Strange that giac has no github website so one know what they version are downloading for sure.
comment:75 Changed 5 months ago by
I (and all other giac packagers that I know) am downloading from here http://wwwfourier.ujfgrenoble.fr/~parisse/debian/dists/stable/main/source/
comment:76 followup: 77 Changed 5 months ago by
Ok, thanks for this link. This is the not the same at the website https://wwwfourier.ujfgrenoble.fr/~parisse/giac.html there (near the top) which is only one I knew about.
Is the link you show known because it shows on some web page? I looked at all the pages such as https://wwwfourier.ujfgrenoble.fr/~parisse/install_en#new and could not find another link to the current sources.
But I will use the one you showed now and rebuild again.
Thanks
comment:77 Changed 5 months ago by
Replying to ghnasser1:
Is the link you show known because it shows on some web page? I looked at all the pages such as https://wwwfourier.ujfgrenoble.fr/~parisse/install_en#new and could not find another link to the current sources.
It is findable from that web page, but it is not obvious and includes a hop to another page first. Under the heading "Developers" click on "C++ source" which lead to the following page
https://wwwfourier.ujfgrenoble.fr/~parisse/giac_compile.html and under "Compiling Giac from source" the entry "stable source" has two links. The first one to giac_stable.tgz
and the other one to the page I quoted with the archive of all source tarballs.
So, it is there but requires a bit of digging.
comment:78 Changed 5 months ago by
Commit:  b953c7dc17565da0ff4d238306f858bf352b2633 → fb2a1be27a0a1ade9c593de56257036d5622b669 

Branch pushed to git repo; I updated commit sha1. New commits:
fb2a1be  Merge tag '9.7.beta3' into t/31563/upgrade_giac_to_1_7_0

comment:79 Changed 5 months ago by
Fyi,
on https://wwwfourier.ujfgrenoble.fr/~parisse/debian/dists/stable/main/source/ there is now giac_1.9.013.tar.gz
comment:80 Changed 5 months ago by
Thanks for the heads up on the version bump. The issue in libs/giac/giac.pyx
is still present with that version.
comment:81 followup: 82 Changed 5 months ago by
I am reporting this in giac's forum: https://xcas.univgrenoblealpes.fr/forum/viewtopic.php?f=3&t=2788
comment:82 Changed 5 months ago by
Replying to frederichan:
I am reporting this in giac's forum: https://xcas.univgrenoblealpes.fr/forum/viewtopic.php?f=3&t=2788
I applied that patch to 1.9.0.13 and libgiac.fMax(f,'x=0..pi').simplify()
is pi/4,3*pi/4
again
comment:83 Changed 5 months ago by
Hopefully it got in 1.9.015 released a couple of days ago while that commit is from 4 days ago. Let's test this.
comment:84 Changed 5 months ago by
Summary:  Upgrade giac to 1.9.011 → Upgrade giac to 1.9.015 

Yes, 1.9.015 seems to include the fix. The doctest passes now.
comment:85 Changed 5 months ago by
Dependencies:  #33226 #34037 → #33226, #34037, #31403 

comment:86 Changed 5 months ago by
Commit:  fb2a1be27a0a1ade9c593de56257036d5622b669 → 493c74b3ee300c66cca6d9a87b15c555f2f3391e 

comment:87 Changed 5 months ago by
The tarball has grown, it now contains some large files (*.js, *.wasm)  do we need them?
comment:89 Changed 5 months ago by
Commit:  493c74b3ee300c66cca6d9a87b15c555f2f3391e → bd9b013b9a284fc6853bbf04d899a587fc27bf0b 

Branch pushed to git repo; I updated commit sha1. New commits:
bd9b013  build/pkgs/giac/spkgsrc: Get rid of *.js, *.wasm

comment:90 Changed 5 months ago by
Commit:  bd9b013b9a284fc6853bbf04d899a587fc27bf0b → 4160a645141d4b72e6b81ef438fe6f7d3cd38ed2 

Branch pushed to git repo; I updated commit sha1. New commits:
4160a64  build/pkgs/giac/patches/0001srcglobal.ccDonotsendSIGINTtoprocess1.patch: Update

comment:91 followup: 93 Changed 5 months ago by
on macOS:
[giac1.9.0.15p0] /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:208:48: note: expanded from macro '__deprecated_msg' [giac1.9.0.15p0] #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg))) [giac1.9.0.15p0] ^ [giac1.9.0.15p0] icas.cc:1435:9: error: no member named 'localisation' in namespace 'xcas' [giac1.9.0.15p0] xcas::localisation(); // change by L. Marohnić [giac1.9.0.15p0] ~~~~~~^
Changed 5 months ago by
Attachment:  giac1.9.0.15p0.tar.bz2 added 

comment:93 Changed 5 months ago by
Replying to mkoeppe:
on macOS:
[giac1.9.0.15p0] /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:208:48: note: expanded from macro '__deprecated_msg' [giac1.9.0.15p0] #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg))) [giac1.9.0.15p0] ^ [giac1.9.0.15p0] icas.cc:1435:9: error: no member named 'localisation' in namespace 'xcas' [giac1.9.0.15p0] xcas::localisation(); // change by L. Marohnić [giac1.9.0.15p0] ~~~~~~^
FYI I've reported this error xcas::localisation(); few days ago to giac forum. Here is the link
https://xcas.univgrenoblealpes.fr/forum/viewtopic.php?f=3&t=2789
Nasser
comment:94 Changed 5 months ago by
I didn't spot that one before because I always build with fltk support. And that part is in a "#else block when fltk is not requested. Blocks with
xcas::localisation` have very funny guards
#ifndef USE_OBJET_BIDON xcas::localisation(); // change by L. Marohnić #endif
literally "use fake object". Passing DUSE_OBJET_BIDON
may help.
comment:95 Changed 5 months ago by
Yes, I compiled it without fltk by adding DUSE_OBJET_BIDON=1
to CPPFLAGS
. Be careful "OBJET" without a "C", this is french and google translate will tell you that "bidon" is a "can", but colloquially it means "something that isn't what it seems", the can may look big but inside it is just empty.
comment:96 Changed 5 months ago by
Commit:  4160a645141d4b72e6b81ef438fe6f7d3cd38ed2 → d2ade90f4fb2f813ad46652c8d6c777ed3fe0b50 

Branch pushed to git repo; I updated commit sha1. New commits:
d2ade90  build/pkgs/giac/spkginstall.in: Work around xcas::localisation error

comment:98 Changed 5 months ago by
Status:  needs_work → needs_review 

comment:99 Changed 5 months ago by
Dependencies:  #33226, #34037, #31403 → #33226, #34037, #31403, #34088 

comment:100 Changed 5 months ago by
Commit:  d2ade90f4fb2f813ad46652c8d6c777ed3fe0b50 → d11f705e83046e1a7a712f98e6be4bc2fc96f649 

comment:101 Changed 5 months ago by
Reviewers:  https://github.com/sagemath/sagetracmirror/actions/runs/2178226151 → https://github.com/mkoeppe/sage/actions/runs/2641761864, https://github.com/mkoeppe/sage/actions/runs/2641761870 

comment:102 Changed 5 months ago by
Commit:  d11f705e83046e1a7a712f98e6be4bc2fc96f649 → b4e5c6ee7d60a5c1205697c8858bc59b84faa78a 

Branch pushed to git repo; I updated commit sha1. New commits:
b4e5c6e  Merge tag '9.7.beta5' into t/31563/upgrade_giac_to_1_7_0

comment:103 Changed 5 months ago by
Still fails on cygwin with same error as shown in comment:55  https://github.com/mkoeppe/sage/runs/7274399777?check_suite_focus=true
comment:104 Changed 5 months ago by
Cc:  Dima Pasechnik added 

The other platforms looks OK. I'd suggest that we ignore Cygwin for now and merge the ticket.
comment:105 Changed 5 months ago by
Cygwin is low on my own priority list but it feels a bit of a shame. If giac 1.7 builds on cygwin this is clearly a regression, but while we upgrade the package here, there is nothing that prevent the use of 1.7 or specifically require 1.9, so if someone wants to build on cygwin, they can bring their own giac 1.7.
comment:106 followup: 111 Changed 5 months ago by
I think it will be easy to fix the Cygwin build failure in a follow up ticket. Best done in one go together with other current failures of the platform.
comment:107 Changed 5 months ago by
I am OK with that plan. I am OK being a positive reviewer for this.
comment:109 Changed 5 months ago by
Reviewers:  https://github.com/mkoeppe/sage/actions/runs/2641761864, https://github.com/mkoeppe/sage/actions/runs/2641761870 → François Bissey 

Status:  needs_review → positive_review 
comment:110 Changed 4 months ago by
Branch:  u/mkoeppe/upgrade_giac_to_1_7_0 → b4e5c6ee7d60a5c1205697c8858bc59b84faa78a 

Resolution:  → fixed 
Status:  positive_review → closed 
comment:111 Changed 4 months ago by
Commit:  b4e5c6ee7d60a5c1205697c8858bc59b84faa78a 

FTR, this is straightforward and requires no changes to sagelib.