Opened 3 years ago
Closed 2 years ago
#13364 closed enhancement (fixed)
Upgrade Maxima to 5.29.1
Reported by:  kcrisman  Owned by:  tbd 

Priority:  major  Milestone:  sage5.7 
Component:  packages: standard  Keywords:  maxima spkg 
Cc:  jpflori, dimpase, nbruin, zimmerma  Merged in:  sage5.7.beta0 
Authors:  JeanPierre Flori, Dmitrii Pasechnik  Reviewers:  KarlDieter Crisman, François Bissey, Leif Leonhardy, Paul Zimmermann 
Report Upstream:  Reported upstream. Developers acknowledge bug.  Work issues:  
Branch:  Commit:  
Dependencies:  Stopgaps: 
Description (last modified by jdemeyer)
Message: 5 Date: Sun, 12 Aug 2012 23:18:05 +0000 (UTC) From: Robert Dodier <robert.dodier@gmail.com> To: maxima@math.utexas.edu Subject: [Maxima] Maxima 5.28.0 release MessageID: <k09djd$dvj$2@dough.gmane.org> Hi, I've created branch5_28 in Git and tagged branch5_28base and 5.28.0. I've created tar.gz, srpm, and rpm's and uploaded them to the SourceForge file manager. (http://sourceforge.net/projects/maxima/files)
The new spkg is for ECL 11 as well as for ECL 12, i.e. ASDFagnostic, along the lines of maxima 5.26.0 at #13860. Moreover it has
an upstream patch preventing segfaults. This fixes few tickets.
Install http://boxen.math.washington.edu/home/jdemeyer/spkg/maxima5.29.1.p1.spkg
Apply
Attachments (2)
Change History (127)
comment:1 Changed 3 years ago by fbissey
comment:2 Changed 3 years ago by kcrisman
True. I just opened this in order to have a ticket for it at all; I couldn't find one for 5.27 update alone (as opposed to things noting that 5.27 would fix various things) so I opened this. Feel free to close it if it's a dup.
comment:3 Changed 3 years ago by fbissey
No duplicate that I know off. May be an opportunity to update ecl as well, 12.2.1 works well with a few tweaks. 12.7.1 seems to have issues see #12985.
comment:4 Changed 2 years ago by kcrisman
 Summary changed from Upgrade Maxima to 5.28 to Upgrade Maxima to latest upstream release
The newest Maxima is now 5.29. Ugrading ECL is #13324 and hopefully will have positive review soon.
comment:5 Changed 2 years ago by jpflori
 Cc jpflori added
We'll have to make some change to spkginstall when ECL >= 12.12.1 gets in.
See
http://trac.sagemath.org/sage_trac/ticket/13324#comment:77
I'm waiting for more info from upstream ECL on this change.
comment:6 Changed 2 years ago by jpflori
 Keywords maxima spkg added
comment:7 Changed 2 years ago by jpflori
Here comes a 5.29.1 spkg at
http://boxen.math.washington.edu/home/jpflori/maxima5.29.1.p0.spkg
It builds and runs and passes most tests in sage/calculus on Linux.
Some tests fails because Maxima adds ? in some strings in calculus.py.
comment:8 Changed 2 years ago by jpflori
 Summary changed from Upgrade Maxima to latest upstream release to Upgrade Maxima to 5.29.1
 Work issues set to fix doctets
comment:9 Changed 2 years ago by kcrisman
Your spkg diff for the readme says that you removed a patch, but I don't see that in the diff. But we track the patches directory, right?
comment:10 Changed 2 years ago by jpflori
Yup, I forgot to run hg addremove.
comment:11 Changed 2 years ago by jpflori
It also seems Maxima does not integrate sqrt(x + sqrt(x)) anymore, maybe that needs assumptions which were incorectly assumed before, don't want to think about that now.
comment:12 Changed 2 years ago by kcrisman
Yes, don't worry about this now, as François has put a lot of time into cataloguing things anyway on some sagedevel discussion a while ago.
comment:13 Changed 2 years ago by jpflori
Could you provide a link to that discussion?
comment:14 Changed 2 years ago by kcrisman
No, it's too old, I'm not sure how to find it. It wasn't part of a thread only about this, I think. François, do you remember?
comment:15 Changed 2 years ago by fbissey
Haven't tried 5.29.1 only 5.28 after it came out. I remember that a number of function now require an extra argument (an assumption) as you have found out. But I haven't looked at it in a long time. I'll check what I can find.
comment:16 Changed 2 years ago by fbissey
Actually I haven't done a report on upgrade that break things badly for a little while. You may remember a report from a long time ago. I don't have as much time to write those these days.
comment:17 followups: ↓ 18 ↓ 32 Changed 2 years ago by fbissey
Doing some tests with ecl 12.2.1+maxima 5.29.1 right now. I assume the target will be 12.12.1 /5.29.1 and enabling unicode in ecl if possible. Anyway I have a nasty
sage t long verbose "devel/sagemain/sage/symbolic/integration/integral.py" # Killed/crashed
Probably ecl/maxima rather than pure maxima it goes in a panic
;;; ;;; Stack overflow. ;;; Jumping to the outermost toplevel prompt ;;;
for quite a bit before getting killed. The other interesting bits:
sage t long "devel/sagemain/sage/interfaces/maxima_abstract.py" ********************************************************************** File "/usr/share/sage/devel/sagemain/sage/interfaces/maxima_abstract.py", line 422: sage: maxima.version() Expected: '5.26.0' Got: '5.29.1' ********************************************************************** File "/usr/share/sage/devel/sagemain/sage/interfaces/maxima_abstract.py", line 2354: sage: maxima_version() Expected: '5.26.0' Got: '5.29.1' ********************************************************************** 2 items had failures: 1 of 4 in __main__.example_13 1 of 5 in __main__.example_84 ***Test Failed*** 2 failures. For whitespace errors, see the file /home/fbissey/.sage/tmp/maxima_abstract_3312.py [7.4 s] sage t long "devel/sagemain/sage/interfaces/maxima_lib.py" ********************************************************************** File "/usr/share/sage/devel/sagemain/sage/interfaces/maxima_lib.py", line 716: sage: integrate(sqrt(x + sqrt(x)), x).simplify_full() Expected: 1/12*sqrt(sqrt(x) + 1)*((8*x  3)*x^(1/4) + 2*x^(3/4))  1/8*log(sqrt(sqrt(x) + 1)  x^(1/4)) + 1/8*log(sqrt(sqrt(x) + 1) + x^(1/4)) Got: integrate(sqrt(x + sqrt(x)), x) #0: simplify_sum(expr='sum(q^k,k,0,inf)) #1: simplify_sum(expr=a*'sum(q^k,k,0,inf)) ********************************************************************** File "/usr/share/sage/devel/sagemain/sage/interfaces/maxima_lib.py", line 819: sage: limit(x^a,x=0) Expected: Traceback (most recent call last): ... ValueError: Computation failed since Maxima requested additional constraints; using the 'assume' command before limit evaluation *may* help (see `assume?` for more details) Is a an integer? Got: Traceback (most recent call last): File "/usr/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/usr/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/usr/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_26[9]>", line 1, in <module> limit(x**a,x=Integer(0))###line 819: sage: limit(x^a,x=0) File "/usr/lib64/python2.7/sitepackages/sage/calculus/calculus.py", line 1188, in limit l = maxima.sr_limit(ex, v, a) File "/usr/lib64/python2.7/sitepackages/sage/interfaces/maxima_lib.py", line 856, in sr_limit raise ValueError, "Computation failed since Maxima requested additional constraints; using the 'assume' command before limit evaluation *may* help (see `assume?` for more details)\n" + s ValueError: Computation failed since Maxima requested additional constraints; using the 'assume' command before limit evaluation *may* help (see `assume?` for more details) Is a an ?integer? ********************************************************************** 2 items had failures: 1 of 25 in __main__.example_24 1 of 19 in __main__.example_26 ***Test Failed*** 2 failures. For whitespace errors, see the file /home/fbissey/.sage/tmp/maxima_lib_3431.py [4.0 s]
it is not as bad as I remember but it is just pinpointing on some obvious tests right now.
comment:18 in reply to: ↑ 17 Changed 2 years ago by jpflori
Replying to fbissey:
Doing some tests with ecl 12.2.1+maxima 5.29.1 right now. I assume the target will be 12.12.1 /5.29.1 and enabling unicode in ecl if possible. Anyway I have a nasty
Yup 12.12.1 plus 5.29.1.
About the name changes I mentioned here and on #13324, I got upstream confimation it was expected and is not a problem, see
http://sourceforge.net/mailarchive/message.php?msg_id=30232028
I'd prefer to postpone Unicode and deal with it in let's say #12985, unless it is really trivial.
sage t long verbose "devel/sagemain/sage/symbolic/integration/integral.py" # Killed/crashedProbably ecl/maxima rather than pure maxima it goes in a panic
;;; ;;; Stack overflow. ;;; Jumping to the outermost toplevel prompt ;;;
Nice, I did not get that one though.
for quite a bit before getting killed. The other interesting bits:
sage t long "devel/sagemain/sage/interfaces/maxima_abstract.py" ********************************************************************** File "/usr/share/sage/devel/sagemain/sage/interfaces/maxima_abstract.py", line 422: sage: maxima.version() Expected: '5.26.0' Got: '5.29.1' ********************************************************************** File "/usr/share/sage/devel/sagemain/sage/interfaces/maxima_abstract.py", line 2354: sage: maxima_version() Expected: '5.26.0' Got: '5.29.1' ********************************************************************** 2 items had failures: 1 of 4 in __main__.example_13 1 of 5 in __main__.example_84 ***Test Failed*** 2 failures. For whitespace errors, see the file /home/fbissey/.sage/tmp/maxima_abstract_3312.py [7.4 s] sage t long "devel/sagemain/sage/interfaces/maxima_lib.py" ********************************************************************** File "/usr/share/sage/devel/sagemain/sage/interfaces/maxima_lib.py", line 716: sage: integrate(sqrt(x + sqrt(x)), x).simplify_full() Expected: 1/12*sqrt(sqrt(x) + 1)*((8*x  3)*x^(1/4) + 2*x^(3/4))  1/8*log(sqrt(sqrt(x) + 1)  x^(1/4)) + 1/8*log(sqrt(sqrt(x) + 1) + x^(1/4)) Got: integrate(sqrt(x + sqrt(x)), x) #0: simplify_sum(expr='sum(q^k,k,0,inf)) #1: simplify_sum(expr=a*'sum(q^k,k,0,inf)) ********************************************************************** File "/usr/share/sage/devel/sagemain/sage/interfaces/maxima_lib.py", line 819: sage: limit(x^a,x=0) Expected: Traceback (most recent call last): ... ValueError: Computation failed since Maxima requested additional constraints; using the 'assume' command before limit evaluation *may* help (see `assume?` for more details) Is a an integer? Got: Traceback (most recent call last): File "/usr/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/usr/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/usr/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_26[9]>", line 1, in <module> limit(x**a,x=Integer(0))###line 819: sage: limit(x^a,x=0) File "/usr/lib64/python2.7/sitepackages/sage/calculus/calculus.py", line 1188, in limit l = maxima.sr_limit(ex, v, a) File "/usr/lib64/python2.7/sitepackages/sage/interfaces/maxima_lib.py", line 856, in sr_limit raise ValueError, "Computation failed since Maxima requested additional constraints; using the 'assume' command before limit evaluation *may* help (see `assume?` for more details)\n" + s ValueError: Computation failed since Maxima requested additional constraints; using the 'assume' command before limit evaluation *may* help (see `assume?` for more details) Is a an ?integer? ********************************************************************** 2 items had failures: 1 of 25 in __main__.example_24 1 of 19 in __main__.example_26 ***Test Failed*** 2 failures. For whitespace errors, see the file /home/fbissey/.sage/tmp/maxima_lib_3431.py [4.0 s]it is not as bad as I remember but it is just pinpointing on some obvious tests right now.
Got these ones and similar in other places.
Everything looked trivial to fix and consisted in:
 version number changes,
 integration which did nothing, surely the assumption stuff we mentioned here,
 trivial simplification which was not done anymore, maybe a call to simplify could fix these,
 the strange ? things.
comment:19 Changed 2 years ago by jpflori
 Dependencies set to #13324
 Work issues changed from fix doctets to fix doctests, build with latest ECL
comment:20 Changed 2 years ago by dimpase
 Cc dimpase added
comment:21 followups: ↓ 30 ↓ 43 Changed 2 years ago by leif
The Maxima spkg fails to build for me because makeinfo is missing... :)
comment:22 followups: ↓ 23 ↓ 24 Changed 2 years ago by leif
Ok, now the build "succeeded", although I get:
Now installing the Maxima library as '$SAGE_ROOT/local/lib/ecl//maxima.fas'... cp: cannot stat `maxima.fasb': No such file or directory real 18m37.266s user 14m24.494s sys 1m52.139s Successfully installed maxima5.29.1.p0 ...
(I think this was already mentioned on the ECL ticket. Not sure how the new library is supposed to work when it doesn't get installed...)
I also get a couple of new warnings (w.r.t. Maxima 5.26.0 and the old ECL) like
;;; Compiling (DEFUN HAIPART ...). ;;; Warning: ;;; in file clmacs.lisp, position 6071 ;;; at (DEFUN HAIPART ...) ;;; ! Too few arguments for proclaimed function LOGAND
(I.e., 164/2 [I think] instances of "Too few arguments for proclaimed function LOGAND".)
comment:23 in reply to: ↑ 22 ; followup: ↓ 25 Changed 2 years ago by dimpase
Replying to leif:
Ok, now the build "succeeded", although I get:
Now installing the Maxima library as '$SAGE_ROOT/local/lib/ecl//maxima.fas'... cp: cannot stat `maxima.fasb': No such file or directory
as far as I understand, the name might have changed, due to asdf changes in ECL.
It might be maximasystem.* rather than maxima.*
comment:24 in reply to: ↑ 22 Changed 2 years ago by leif
 Reviewers set to KarlDieter Crisman, François Bissey, Leif Leonhardy
 Work issues changed from fix doctests, build with latest ECL to fix doctests, build with latest ECL, fix `spkginstall`
Replying to leif:
Ok, now the build "succeeded", although I get:
Now installing the Maxima library as '$SAGE_ROOT/local/lib/ecl//maxima.fas'... cp: cannot stat `maxima.fasb': No such file or directory real 18m37.266s user 14m24.494s sys 1m52.139s Successfully installed maxima5.29.1.p0 ...
That the build "succeeded" despite of the error is due to a subtle bug in spkginstall:
... check_error() { if [[ $? ne 0 ]]; then echo >&2 "***********************************************************" echo >&2 "Error:" $@ echo >&2 "***********************************************************" exit 1 fi } ... echo "Now installing the Maxima library as '$ECLLIB/maxima.fas'..." cp f maxima.fasb "$ECLLIB/maxima.fas" check_error "Failed to install '`pwd`/maxima.fasb' as '$ECLLIB/maxima.fas'." ...
The exit status ($?) tested in check_error() is that of `pwd`, not the one we're interested in, namely that of cp.
comment:25 in reply to: ↑ 23 Changed 2 years ago by leif
Replying to dimpase:
Replying to leif:
Ok, now the build "succeeded", although I get:
Now installing the Maxima library as '$SAGE_ROOT/local/lib/ecl//maxima.fas'... cp: cannot stat `maxima.fasb': No such file or directoryas far as I understand, the name might have changed, due to asdf changes in ECL.
It might be maximasystem.* rather than maxima.*
I do have $SPKG_BUILD_DIR/src/src/maxima.system.fasb (i.e., with a period rather than a hyphen).
comment:26 followup: ↓ 27 Changed 2 years ago by jpflori
The fact that this spkg would not install the maxima library (and the error was undetected) was expected.
That is what I meant by "build with latest ECL".
And thanks for finding out why the error was undetected!!!
And yes the new library file is the maxima.system.fasb.
See
http://sourceforge.net/mailarchive/message.php?msg_id=30232028
I've not replied yet but I don't think we need to ask more work from upstream adsfbundle.
We'll just change the filename in spkginstall.
The makeinfo thing reminds me of something.
It should definitely not be required.
I think the solution was to touch some files, but I guess something changed in Maxima and the file we touch are not sufficient now.
comment:27 in reply to: ↑ 26 ; followup: ↓ 28 Changed 2 years ago by leif
Replying to jpflori:
The fact that this spkg would not install the maxima library (and the error was undetected) was expected.
That is what I meant by "build with latest ECL".
?
And thanks for finding out why the error was undetected!!!
And yes the new library file is the maxima.system.fasb.
See
http://sourceforge.net/mailarchive/message.php?msg_id=30232028
I've not replied yet but I don't think we need to ask more work from upstream adsfbundle.
We'll just change the filename in spkginstall.
I just manually copied maxima.system.fasb to $SAGE_LOCAL/lib/ecl/maxima.fas, hoping that this was correct. (Currently running ptestlong with Sage 5.5.rc0 on Ubuntu 10.04.4 x86, i.e., an old Pentium4 with currently just 1 GB RAM, which will take ages...)
Or should we keep the new name (.fas or .fasb?), probably having to make changes elsewhere?
The makeinfo thing reminds me of something.
It should definitely not be required.
I think the solution was to touch some files, but I guess something changed in Maxima and the file we touch are not sufficient now.
Presumably yes, I was thinking of the same... (Although IMHO configure should have checked whether makeinfo is available in advance, in order to eventually skip a few things later.)
Probably similar for some autotoolsgenerated files, although at least some of the warnings were present in previous spkg logs as well. (I personally don't mind, but these may annoy a few users actually reading or grepping the logs, or watching the build process... We occasionally get "needless" questions regarding such on the IRC.)
comment:28 in reply to: ↑ 27 Changed 2 years ago by jpflori
Replying to leif:
Replying to jpflori:
The fact that this spkg would not install the maxima library (and the error was undetected) was expected.
That is what I meant by "build with latest ECL".
?
I mean the fact that the produced file for Maxima in Lisp libary mode is no longer maxima.fasb but maxima.system.fasb and its not because of the updated Maxima, but of the updated ECL.
And thanks for finding out why the error was undetected!!!
And yes the new library file is the maxima.system.fasb.
See
http://sourceforge.net/mailarchive/message.php?msg_id=30232028
I've not replied yet but I don't think we need to ask more work from upstream adsfbundle.
We'll just change the filename in spkginstall.
I just manually copied maxima.system.fasb to $SAGE_LOCAL/lib/ecl/maxima.fas, hoping that this was correct. (Currently running ptestlong with Sage 5.5.rc0 on Ubuntu 10.04.4 x86, i.e., an old Pentium4 with currently just 1 GB RAM, which will take ages...)
Or should we keep the new name (.fas or .fasb?), probably having to make changes elsewhere?
I thing we keep maxima.fas as the name of the file in the Sage library ($SAGE_???/lib/ecl/).
The makeinfo thing reminds me of something.
It should definitely not be required.
I think the solution was to touch some files, but I guess something changed in Maxima and the file we touch are not sufficient now.
Presumably yes, I was thinking of the same... (Although IMHO configure should have checked whether makeinfo is available in advance, in order to eventually skip a few things later.)
Probably similar for some autotoolsgenerated files, although at least some of the warnings were present in previous spkg logs as well. (I personally don't mind, but these may annoy a few users actually reading or grepping the logs, or watching the build process... We occasionally get "needless" questions regarding such on the IRC.)
comment:29 Changed 2 years ago by leif
P.S.: The new Maxima (and/or ECL) seems to [somehow^{TM}] fix #13831...
comment:30 in reply to: ↑ 21 ; followup: ↓ 31 Changed 2 years ago by fbissey
Replying to leif:
The Maxima spkg fails to build for me because makeinfo is missing... :)
I had fixed that in a previous spkg. One file needed touching. The doc is ready for dispatch but one of the source file is regenerated which triggers rebuild.
comment:31 in reply to: ↑ 30 Changed 2 years ago by kcrisman
The Maxima spkg fails to build for me because makeinfo is missing... :)
I had fixed that in a previous spkg. One file needed touching. The doc is ready for dispatch but one of the source file is regenerated which triggers rebuild.
Yeah, that sounded familiar to me too.
comment:32 in reply to: ↑ 17 ; followups: ↓ 34 ↓ 40 Changed 2 years ago by leif
Replying to fbissey:
Doing some tests with ecl 12.2.1+maxima 5.29.1 right now. I assume the target will be 12.12.1 /5.29.1 and enabling unicode in ecl if possible. Anyway I have a nasty
sage t long verbose "devel/sagemain/sage/symbolic/integration/integral.py" # Killed/crashedProbably ecl/maxima rather than pure maxima it goes in a panic
;;; ;;; Stack overflow. ;;; Jumping to the outermost toplevel prompt ;;;for quite a bit before getting killed.
On Ubuntu 10.04.4 x86 (Pentium4; FSF GCC 4.7.2, with march=native and O3, FWIW) I get slightly more than 23,000 instances (exact number varies) of
;;; ;;; Detected access to protected memory, also kwown as 'bus or segmentation fault'. ;;; Jumping to the outermost toplevel prompt ;;;
and finally
Segmentation fault [56.5 s] ... The following tests failed: sage t long force_lib devel/sage/sage/symbolic/integration/integral.py # 0 doctests failed  Total time for all tests: 66.3 seconds
(with ./sage tp 1 long ...; with make ptestlong, the test was said to have timed out).
P.S.: The "kwown" is not a copypaste accident. Probably some ECL idiom, like "outermost toplevel"'... ;)
comment:33 followup: ↓ 42 Changed 2 years ago by leif
The other failing doctests seem to be the same you already reported:
The following tests failed: sage t long force_lib devel/sage/sage/calculus/calculus.py # 2 doctests failed sage t long force_lib devel/sage/sage/functions/exp_integral.py # 1 doctests failed sage t long force_lib devel/sage/sage/interfaces/maxima_abstract.py # 2 doctests failed sage t long force_lib devel/sage/sage/interfaces/maxima_lib.py # 2 doctests failed sage t long force_lib devel/sage/sage/misc/functional.py # 1 doctests failed
Not sure whether you also get
sage t long force_lib devel/sage/sage/functions/exp_integral.py ********************************************************************** File "$SAGE_ROOT/devel/sagemain/sage/functions/exp_integral.py", line 1074: sage: integrate(sinh_integral(x), x, 0, 0.5).n() # incorrect! Expected: 0.125872409703453 + 1.57079632679490*I Got: 0.125872409703453 ********************************************************************** 1 items had failures: 1 of 18 in __main__.example_31 ***Test Failed*** 1 failures.
comment:34 in reply to: ↑ 32 ; followup: ↓ 35 Changed 2 years ago by leif
Replying to leif:
Replying to fbissey:
I have a nasty
sage t long verbose "devel/sagemain/sage/symbolic/integration/integral.py" # Killed/crashedProbably ecl/maxima rather than pure maxima it goes in a panic
;;; ;;; Stack overflow. ;;; Jumping to the outermost toplevel prompt ;;;for quite a bit before getting killed.
On Ubuntu 10.04.4 x86 (Pentium4; FSF GCC 4.7.2, with march=native and O3, FWIW) I get slightly more than 23,000 instances (exact number varies) of
;;; ;;; Detected access to protected memory, also kwown as 'bus or segmentation fault'. ;;; Jumping to the outermost toplevel prompt ;;;and finally
Segmentation fault [56.5 s] ... The following tests failed: sage t long force_lib devel/sage/sage/symbolic/integration/integral.py # 0 doctests failed  Total time for all tests: 66.3 seconds(with ./sage tp 1 long ...; with make ptestlong, the test was said to have timed out).
The offending test seems to be
... Trying: f = abs(sin(x))###line 653:_sage_ >>> f = abs(sin(x)) Expecting nothing ok Trying: integrate(f, x, Integer(0), Integer(2)*pi) # long time (4s on sage.math, 2012)###line 654:_sage_ >>> integrate(f, x, 0, 2*pi) # long time (4s on sage.math, 2012) Expecting: integrate(abs(sin(x)), x, 0, 2*pi) ;;; ;;; Detected access to protected memory, also kwown as 'bus or segmentation fault'. ;;; Jumping to the outermost toplevel prompt ;;; ...
(provided the output is in sync, which is not always the case with verbose).
comment:35 in reply to: ↑ 34 Changed 2 years ago by leif
Replying to leif:
The offending test seems to be
... Trying: f = abs(sin(x))###line 653:_sage_ >>> f = abs(sin(x)) Expecting nothing ok Trying: integrate(f, x, Integer(0), Integer(2)*pi) # long time (4s on sage.math, 2012)###line 654:_sage_ >>> integrate(f, x, 0, 2*pi) # long time (4s on sage.math, 2012) Expecting: integrate(abs(sin(x)), x, 0, 2*pi) ;;; ;;; Detected access to protected memory, also kwown as 'bus or segmentation fault'. ;;; Jumping to the outermost toplevel prompt ;;; ...(provided the output is in sync, which is not always the case with verbose).
Yep,
sage: f = abs(sin(x)) sage: integrate(f, x, 0, 2*pi)
behaves exactly the same, i.e., the interpreter "exits" with a segmentation fault, after thousands of "Detected access to protected memory ..." messages.
(Sage's own signal handler doesn't get called.)
comment:36 Changed 2 years ago by leif
P.S.: That's the only test that fails in .../symbolic/integration/integral.py (i.e., all other tests pass if I comment it out).
comment:37 followup: ↓ 38 Changed 2 years ago by fbissey
Do we know the expression that get passed to maxima? I would check a direct call to maxima and possibly a couple of lisp to check it is not actually a lisp fault.
comment:38 in reply to: ↑ 37 ; followups: ↓ 41 ↓ 53 Changed 2 years ago by leif
Replying to fbissey:
Do we know the expression that get passed to maxima? I would check a direct call to maxima and possibly a couple of lisp to check it is not actually a lisp fault.
Well, using the Maxima library segfaults.
I'm not at all familiar with Maxima, but
Maxima 5.29.1 http://maxima.sourceforge.net using Lisp ECL 12.12.1 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) integrate(abs(sin(x)),x,0,2*pi); 2 pi / [ (%o1) I abs(sin(x)) dx ] / 0 (%i2) display2d : false$ (%i3) integrate(abs(sin(x)),x,0,2*pi); (%o3) 'integrate(abs(sin(x)),x,0,2*pi) (%i4)
FWIW.
comment:39 Changed 2 years ago by dimpase
I tried the spkg, and I needed to modify it as follows
diff r 31ff16046f0b spkginstall  a/spkginstall Fri Dec 14 19:46:53 2012 +0100 +++ b/spkginstall Sun Dec 16 15:13:21 2012 +0800 @@ 110,7 +110,7 @@ ECLLIB=`ecl eval "(princ (SI:GETLIBRARYPATHNAME))" eval "(quit)"` echo echo "Now installing the Maxima library as '$ECLLIB/maxima.fas'..." cp f maxima.fasb "$ECLLIB/maxima.fas" +cp f maxima.system.fasb "$ECLLIB/maxima.fas" check_error "Failed to install '`pwd`/maxima.fasb' as '$ECLLIB/maxima.fas'."
to get it installed.
I can confirm the trouble with integrate(abs(sin(x))). It's in the library interface, I reckon.
comment:40 in reply to: ↑ 32 Changed 2 years ago by dimpase
Replying to leif:
On Ubuntu 10.04.4 x86 (Pentium4; FSF GCC 4.7.2, with march=native and O3, FWIW) I get slightly more than 23,000 instances (exact number varies) of
;;; ;;; Detected access to protected memory, also kwown as 'bus or segmentation fault'. ;;; Jumping to the outermost toplevel prompt ;;;
this comes from ECL, namely, from handler_fn_prototype in src/src/c/unixint.d.
comment:41 in reply to: ↑ 38 ; followup: ↓ 44 Changed 2 years ago by fbissey
Replying to leif:
Replying to fbissey:
Do we know the expression that get passed to maxima? I would check a direct call to maxima and possibly a couple of lisp to check it is not actually a lisp fault.
Well, using the Maxima library segfaults.
I'm not at all familiar with Maxima, but
Maxima 5.29.1 http://maxima.sourceforge.net using Lisp ECL 12.12.1 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) integrate(abs(sin(x)),x,0,2*pi); 2 pi / [ (%o1) I abs(sin(x)) dx ] / 0 (%i2) display2d : false$ (%i3) integrate(abs(sin(x)),x,0,2*pi); (%o3) 'integrate(abs(sin(x)),x,0,2*pi) (%i4)FWIW.
Which according to the doctest is pretty much what we expect. Trying with clisp give exactly the same result. Problem at the library interface is a good candidate.
comment:42 in reply to: ↑ 33 Changed 2 years ago by fbissey
Replying to leif:
The other failing doctests seem to be the same you already reported:
The following tests failed: sage t long force_lib devel/sage/sage/calculus/calculus.py # 2 doctests failed sage t long force_lib devel/sage/sage/functions/exp_integral.py # 1 doctests failed sage t long force_lib devel/sage/sage/interfaces/maxima_abstract.py # 2 doctests failed sage t long force_lib devel/sage/sage/interfaces/maxima_lib.py # 2 doctests failed sage t long force_lib devel/sage/sage/misc/functional.py # 1 doctests failedNot sure whether you also get
sage t long force_lib devel/sage/sage/functions/exp_integral.py ********************************************************************** File "$SAGE_ROOT/devel/sagemain/sage/functions/exp_integral.py", line 1074: sage: integrate(sinh_integral(x), x, 0, 0.5).n() # incorrect! Expected: 0.125872409703453 + 1.57079632679490*I Got: 0.125872409703453 ********************************************************************** 1 items had failures: 1 of 18 in __main__.example_31 ***Test Failed*** 1 failures.
I get all of these and that last doctest is actually a good thing^{TM} from the file
Note that due to some problems with the way Maxima handles these expressions, definite integrals can sometimes give unexpected results (typically when using inexact endpoints) due to inconsistent branching:: sage: integrate(sinh_integral(x), x, 0, 1/2) cosh(1/2) + 1/2*sinh_integral(1/2) + 1 sage: integrate(sinh_integral(x), x, 0, 1/2).n() # correct 0.125872409703453 sage: integrate(sinh_integral(x), x, 0, 0.5).n() # incorrect! 0.125872409703453 + 1.57079632679490*I
One problem may be fixed here.
comment:43 in reply to: ↑ 21 ; followup: ↓ 45 Changed 2 years ago by fbissey
Replying to leif:
The Maxima spkg fails to build for me because makeinfo is missing... :)
Do you have a log for that? I'd like to pinpoint the file(s) that cause this, this time around.
comment:44 in reply to: ↑ 41 Changed 2 years ago by dimpase
Replying to fbissey:
[...]
Which according to the doctest is pretty much what we expect. Trying with clisp give exactly the same result. Problem at the library interface is a good candidate.
I checked that the new ECL is (probably) not guilty, as this example with Maxima 5.26.0 works as expected.
comment:45 in reply to: ↑ 43 Changed 2 years ago by leif
comment:46 Changed 2 years ago by leif
Hmmm, I was probably quicker (but I'm leaving it up to you to fix this! :) ):
# Touching html and info files to avoid to regenerate them. # This must be done after configuration since the timestamps need # to be later than includemaxima.texi which is generated at # configuration time: for i in doc/info/*.html ; do touch "${i}" done touch doc/info/maxima.info*
... config.status: creating doc/info/Makefile config.status: creating doc/info/includemaxima.texi config.status: creating doc/info/de/Makefile ...
(The TeXinfo file is created twice, since config.status gets run when building Maxima as well.)
There are also
maxima5.29.1.p0/src/interfaces/xmaxima/doc/xmaxima.info maxima5.29.1.p0/src/interfaces/emacs/imaxima/imaxima.info
so we should perhaps use
touch `find doc/info name \*.info\*`
or
find doc/info name \*.info\* exec touch {} \;
Using name \*.info\* o name \*.html in a single statement (instead of the forloop) would also make sense.
comment:47 Changed 2 years ago by leif
P.S.: Now that I've read the comment in spkginstall... We probably have to "patch" config.status after configuring Maxima, to avoid "recreation" of the TeXinfo file.
comment:48 followups: ↓ 49 ↓ 51 Changed 2 years ago by leif
Back to integration:
Did anyone try using cos() instead? After apparently "deep thinking", I for example get:
sage: integrate(abs(cos(x)),x,0,pi) 1 sage: integrate(abs(cos(x)),x,0,2*pi) 0 sage: integrate(abs(cos(x)),1/2*pi,3/2*pi) 2
Unless I'm missing something...
comment:49 in reply to: ↑ 48 ; followup: ↓ 50 Changed 2 years ago by leif
Replying to leif:
Back to integration:
Did anyone try using cos() instead? After apparently "deep thinking", I for example get:
sage: integrate(abs(cos(x)),x,0,pi) 1 sage: integrate(abs(cos(x)),x,0,2*pi) 0 sage: integrate(abs(cos(x)),1/2*pi,3/2*pi) 2Unless I'm missing something...
Just noticed Sage 5.4 gives the same results.
comment:50 in reply to: ↑ 49 Changed 2 years ago by leif
Replying to leif:
Replying to leif:
Back to integration:
Did anyone try using cos() instead? After apparently "deep thinking", I for example get:
sage: integrate(abs(cos(x)),x,0,pi) 1 sage: integrate(abs(cos(x)),x,0,2*pi) 0 sage: integrate(abs(cos(x)),1/2*pi,3/2*pi) 2Unless I'm missing something...
Just noticed Sage 5.4 gives the same results.
In contrast:
  Sage Version 4.7.2, Release Date: 20111029   Type notebook() for the GUI, and license() for information.   sage: integrate(abs(sin(x)),x,0,2*pi) 0 sage: integrate(abs(cos(x)),x,0,2*pi) integrate(abs(cos(x)), x, 0, 2*pi) sage: integrate(abs(cos(x)),x,0,pi) integrate(abs(cos(x)), x, 0, pi) sage: integrate(abs(cos(x)),x,1/2*pi,3/2*pi) integrate(abs(cos(x)), x, 1/2*pi, 3/2*pi)
(Same for Sage 4.8.)
comment:51 in reply to: ↑ 48 Changed 2 years ago by dimpase
Replying to leif:
Back to integration:
Did anyone try using cos() instead? After apparently "deep thinking", I for example get:
sage: integrate(abs(cos(x)),x,0,pi) 1 sage: integrate(abs(cos(x)),x,0,2*pi) 0 sage: integrate(abs(cos(x)),1/2*pi,3/2*pi) 2Unless I'm missing something...
same for 5.1. So I suppose this is a bug in Maxima 5.26, which remained in 5.29. Oh dear. Both 5.26 and 5.29 give the following nonsense:
sage: from sage.symbolic.integration.external import maxima_integrator sage: g(x)=maxima_integrator(abs(cos(x)), x); g(x) ((2*sin(x)/((cos(x) + 1)*(sin(x)^2/(cos(x) + 1)^2 + 1))  1)*sgn(sin(x)/(cos(x) + 1)  1)  2)*sgn(sin(x)/(cos(x) + 1) + 1) sage: g(0) 1 sage: g.limit(x=pi) x > 0
This, indeed, one gets 1...
they also both "can" compute maxima_integrator(abs(sin(x)), x)...
sage: g(x)=maxima_integrator(abs(sin(x)), x); g(x) (2*sin(x)*arctan(sin(x)/(cos(x) + 1))/(cos(x) + 1)  log(2))*sgn(1/(cos(x) + 1))*sgn(sin(x)) + log(sin(x)^2/(cos(x) + 1)^2 + 1)*sgn(1/(cos(x) + 1))*sgn(sin(x))  log(2*sin(x)^2/(cos(x) + 1)^2 + 2)*sgn(1/(cos(x) + 1))*sgn(sin(x)) + 2*(sin(x)/((cos(x) + 1)*(sin(x)^2/(cos(x) + 1)^2 + 1)) + arctan(sin(x)/(cos(x) + 1)))*abs(sin(x))/abs(cos(x) + 1) sage: g(0) 0
comment:52 Changed 2 years ago by dimpase
see http://trac.sagemath.org/sage_trac/ticket/11483#comment:12 (this is where maxima's abs_integrate was added, to Sage 5.0).
comment:53 in reply to: ↑ 38 Changed 2 years ago by dimpase
Replying to leif:
Replying to fbissey:
Do we know the expression that get passed to maxima? I would check a direct call to maxima and possibly a couple of lisp to check it is not actually a lisp fault.
Well, using the Maxima library segfaults.
I'm not at all familiar with Maxima, but
Maxima 5.29.1 http://maxima.sourceforge.net using Lisp ECL 12.12.1 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) integrate(abs(sin(x)),x,0,2*pi); 2 pi / [ (%o1) I abs(sin(x)) dx ] / 0 (%i2) display2d : false$ (%i3) integrate(abs(sin(x)),x,0,2*pi); (%o3) 'integrate(abs(sin(x)),x,0,2*pi) (%i4)FWIW.
no, you need to load some stuff, as spelled out at maxima_lib.py:
init_code = ['display2d : false', 'domain : complex', 'keepfloat : true', 'load(to_poly_solver)', 'load(simplify_sum)', 'load(abs_integrate)']
In maxima, you type in
display2d : false; domain : complex; keepfloat : true; load(to_poly_solver); load(simplify_sum); load(abs_integrate); integrate(abs(sin(x)),x);
to get a symbolic answer. It's weird that the definite integral does not get computed, perhaps due to an uncaught error...
comment:54 followups: ↓ 55 ↓ 76 Changed 2 years ago by fbissey
An uncaught error?
Maxima 5.29.1 http://maxima.sourceforge.net using Lisp CLISP 2.48 (20090728) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) display2d : false; (%o1) false (%i2) domain : complex; (%o2) complex (%i3) keepfloat : true; (%o3) true (%i4) load(to_poly_solver); to_poly_solve: to_poly_solver.mac is obsolete; I'm loading to_poly_solve.mac instead. Loading maximagrobner $Revision: 1.6 $ $Date: 20090602 07:49:49 $ WARNING: DEFUN/DEFMACRO: redefining macro OPAPPLY in /usr/share/maxima/5.29.1/share/fourier_elim/fourier_elim.lisp, was defined in /usr/share/maxima/5.29.1/share/to_poly_solve/to_poly.lisp WARNING: DEFUN/DEFMACRO: redefining macro OPCONS in /usr/share/maxima/5.29.1/share/fourier_elim/fourier_elim.lisp, was defined in /scratch/portage/scimathematics/maxima5.29.1/work/maxima5.29.1/src/binaryclisp/nummod.fas WARNING: DEFUN/DEFMACRO: redefining function SIMPISREALP in /usr/share/maxima/5.29.1/share/to_poly_solve/to_poly_solve_extra.lisp, was defined in /usr/share/maxima/5.29.1/share/to_poly_solve/to_poly.lisp (%o4) "/usr/share/maxima/5.29.1/share/to_poly_solve/to_poly_solver.mac" (%i5) load(simplify_sum); (%o5) "/usr/share/maxima/5.29.1/share/solve_rec/simplify_sum.mac" (%i6) load(abs_integrate); (%o6) "/usr/share/maxima/5.29.1/share/contrib/integration/abs_integrate.mac" (%i7) integrate(abs(sin(x)),x); (%o7) 4*(abs(sin(x))*(atan(sin(x)/(cos(x)+1))/2 +sin(x)/((cos(x)+1)*(2*sin(x)^2/(cos(x)+1)^2+2))) /abs(cos(x)+1) (signum(1/(cos(x)+1))*signum(sin(x))*log(2*sin(x)^2/(cos(x)+1)^2+2) signum(1/(cos(x)+1))*signum(sin(x))*log(sin(x)^2/(cos(x)+1)^2+1) +signum(1/(cos(x)+1))*signum(sin(x)) *(2*sin(x)*atan(sin(x)/(cos(x)+1))/(cos(x)+1) log(2))) /4) (%i8)
Do you think that could be that obsolete module?
comment:55 in reply to: ↑ 54 Changed 2 years ago by dimpase
Replying to fbissey:
Do you think that could be that obsolete module?
no, it does not matter. It suffices to load abs_integrate only.
Actually, then I can reproduce
;;; ;;; Detected access to protected memory, also kwown as 'bus or segmentation fault'. ;;; Jumping to the outermost toplevel prompt ;;;
from within maxima (so no, the library interface does not matter!) if I try
integrate(abs(sin(x)),x,0,2*%pi);
What will you get with the CLISPbased maxima here?
If I try the same on 5.26.0 (from Sage 5.5.rc0 on OSX 10.6.8) , I don't get a segfault; I just get back an unevaluated integral, if I try definite integral, and I get the same (wrong) symbolic expression for the indefinite integral.
comment:56 followup: ↓ 58 Changed 2 years ago by fbissey
Do you mean doing this?
Maxima 5.29.1 http://maxima.sourceforge.net using Lisp CLISP 2.48 (20090728) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) load(abs_integrate); WARNING: DEFUN/DEFMACRO: redefining macro OPAPPLY in /usr/share/maxima/5.29.1/share/fourier_elim/fourier_elim.lisp, was defined in /usr/share/maxima/5.29.1/share/to_poly_solve/to_poly.lisp WARNING: DEFUN/DEFMACRO: redefining macro OPCONS in /usr/share/maxima/5.29.1/share/fourier_elim/fourier_elim.lisp, was defined in /scratch/portage/scimathematics/maxima5.29.1/work/maxima5.29.1/src/binaryclisp/nummod.fas WARNING: DEFUN/DEFMACRO: redefining function SIMPISREALP in /usr/share/maxima/5.29.1/share/to_poly_solve/to_poly_solve_extra.lisp, was defined in /usr/share/maxima/5.29.1/share/to_poly_solve/to_poly.lisp (%o1) /usr/share/maxima/5.29.1/share/contrib/integration/abs_integrate.mac (%i2) integrate(abs(sin(x)),x); sin(x) atan() cos(x) + 1 sin(x) abs(sin(x)) ( + ) 2 2 2 sin (x) (cos(x) + 1) ( + 2) 2 (cos(x) + 1) (%o2) 4 ( abs(cos(x) + 1) 2 1 2 sin (x)  (signum() signum(sin(x)) log( + 2) cos(x) + 1 2 (cos(x) + 1) 2 1 sin (x)  signum() signum(sin(x)) log( + 1) cos(x) + 1 2 (cos(x) + 1) sin(x) 2 sin(x) atan() 1 cos(x) + 1 + signum() signum(sin(x)) (  log(2)))/4) cos(x) + 1 cos(x) + 1 (%i3)
comment:57 Changed 2 years ago by fbissey
And i get the same thing with ecl in fact (all system maxima):
;;; Loading #P"/usr/lib64/ecl12.12.1/sbbsdsockets.fas" ;;; Loading #P"/usr/lib64/ecl12.12.1/sockets.fas" ;;; Loading #P"/usr/lib64/ecl12.12.1/defsystem.fas" ;;; Loading #P"/usr/lib64/ecl12.12.1/cmp.fas" Maxima 5.29.1 http://maxima.sourceforge.net using Lisp ECL 12.12.1 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) load(abs_integrate); (%o1) /usr/share/maxima/5.29.1/share/contrib/integration/abs_integrate.mac (%i2) integrate(abs(sin(x)),x); sin(x) atan() cos(x) + 1 sin(x) abs(sin(x)) ( + ) 2 2 2 sin (x) (cos(x) + 1) ( + 2) 2 (cos(x) + 1) (%o2) 4 ( abs(cos(x) + 1) 2 1 2 sin (x)  (signum() signum(sin(x)) log( + 2) cos(x) + 1 2 (cos(x) + 1) 2 1 sin (x)  signum() signum(sin(x)) log( + 1) cos(x) + 1 2 (cos(x) + 1) sin(x) 2 sin(x) atan() 1 cos(x) + 1 + signum() signum(sin(x)) (  log(2)))/4) cos(x) + 1 cos(x) + 1 (%i3)
comment:58 in reply to: ↑ 56 Changed 2 years ago by dimpase
Replying to fbissey:
Do you mean doing this?
I meant the definite integral, which causes the segfault for us:
integrate(abs(sin(x)),x,0,2*%pi);
comment:59 followup: ↓ 60 Changed 2 years ago by fbissey
OK didn´t spot the definite bit, fails also with clisp:
Maxima 5.29.1 http://maxima.sourceforge.net using Lisp CLISP 2.48 (20090728) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) load(abs_integrate); WARNING: DEFUN/DEFMACRO: redefining macro OPAPPLY in /usr/share/maxima/5.29.1/share/fourier_elim/fourier_elim.lisp, was defined in /usr/share/maxima/5.29.1/share/to_poly_solve/to_poly.lisp WARNING: DEFUN/DEFMACRO: redefining macro OPCONS in /usr/share/maxima/5.29.1/share/fourier_elim/fourier_elim.lisp, was defined in /scratch/portage/scimathematics/maxima5.29.1/work/maxima5.29.1/src/binaryclisp/nummod.fas WARNING: DEFUN/DEFMACRO: redefining function SIMPISREALP in /usr/share/maxima/5.29.1/share/to_poly_solve/to_poly_solve_extra.lisp, was defined in /usr/share/maxima/5.29.1/share/to_poly_solve/to_poly.lisp (%o1) /usr/share/maxima/5.29.1/share/contrib/integration/abs_integrate.mac (%i2) integrate(abs(sin(x)),x,0,2*%pi); ***  Program stack overflow. RESET [../src/eval.d:573] reset() found no driver frame (sp=0x7fff1606f4300x7fff160690b0) Exiting on signal 6 Aborted
comment:60 in reply to: ↑ 59 Changed 2 years ago by dimpase
comment:61 Changed 2 years ago by dimpase
 Report Upstream changed from N/A to Not yet reported upstream; Will do shortly.
comment:62 followup: ↓ 63 Changed 2 years ago by fbissey
I am not sure about the usual procedure favored by maxima people. A message on their mailing list or straight to sourceforge bugtracker? I am also not sure how to title the report.
comment:63 in reply to: ↑ 62 ; followup: ↓ 68 Changed 2 years ago by dimpase
Replying to fbissey:
I am not sure about the usual procedure favored by maxima people. A message on their mailing list or straight to sourceforge bugtracker? I am also not sure how to title the report.
OK, I'll take care of this.
comment:64 Changed 2 years ago by dimpase
 Cc nbruin added
 Report Upstream changed from Not yet reported upstream; Will do shortly. to Reported upstream. No feedback yet.
Reported as maxima's bug 2520.
comment:65 followup: ↓ 72 Changed 2 years ago by jpflori
I think the makeinfo problem is my fault, I did not preserved timestamps when updating the src directory and I think this triggers the regeneration of some autocrap and finally lead to running a second time config.status.
I'm reuploading a proper spkg in a few minutes.
comment:66 followup: ↓ 69 Changed 2 years ago by jpflori
New spkg which should install properly with ECL 12.12.1 from #13324, should not need makeinfo as well.
comment:67 Changed 2 years ago by jpflori
makeinfo is still invoked, too bad.
comment:68 in reply to: ↑ 63 Changed 2 years ago by kcrisman
I am not sure about the usual procedure favored by maxima people. A message on their mailing list or straight to sourceforge bugtracker? I am also not sure how to title the report.
OK, I'll take care of this.
Just for future reference, bug tracker is best, but also putting something on the mailing list as a "heads up" doesn't hurt  but my experience is that the mailing list either gets lots of traction or none.
comment:69 in reply to: ↑ 66 Changed 2 years ago by kcrisman
comment:70 followup: ↓ 79 Changed 2 years ago by jpflori
I guess you can launch a ecl shell with sage ecl and then type (require :maxima).
This should not be affected by #9671.
comment:71 Changed 2 years ago by jpflori
Ok, I just copied pasted some of the above find command and modified it and did not think, and what happens is that the *.info* files are not touched.
So the fix is easy.
comment:72 in reply to: ↑ 65 ; followup: ↓ 78 Changed 2 years ago by leif
Replying to jpflori:
I think the makeinfo problem is my fault, I did not preserved timestamps when updating the src directory
Yeah, I also noticed that and made an spkg with "fresh" src/ (also spkgdist'ed), but only after I had already triggered a new build from scratch with the ECL and Maxima spkgs replaced, so haven't tested that yet.
IMHO all necessary files get touched, but as mentioned, the TeXinfo file gets recreated upon building as well.
comment:73 followup: ↓ 75 Changed 2 years ago by jpflori
With the just uploaded spkg, everything is correctly touched, timestamps are ok and makeinfo is not invoked.
So I guess that apart from fixing the doctests, and the Maxima upstream bug, everything looks rather ok.
comment:74 Changed 2 years ago by leif
Ok, building Sage 5.5.rc0 from scratch with the ECL and Maxima spkgs replaced, this time with GCC 4.4.3 and without setting any flags, gives exactly the same doctest errors (plus those due to not having applied the patch from #13324), including the famous access to protected memory messages.
(Haven't tried or looked at JP's new p0 yet.)
comment:75 in reply to: ↑ 73 Changed 2 years ago by leif
Replying to jpflori:
I guess that apart from fixing the doctests, and the Maxima upstream bug, everything looks rather ok.
Well, presumably we'll never merge a new Maxima without new known bugs (although fixing some old ones), probably even regressions, but I feel a bit uncomfortable with how symbolic integration (using the Maxima library interface) now fails, since Sage actually crashes (without itself catching the segfault).
(Others may say that's better than "silently" giving a wrong answer... ;) )
We could mark the doctest # not tested for now, but who knows where else similar can or will happen.
Thoughts?
comment:76 in reply to: ↑ 54 Changed 2 years ago by leif
Replying to fbissey:
... (%i4) load(to_poly_solver); to_poly_solve: to_poly_solver.mac is obsolete; I'm loading to_poly_solve.mac instead. ...
We should probably fix that in sage/interfaces/maxima_lib.py (in the init_code list), perhaps sage/calculus/calculus.py (where the code is commented out, and is there for explanation only, apparently), and in a couple of docstrings elsewhere (sage/symbolic/{expression,relation}.py*).
comment:77 Changed 2 years ago by leif
 Description modified (diff)
 Work issues changed from fix doctests, build with latest ECL, fix `spkginstall` to fix doctests
comment:78 in reply to: ↑ 72 Changed 2 years ago by leif
Replying to leif:
Replying to jpflori:
I think the makeinfo problem is my fault, I did not preserved timestamps when updating the src directory
Yeah, I also noticed that and made an spkg with "fresh" src/ (also spkgdist'ed), but only after I had already triggered a new build from scratch with the ECL and Maxima spkgs replaced, so haven't tested that yet.
IMHO all necessary files get touched, but as mentioned, the TeXinfo file gets recreated upon building as well.
Yes, that fixed the issue.
I used

spkginstall
diff git a/spkginstall b/spkginstall
a b 38 38 ./configure prefix="$SAGE_LOCAL" libdir="$SAGE_LOCAL/lib" enableecl 39 39 check_error "Failed to configure Maxima." 40 40 41 echo 41 42 # Touching html and info files to avoid to regenerate them. 42 43 # This must be done after configuration since the timestamps need 43 44 # to be later than includemaxima.texi which is generated at 44 45 # configuration time: 45 for i in doc/info/*.html ; do 46 touch "${i}" 46 echo "Touching some HTML and info files to avoid their regeneration..." 47 for f in doc/info/*.html doc/info/maxima.info*; do 48 echo " $f" 49 touch "$f" 47 50 done 48 touch doc/info/maxima.info*49 51 50 52 51 53 echo … … 108 110 check_error "Failed to build Maxima as an ECL library." 109 111 110 112 ECLLIB=`ecl eval "(princ (SI:GETLIBRARYPATHNAME))" eval "(quit)"` 113 src_dir=`pwd` 114 src_name="maxima.system.fasb" # This has changed from 'maxima.fasb'. 115 tgt_name="maxima.fas" 111 116 echo 112 echo "Now installing the Maxima library as '$ECLLIB/ maxima.fas'..."113 cp f maxima.fasb "$ECLLIB/maxima.fas"114 check_error "Failed to install ' `pwd`/maxima.fasb' as '$ECLLIB/maxima.fas'."117 echo "Now installing the Maxima library as '$ECLLIB/${tgt_name}'..." 118 cp f "${src_dir}/${src_name}" "$ECLLIB/${tgt_name}" 119 check_error "Failed to install '${src_dir}/${src_name}' as '$ECLLIB/${tgt_name}'." 115 120 116 121 117 122 if [[ "$SAGE_SPKG_INSTALL_DOCS" = yes ]] ; then
but JP's solution looks ok as well.
comment:79 in reply to: ↑ 70 Changed 2 years ago by kcrisman
Replying to jpflori:
I guess you can launch a ecl shell with sage ecl and then type (require :maxima).
This should not be affected by #9671.
$ ./sage ecl ECL (Embeddable CommonLisp) 12.12.1 (git:UNKNOWN) Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya Copyright (C) 1993 Giuseppe Attardi Copyright (C) 2000 Juan J. GarciaRipoll ECL is free software, and you are welcome to redistribute it under certain conditions; see file 'Copyright' for details. Type :h for Help. Top level. > (require :maxima) ;;; Loading #P"/home/newsagetest/sage5.5.rc0/local/lib/ecl/maxima.fas" ;;; Loading #P"/home/newsagetest/sage5.5.rc0/local/lib/ecl/sbbsdsockets.fas" ;;; Loading #P"/home/newsagetest/sage5.5.rc0/local/lib/ecl/sockets.fas" ("SBBSDSOCKETS" "SOCKETS" "MAXIMA") > (+ 2 2); 4
Though I didn't know how to run a Maxima command in this, the fact that no error was raised seems good.
comment:80 followup: ↓ 84 Changed 2 years ago by dimpase
 Report Upstream changed from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.
there is quite a bit of activity on maxima's tracker on the reported bug. There seem to be several(?) bugs triggered, not in abs_integrate package, but in the "core" maxima.
comment:81 Changed 2 years ago by leif
Anybody a clue where the extra question mark (in e.g. "Is a an ?integer?") may originate from?
I don't get it with sage maxima.
comment:82 followup: ↓ 83 Changed 2 years ago by jpflori
I guess the string produced by Maxima and the way it is treated before printing changed, so the way we do it in maxima_lib at the lisp level is not uptodate anymore?
comment:83 in reply to: ↑ 82 Changed 2 years ago by leif
Replying to jpflori:
I guess the string produced by Maxima and the way it is treated before printing changed, so the way we do it in maxima_lib at the lisp level is not uptodate anymore?
Ahem, yes, presumably... ;) [AFAICS the original retrieve function hasn't changed.]
I was wondering whether some nonprintable character (like ASCII BEL) gets mapped to a literal ?, but at least the position is strange, and e.g. "Is a positve, negative, or zero?" (note the [IMHO inconsistent] extra spaces) in contrast is just as before (at least on the Python level, i.e., the string passed with the exception, before we strip "ECL says: Maxima asks: ").
comment:84 in reply to: ↑ 80 Changed 2 years ago by dimpase
comment:85 Changed 2 years ago by dimpase
for the record, maxima 5.26.0 cannot do similar definite integrals involving abs, either:
(%i2) integrate(abs(cos(x)),x,0,2*%pi); log: encountered log(0). [...] (%o2) 0
comment:86 Changed 2 years ago by leif
 Dependencies changed from #13324 to #13860
comment:87 Changed 2 years ago by dimpase
 Description modified (diff)
added to the spkg patch (from Maxima bug tracker: a patch for bug 2520) gets rid of the segfaults on integrate(abs(sin(x)),x,0,2*pi) reported here.
comment:88 Changed 2 years ago by dimpase
There is a regression: maxima 5.29 (and 5.28) cannot compute integrate(sqrt(x + sqrt(x)), x). Reported as issue 2526 on Maxima's tracker. This leads to a doctest failure in maxima_lib.py (line 716).
comment:89 Changed 2 years ago by dimpase
 Description modified (diff)
 Status changed from new to needs_review
remaining doctest issues are due to extra ? characters appearing in Maxima library interactions in sage/calculus.py, such as
Is a an ?integer?
and
Is a an ?even?\ ?number?
instead of
Is a an integer?
and
Is a an even number?
This needs to be investigated, IMHO.
comment:90 followup: ↓ 91 Changed 2 years ago by dimpase
 Status changed from needs_review to needs_work
comment:91 in reply to: ↑ 90 Changed 2 years ago by dimpase
 Description modified (diff)
Replying to dimpase:
the spkg is updated to work with ECL 11.1.1, as well as with the new ECL 12.12. Doctests show that the ?integer? stuff does not go away if ECL 11.1.1 is used. So this is the new Maxima to blame for.
comment:92 followup: ↓ 93 Changed 2 years ago by dimpase
I'm doing git bisect on the Maxima repo to try to find the places to blame. It looks it was a long story, more than just a single change to undo. The first bad commit after the clean situation, as if in 5.26.0, is
4e2e7fb738e6f9f1955a5378ae392a1930b30bce Merge branch 'sharecleanupbranch201110'
Maxima identifies itself as Maxima 5.26.0_70_g4e2e7fb_dirty, and one gets
sage: var('a');assume(a>0);limit(x^a,x=0) a ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multiline string', (205, 187)) [...] RuntimeError: ECL says: THROW: The catch MACSYMAQUIT is undefined.
looking at the commit more carefully, one sees renaming to_poly_solver to to_poly_solve.
If I make this change in sage/interfaces/maxima_lib.py, line 142, the error go away. So in fact these ?integer? things got in later.
Back to git bisect now.
comment:93 in reply to: ↑ 92 Changed 2 years ago by dimpase
After some more git bisect, finally, it is here:
https://sourceforge.net/p/maxima/code/ci/f5e9b0f7eb122c4e48ea9df144dd57221e5ea0ca
to blame for ?integer?
It was meant to fix this, but Sage has it fixed already. I will post a patched spkg with this patch undone.
comment:94 Changed 2 years ago by dimpase
 Description modified (diff)
 Status changed from needs_work to needs_review
the update tested on Sage 5.5, and passes all the longtests (provided the doctests.patch is installed, of course). Needs review!
comment:95 followup: ↓ 97 Changed 2 years ago by kcrisman
I like this! Only issue is that now #13860 has been merged in the meantime, so possibly this should be based on that? Clearly some of the changes are identical (like the image removal, asdf compatibility), since Dima made both of them! Unsure also on how JP's changes should be handled... But I'm very reluctant to put "needs work" for such things either.
comment:96 Changed 2 years ago by kcrisman
 Status changed from needs_review to needs_info
 Work issues fix doctests deleted
This does work! Nicely done. "Needs info" for the whole spkg rebasing issue.
comment:97 in reply to: ↑ 95 ; followup: ↓ 98 Changed 2 years ago by dimpase
 Status changed from needs_info to needs_review
Replying to kcrisman:
I like this! Only issue is that now #13860 has been merged in the meantime, so possibly this should be based on that? Clearly some of the changes are identical (like the image removal, asdf compatibility), since Dima made both of them! Unsure also on how JP's changes should be handled... But I'm very reluctant to put "needs work" for such things either.
#13860 and this ticket are independent of each other. Indeed there is small parallelism in changes, but that's all.
comment:98 in reply to: ↑ 97 ; followup: ↓ 99 Changed 2 years ago by kcrisman
#13860 and this ticket are independent of each other. Indeed there is small parallelism in changes, but that's all.
I just meant in terms of the HG repository for this spkg, which would seem to indicate that one should base the p0 and p1 here on the p1 there.
comment:99 in reply to: ↑ 98 Changed 2 years ago by dimpase
Replying to kcrisman:
#13860 and this ticket are independent of each other. Indeed there is small parallelism in changes, but that's all.
I just meant in terms of the HG repository for this spkg, which would seem to indicate that one should base the p0 and p1 here on the p1 there.
I don't understand. Indeed, 5.26.0.p1 and 5.29.1.p1 are separate branches. So what?
comment:100 followup: ↓ 101 Changed 2 years ago by fbissey
Well I and other have chastised before for not staying on a single branch for a spkg. I would assume you will be told off too. Unless we just skip one of them.
comment:101 in reply to: ↑ 100 ; followup: ↓ 102 Changed 2 years ago by dimpase
Replying to fbissey:
Well I and other have chastised before for not staying on a single branch for a spkg. I would assume you will be told off too. Unless we just skip one of them.
I think this is pure bullshit in this case, about single branch. Let's deal with bullshit when/if it comes to it. If we are quick enough 5.26.0.p1 won't even get merged in any (stable) release.
comment:102 in reply to: ↑ 101 ; followup: ↓ 103 Changed 2 years ago by kcrisman
 Dependencies #13860 deleted
Well I and other have chastised before for not staying on a single branch for a spkg. I would assume you will be told off too. Unless we just skip one of them.
been chastised  just for those reading
I think this is pure bullshit in this case, about single branch. Let's deal with bullshit when/if it comes to it. If we are quick enough 5.26.0.p1 won't even get merged in any (stable) release.
Fair enough, in which case I'll remove that dependency, which leif introduced. Anyway, I can't review some of the more technical changes in JP's package, but the Sage side seems okay.
comment:103 in reply to: ↑ 102 Changed 2 years ago by kcrisman
I think this is pure bullshit in this case, about single branch. Let's deal with bullshit when/if it comes to it. If we are quick enough 5.26.0.p1 won't even get merged in any (stable) release.
Fair enough, in which case I'll remove that dependency, which leif introduced. Anyway, I can't review some of the more technical changes in JP's package, but the Sage side seems okay.
Actually, he had fewer changes than I thought. The change in Dima's package to deal with various names for the library was already positively reviewed at #13860. So... lookin' good. Shall we say positive review? It's certainly been tested quite a bit.
comment:104 Changed 2 years ago by zimmerma
 Cc zimmerma added
comment:105 followup: ↓ 106 Changed 2 years ago by zimmerma
a minor point: for the test in functional.py that (now) takes a long time, without the
long option, the variable t is not defined, and the test on
t.simplify_exp() fails with:
NameError: name 't' is not defined
Probably the t.simplify_exp() line should be commented with # long time too.
Otherwise all doctests pass on top of Sage 5.5, thus I would give a positive review, but since this ticket is quite long, I'm not sure...
Paul
comment:106 in reply to: ↑ 105 Changed 2 years ago by kcrisman
 Description modified (diff)
 Reviewers changed from KarlDieter Crisman, François Bissey, Leif Leonhardy to KarlDieter Crisman, François Bissey, Leif Leonhardy, Paul Zimmermann
 Status changed from needs_review to positive_review
Probably the t.simplify_exp() line should be commented with # long time too.
Great point, I've updated the patch.
Otherwise all doctests pass on top of Sage 5.5, thus I would give a positive review, but since this ticket is quite long, I'm not sure...
Let's do it and see what happens. At some point we have to try it, and it looks like it's been tested on Mac and several Linuces.
comment:107 followup: ↓ 109 Changed 2 years ago by fbissey
Well it works but I am not sure we should patch exp_integral.py this way. The old result was to demonstrate that something was broken. We should change the comment to reflect that is fixed or find another broken example. By comment I mean this bit:
Note that due to some problems with the way Maxima handles these expressions, definite integrals can sometimes give unexpected results (typically when using inexact endpoints) due to inconsistent branching::
That may be a bit pedantic however.
comment:108 followup: ↓ 110 Changed 2 years ago by jdemeyer
 Dependencies set to #13324
 Milestone changed from sage5.6 to sage5.7
comment:109 in reply to: ↑ 107 ; followup: ↓ 113 Changed 2 years ago by kcrisman
Replying to fbissey:
Well it works but I am not sure we should patch exp_integral.py this way. The old result was to demonstrate that something was broken. We should change the comment to reflect that is fixed or find another broken example. By comment I mean this bit:
Note that due to some problems with the way Maxima handles these expressions, definite integrals can sometimes give unexpected results (typically when using inexact endpoints) due to inconsistent branching::That may be a bit pedantic however.
No, that's a good point actually. Thanks for volunteering to ask the Maxima list for such an example :)
comment:110 in reply to: ↑ 108 ; followups: ↓ 111 ↓ 112 Changed 2 years ago by leif
Replying to jdemeyer:
This ticket doesn't depend on #13324, as now both Maxima versions (5.26.0.p1 from #13860, and the 5.29.1.p1 from here) can cope with the new as well as the old ASDF naming scheme.
But the dependency is probably some artificial one for the release process, some I'm leaving it as is...
comment:111 in reply to: ↑ 110 Changed 2 years ago by leif
comment:112 in reply to: ↑ 110 Changed 2 years ago by jdemeyer
 Dependencies #13324 deleted
comment:113 in reply to: ↑ 109 Changed 2 years ago by fbissey
Replying to kcrisman:
Replying to fbissey:
Well it works but I am not sure we should patch exp_integral.py this way. The old result was to demonstrate that something was broken. We should change the comment to reflect that is fixed or find another broken example. By comment I mean this bit:
Note that due to some problems with the way Maxima handles these expressions, definite integrals can sometimes give unexpected results (typically when using inexact endpoints) due to inconsistent branching::That may be a bit pedantic however.
No, that's a good point actually. Thanks for volunteering to ask the Maxima list for such an example :)
You are welcome, I guess :P
comment:114 followup: ↓ 115 Changed 2 years ago by jdemeyer
 Status changed from positive_review to needs_work
This spkg should be rebased to maxima5.26.0.p1, it is currently based on maxima5.26.0.p0.
comment:115 in reply to: ↑ 114 ; followup: ↓ 116 Changed 2 years ago by dimpase
Replying to jdemeyer:
This spkg should be rebased to maxima5.26.0.p1, it is currently based on maxima5.26.0.p0.
as far as I am concerned, maxima5.26.0.p1 may just as well die. It would cost me half an hour of fooling around with hg, with 0 benefit for anything.
comment:116 in reply to: ↑ 115 ; followup: ↓ 117 Changed 2 years ago by jdemeyer
comment:117 in reply to: ↑ 116 Changed 2 years ago by dimpase
Replying to jdemeyer:
Replying to dimpase:
0 benefit for anything.
So all the changes in #13860 were completely pointless then?
When I worked on #13860 it was not clear that the current ticket can be done so fast.
The changes on #13860 are all basically repeated, in a slightly different way, on this ticket. Due to our scheme of working on packages it wasn't trivial to properly merge the changes, so I just copy/pasted from source.
comment:118 followup: ↓ 121 Changed 2 years ago by jdemeyer
OK, I rebased. diff attached.
I also renamed spkgdist to spkgsrc since the former name should be reserved for scripts which create a spkg.
comment:119 Changed 2 years ago by jdemeyer
 Description modified (diff)
 Status changed from needs_work to needs_review
comment:120 Changed 2 years ago by jpflori
 Status changed from needs_review to positive_review
comment:121 in reply to: ↑ 118 ; followup: ↓ 122 Changed 2 years ago by dimpase
Replying to jdemeyer:
OK, I rebased. diff attached.
I also renamed spkgdist to spkgsrc since the former name should be reserved for scripts which create a spkg.
dank u wel!
comment:122 in reply to: ↑ 121 Changed 2 years ago by kcrisman
I also renamed spkgdist to spkgsrc since the former name should be reserved for scripts which create a spkg.
dank u wel!
Agreed!
comment:123 Changed 2 years ago by dimpase
I've opened #13973 to deal with including the latest upstream patches.
comment:124 Changed 2 years ago by kcrisman
Here are some tickets the current ticket should fix (i.e., they just need a patch to doctest it). Not that I've tried them, just that in theory they are in 5.29.1. Unfortunately, so far I only found these two...
comment:125 Changed 2 years ago by jdemeyer
 Merged in set to sage5.7.beta0
 Resolution set to fixed
 Status changed from positive_review to closed
From my test with 5.27.0 that will break a number of things.... The interface to a number of functions changed and requires extra arguments which throws things all over the place of course.