Re: Segfault loading draw.lisp (GCL b ackend) — draw2d/draw3d/gr2d unusable on Debian/Ubunt u-packaged Maxima 5.49.0

Leo Butler <[email protected]>
Newsgroups gmane.comp.mathematics.maxima.general
Message-ID <[email protected]>
On Fri, Aug 21 2026, Jean-Michel Sarlat <[email protected]> wrote:

> Hi Robert, and everyone else who chimed in,
>
>  Thanks for the help — and to everyone who reported hitting the same
>  load(draw) segfault, that made the diagnosis much easier to trust.
>
>  These issues showed up while updating pmaxima (old script from the
> Syracuse site)
>  — a client/server setup, Maxima run persistently
>  via -s PORT rather than one-shot batch calls, which is where both of the
>  following surfaced.
>
> Tested on Maxima 5.49.0+dsfg-2 (Debian), GCL 2.7.1:
>
>  1. (mk:oos "draw" :compile) -> (mk:oos "draw" :load) in draw.lisp does
>      fix the segfault, but not durably: mk:defsystem recompiles whenever
>      the source is newer than the cached .o (package upgrade, or any local
>      edit), so the crash comes back. More robust: skip mk:defsystem/oos
>      entirely and load the four files directly:
>
>        (let ((dir (maxima-load-pathname-directory)))
>          (load (merge-pathnames (make-pathname :name "grcommon" :type
> "lisp") dir))
>          (load (merge-pathnames (make-pathname :name "gnuplot"  :type
> "lisp") dir))
>          (load (merge-pathnames (make-pathname :name "vtk"      :type
> "lisp") dir))
>          (load (merge-pathnames (make-pathname :name "picture"  :type
> "lisp") dir)))

Isn't it easier to install the build-essentials package?

>
>   2. With that fixed, draw2d(terminal=svg, ...) still failed:
>      "Cannot load input from '"/tmp/maxoutNNNNN.gnuplot"'" — even though
>      the file existed. Isolated independently of draw:
>
>        system("touch \"/tmp/foo.txt\"")
>
>      creates a file literally named "/tmp/foo.txt" (quotes included).
>      Maxima's system() under this GCL build doesn't strip escaped double
>      quotes before exec'ing. It hits draw because gnuplot.lisp's
>      file-output branch quotes the filename
>      (format nil "~a \"~a\"" $gnuplot_command gfn, two spots) — removing

Where are these commands? When I search share/draw/gnuplot.lisp and
src/gnuplot_def.lisp (HEAD), I can find none.

---

Btw, Yamwi re-defines the system command for {gcl,sbcl,ecl,clisp} in
order to smooth over several of the problems you might see like this
one. For the latter three, it uses `uiop/run-program:run-program', while
gcl needs to be special-cased.

Leo
_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.