Re: Segfault loading draw.lisp (GCL b ackend) — draw2d/draw3d/gr2d unusable on Debia n/Ubuntu-packaged Maxima 5.49.0
David Scherfgen via Maxima-discuss <[email protected]>
| Newsgroups | gmane.comp.mathematics.maxima.general |
|---|---|
| Message-ID | <CAMTHLKj5Y474wCu2G+PdYGZDxLgByQf-wH__Gk3Yw3K7aqMivg@mail.gmail.com> |
Is it possible that this was the bug where Maxima would accidentally load the binary compiled for an earlier Lisp version (in this case probably GCL 2.6.x)? Since these binaries are often incompatible across Lisp versions, this could cause the segfault observed. Deleting all cached binaries would fix it then. The bug is fixed in Maxima 5.50. Robert Dodier <[email protected]> schrieb am Mi., 19. Aug. 2026, 19:34: > Hi Jean-Michel, thanks for the bug report. > > The way it is supposed to work is that the draw package (and others > like it) is compiled once for each Maxima version and cached in > ~/.maxima/binary, and then those binary files are loaded for the > second and any later times. > > The draw package is compiled and loaded by a program, similar to > `make`, called defsystem. The makefile analogue is draw.system and it > is found in the folder share/draw somewhere in the Maxima > installation. > > As a workaround, I find that I can change (mk:oos "draw" :compile) to > (mk:oos "draw" :load) and then defsystem does not try to compile the > code and instead just loads the .lisp files instead, so that the code > is interpreted instead of compiled and executed. (Barring bugs in the > Lisp interpreter and/or compiler, which are rare but not impossible, > the observable behavior should be identical from the user's point of > view.) > > I find that after I make that change, then load("draw") provokes some > questions from defsystem, which I answered to tell defsystem not to > compile the Lisp files, as follows: > > $ sh maxima-local > Maxima branch_5_49_base_881_ga887ed816 https://maxima.sourceforge.io > using Lisp SBCL 2.1.0 > [...] > (%i1) load ("draw"); > ; - Binary file > > /Users/dodier/sourceforge/maxima-code/binary/branch_5_49_base_881_ga887ed816/sbcl/2_1_0/share/draw/grcommon.fasl > is old or does not exist. > ; Compile (and load) source file > /Users/dodier/sourceforge/maxima-code/share/draw/grcommon.lisp > instead? n > > ; - Should I bother you if this happens again? n > > ; - Should I compile while loading the system? n > > ; - Binary file > > /Users/dodier/sourceforge/maxima-code/binary/branch_5_49_base_881_ga887ed816/sbcl/2_1_0/share/draw/grcommon.fasl > does not exist. > ; Load source file > /Users/dodier/sourceforge/maxima-code/share/draw/grcommon.lisp > instead? y > > ; - Should I bother you if this happens again? n > (%o1) > /Users/dodier/sourceforge/maxima-code/share/draw/draw.lisp > > After that it looks like draw2d works as expected. > > I find the questions annoying but not really a problem. > > To avoid defsystem altogether, you can just load the Lisp files one by > one; draw.system shows there are just a few: > > load ("grcommon.lisp"); > load ("gnuplot.lisp"); > load ("vtk.lisp"); > load ("picture.lisp"); > > Although you were saying you don't want to switch Lisp > implementations, I would recommend that you reconsider -- my advice is > to work with SBCL + Maxima instead. There has just been a Maxima 5.50 > release -- my advice is to compile it from source code. Maxima is > compiled with a conventional configure / make / make install cycle. I > can say more if you are interested. > > Hope this helps, and thanks for your interest in Maxima. > > Robert > > > _______________________________________________ > Maxima-discuss mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > _______________________________________________ Maxima-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maxima-discuss