Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 30595 - maxima is broken
Summary: maxima is broken
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Science Related Packages
: 32641 (view as bug list)
Depends on:
Reported: 2003-10-07 12:07 UTC by Andreas Schwarz
Modified: 2005-08-17 03:01 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---

A fix for compilation problems when using clisp (maxima-5.9.0-gentoo.patch,460 bytes, patch)
2004-05-31 12:27 UTC, Jan Drugowitsch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schwarz 2003-10-07 12:07:45 UTC
Maxima seems to be completely broken.

Reproducible: Always
Steps to Reproduce:
1. ACCEPT_KEYWORDS="~x86" emerge clisp
2. emerge maxima
Actual Results:  
;; Loaded file
;; Datei /var/tmp/portage/maxima-5.9.0/work/maxima-5.9.0/src/maxima.system ...
;  - Compiling defsystem "maxima" 
;    - Loading module "package" 
;      - Loading source file "maxima-package.lisp" 
*** - REGEXP:REGEXP-COMPILE: keyword arguments in (T) should occur pairwise
0 Errors, 0 Warnungen
make[1]: *** [binary-clisp/maxima.mem] Fehler 1
make[1]: Leaving directory `/var/tmp/portage/maxima-5.9.0/work/maxima-5.9.0/src'
make: *** [all-recursive] Fehler 1

!!! ERROR: app-sci/maxima-5.9.0 failed.
!!! Function src_compile, Line 19, Exitcode 2
!!! (no error message)

I have to use clisp-2.31 because 2.29 doesn't compile (#30591).

When I try to emerge maxima-5.9.0-r2, I get the following message:

# emerge /usr/portage/app-sci/maxima/maxima-5.9.0-r2.ebuild 
Calculating dependencies \
!!! all ebuilds that could satisfy "dev-lisp/cmucl" have been masked.
!!!    (dependency required by "app-sci/maxima-5.9.0-r2" [ebuild])

!!! Error calculating dependencies. Please correct.
Comment 1 Patrick Kursawe (RETIRED) gentoo-dev 2003-10-24 03:27:04 UTC
I have no clue of LISP - maybe the experts can help here?
Comment 2 Donnie Berkholz (RETIRED) gentoo-dev 2003-11-10 00:34:32 UTC
*** Bug 32641 has been marked as a duplicate of this bug. ***
Comment 3 Matthew Kennedy (RETIRED) gentoo-dev 2003-11-10 07:41:55 UTC
For starters, it looks like the maxima ebuild in stable is depending on dev-lisp/cmucl
which is only in unstable at the moment.  I'd rather solve the build error
by moving clisp-2.31 into stable, however that involves moving several other
things into stable (common lisp controllers etc.)
Comment 4 Ian Monroe 2004-01-08 11:37:21 UTC

I still recieve the compile time errors on emerge maxima (I use x86). However, emerge maxima-5.9.0-r2.ebuild worked out fine. Perhaps it should be made x86 (instead of ~x86)? Is there still a reason not to? Considering that maxima-5.9.0 doesn't appear to work at all...
Comment 5 M. Edward Borasky 2004-01-17 10:56:26 UTC
I'm running into the same thing. I'm a Gentoo newbie, so please bear with me. I'm running on an Athlon T-bird and using the compile flags

CFLAGS="-march=athlon-tbird -O3 -funroll-loops -pipe"

maxima is maxima-5.9.0 and requires clisp. clisp is clisp-2.31-r1. I also have "cmucl" and "sbcl" installed, but I haven't attempted to make this work with either of them, mostly because I don't know how. I have all four (maxima, clisp, cmucl and sbcl) working on my Debian system, and I can go hunt down the exact configuration if that will shed any light on this.

Ed Borasky
Comment 6 M. Edward Borasky 2004-01-17 21:25:09 UTC
Versions on my (working) Debian (mostly testing) system:

maxima, xmaxima, maxima-doc, maxima-share, maxima-src, maxima-emacs, maxima-test: 5.9.0-18

clisp: 2.28-1

cmucl: 18e-8


What's really interesting is that I do *not* have GNU Common Lisp (GCL) installed, but when maxima comes up, it claims to be using GCL 2.6.1:

znmeb@DreamSong:~$ maxima
GCL (GNU Common Lisp)  (2.6.1) Thu Nov  6 16:23:13 UTC 2003
Licensed under GNU Library General Public License
Dedicated to the memory of W. Schelter

Use (help) to get some basic information on how to use GCL.
Maxima 5.9.0
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.

So I'm guessing the Debian binary maxima package carries its own (working) subset of GCL.
Comment 7 M. Edward Borasky 2004-01-18 22:26:36 UTC
More research:

I poked around in /var/tmp/portage/maxima-5.9.0/work/maxima-5.9.0 after the "emerge" croaked and found a file called "README.lisps" which says:
Preliminary notes on lisp implementations for Maxima:

clisp, CMUCL and GCL are fully supported by Maxima; previous versions
of Maxima only fully supported GCL. Ports to other ANSI lisps should
be straightforward and are welcome; please contact the developers if
you are interested in working on a port.

clisp <>, <>
        clisp includes GNU readline support, so Maxima will have
advanced command-line editing facilities when built with it.

clisp versions: Maxima will fail to build with 2.26 because of a bug
in clisp. 2.28 and 2.29 are known to work. There are currently
unresolved problems with floating point numbers in Maxima with clisp
2.30. 2.29 is recommended.

        CMUCL is the fastest option for Maxima on platforms where it
is available. Unfortunately, it does not include readline
support. However, readline support can be added by wrapping maxima
with the ledit executable. See
for ledit.

CMUCL versions: Maxima will build with CMUCL 18c, but will hang on
some run-time operations. 18d is known to work.

GCL <>
        GCL versions starting with 2.4.3 can be built with readline
support, so Maxima will have advanced command-line editing facilities
when build with it.

GCL versions: 2.4.4 and 2.5.0 should work. 2.5.0 has not yet been
released as of this writing. The cvs version of 2.5.0 has been used to
successfully build Maxima.
Given that my "preferred" LISP is CMUCL on Linux, because it is reputed to have the best compiler and it has more features supporting my algorithmic composition activities, I'm planning to download the raw maxima source from Sourceforge and building it using CMUCL. Perhaps the Gentoo maxima package should allow the user to pick which one of the three supported LISP environments is used; it's an option on the "configure" step.

Comment 8 M. Edward Borasky 2004-01-18 23:07:34 UTC
I have most of the answer. I downloaded maxima from Sourceforge. It is 5.9.0. I built it successfully with cmucl (dev-lisp/cmucl-18e-r1) and with gcl (dev-lisp/gcl-2.5.2). With clisp (dev-lisp/clisp-2.31-r1) it fails exactly the same way as described in the initial filing. So it's pretty clear to me that clisp-2.31-r1 is the culprit. I haven't tried any other versions of "clisp", and I don't have any contacts with the upstream folks for any of the LISP environments. 

Given that Debian builds maxima with gcl, I wonder if the easiest fix isn't to just repackage maxima depending on gcl instead of clisp. I'm still going to build my own copy with cmucl, now that I know it works. At some point I'll be pulling all the other LISP environments off the system, although I may keep clisp around for Windows compatibility (cmucl doesn't do Windows).
Comment 9 Matthew Kennedy (RETIRED) gentoo-dev 2004-01-19 22:36:09 UTC
how about clisp-2.32 (in ~arch atm)
Comment 10 Matthew Kennedy (RETIRED) gentoo-dev 2004-01-20 14:03:19 UTC
please try the maxima ebuild just unmasked in portage.  it should support any of clisp/sbcl/cmucl (not sure abou gcl).  not also, clisp-2.32 avaiable in portage.
Comment 11 Matthew Kennedy (RETIRED) gentoo-dev 2004-02-11 12:55:24 UTC
clisp 2.32 is now in stable
Comment 12 Andreas Schwarz 2004-02-12 11:40:46 UTC
# emerge clisp maxima
;; Datei /var/tmp/portage/maxima-5.9.0/work/maxima-5.9.0/src/maxima.system ...
;  - Compiling defsystem "maxima" 
;    - Loading module "package" 
;      - Loading source file "maxima-package.lisp" 
*** - REGEXP:REGEXP-COMPILE: keyword arguments in (T) should occur pairwise
0 Errors, 0 Warnungen
make[1]: *** [binary-clisp/maxima.mem] Fehler 1
make[1]: Leaving directory `/var/tmp/portage/maxima-5.9.0/work/maxima-5.9.0/src'
make: *** [all-recursive] Fehler 1

!!! ERROR: app-sci/maxima-5.9.0 failed.
!!! Function src_compile, Line 19, Exitcode 2
!!! (no error message)
Comment 13 Andreas Schwarz 2004-02-12 11:46:00 UTC
the maxima ebuild in stable doesn't work, 5.9.0-r2 unstable is ok.
Comment 14 Gilles Schintgen 2004-02-29 06:37:06 UTC
Well, it doesn't work for me. I tried 5.9.0 and 5.9.0-r2. Unfortunately I don't have that much time to investigate the matter, but here's some info:

Portage 2.0.50-r1 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.6.2)
System uname: 2.6.2 i686 AMD Athlon(tm) Processor
Gentoo Base System version
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.58
Automake: sys-devel/automake-1.7.8
CFLAGS="-march=athlon -O2 -pipe -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon -O2 -pipe -fomit-frame-pointer"
FEATURES="autoaddcvs ccache sandbox"
USE="3dnow X Xaw3d aalib acpi alsa apache2 apm arts avi bonobo cdr crypt cups dga directfb doc dvd emacs encode evo fbcon foomaticdb gb gd gif gnome gpm gstreamer gtk gtk2 imlib ipv6 java jikes jpeg kde libwww mad maildir mbox mmx motif mozilla mpeg ncurses oggvorbis opengl oss pam pdflib perl plotutils png qt quicktime readline sasl sdl slang spell ssl svga tcltk tcpd tetex tiff truetype videos wmf wxwindows x86 xml xml2 xmms xosd xv zlib"

And here are the different error messages I get:

# USE="-gnome -gtk -gtk2 -emacs clisp" ACCEPT_KEYWORDS="~x86" emerge maxima
Calculating dependencies ...done!
>>> emerge (1 of 1) app-sci/maxima-5.9.0-r2 to /
>>> md5 src_uri ;-) maxima-5.9.0.tar.gz
>>> Unpacking source...
>>> Unpacking maxima-5.9.0.tar.gz to /var/tmp/portage/maxima-5.9.0-r2/work
>>> Source unpacked.
creating cache ./config.cache
checking for a BSD compatible install... /bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking host system type... i686-pc-linux-gnu
checking for clisp... true
checking POSIX shell to see that it contains getopts... trying /bin/sh
POSIX shell is /bin/sh
updating cache ./config.cache
creating ./config.status
creating Makefile
creating maxima-local
creating xmaxima-local
creating maxima.spec
creating maxima.iss
creating src/Makefile
creating src/maxima
creating src/autoconf-variables.lisp
creating lisp-utils/Makefile
creating tests/Makefile
creating doc/Makefile
creating doc/emaxima/Makefile
creating doc/info/Makefile
creating doc/intromax/Makefile
creating doc/man/Makefile
creating doc/man/maxima.1
creating doc/share/Makefile
creating interfaces/Makefile
creating interfaces/emacs/Makefile
creating interfaces/emacs/emaxima/Makefile
creating interfaces/emacs/misc/Makefile
creating interfaces/xmaxima/Makefile
creating interfaces/xmaxima/autoconf-variables.tcl
creating interfaces/xmaxima/Tkmaxima/Header.tcl
creating interfaces/xmaxima/win32/Makefile
creating share/Makefile
creating demo/Makefile
creating plotting/Makefile

clisp enabled. Executable name: "clisp"
default lisp: clisp
wish executable name: "wish"
Making all in src
make[1]: Entering directory `/var/tmp/portage/maxima-5.9.0-r2/work/maxima-5.9.0/src'
LISPTYPE=clisp ; export LISPTYPE ;\
CLISP=clisp ; export CLISP ;\
../lisp-utils/maxima-run-lisp -i "../lisp-utils/defsystem" \
        -x '(funcall (intern "OPERATE-ON-SYSTEM" :mk) "maxima" :compile :verbose t)' && \
        ../lisp-utils/maxima-run-lisp -i "../lisp-utils/defsystem" \
        -x '(funcall (intern "OPERATE-ON-SYSTEM" :mk) "maxima" :load :verbose t)' \
         -f user::run -d binary-clisp/maxima
clisp -norc -q -x (progn (setq #+lisp=cl ext:*load-paths* #-lisp=cl lisp:*load-paths* '(#P"")) (let ((argv '())) (declare (ignorable argv)) (progn (load "../lisp-utils/defsystem") (funcall (intern "OPERATE-ON-SYSTEM" :mk) "maxima" :compile :verbose t)) (values)))
;; Loading file /var/tmp/portage/maxima-5.9.0-r2/work/maxima-5.9.0/lisp-utils/defsystem.lisp ...
;; Loaded file /var/tmp/portage/maxima-5.9.0-r2/work/maxima-5.9.0/lisp-utils/defsystem.lisp
;; Loading file /var/tmp/portage/maxima-5.9.0-r2/work/maxima-5.9.0/src/maxima.system ...
;  - Compiling defsystem "maxima"
;    - Loading module "package"
;      - Loading source file "maxima-package.lisp"
*** - REGEXP:REGEXP-COMPILE: keyword arguments in (T) should occur pairwise
0 errors, 0 warnings
make[1]: *** [binary-clisp/maxima.mem] Error 1
make[1]: Leaving directory `/var/tmp/portage/maxima-5.9.0-r2/work/maxima-5.9.0/src'
make: *** [all-recursive] Error 1

!!! ERROR: app-sci/maxima-5.9.0-r2 failed.
!!! Function src_compile, Line 41, Exitcode 2
!!! (no error message)

When I try to compile it with cmucl I get this:

# USE="-gnome -gtk -gtk2 -emacs cmucl" ACCEPT_KEYWORDS="~x86" emerge maxima
Calculating dependencies ...done!
>>> emerge (1 of 2) dev-lisp/cmucl-18e-r4 to /
>>> md5 src_uri ;-) cmucl_18e-8.tar.gz
>>> md5 src_uri ;-) cmucl-18e-x86-linux.tar.bz2
>>> Unpacking source...
>>> Unpacking cmucl_18e-8.tar.gz to /var/tmp/portage/cmucl-18e-r4/work
>>> Unpacking cmucl-18e-x86-linux.tar.bz2 to /var/tmp/portage/cmucl-18e-r4/work
 * Applying herald-save.lisp-gentoo.patch...                              [ ok ]
 * Applying install-clc.lisp-gentoo.patch...                              [ ok ]
>>> Source unpacked.
./build-tools/ target linux_gencgc x86  || true
./build-tools/ target || true
./build-tools/  target
./build-tools/ line 55: 11663 Segmentation fault      $LISP "$@" -noinit -nositeinit  <<EOF
(in-package :cl-user)

(setf (ext:search-list "target:")
      '("$TARGET/" "src/"))

(when (probe-file "target:bootstrap.lisp")
  (load "target:bootstrap.lisp"))

(load "target:setenv")

(pushnew :no-clx *features*)
(pushnew :no-clm *features*)
(pushnew :no-hemlock *features*)

(load "target:code/exports")
(load "target:tools/setup" :if-source-newer :load-source)
(comf "target:tools/setup" :load t)

(setq *gc-verbose* nil *interactive* nil)

(load "target:tools/worldcom")
#-(or no-compiler runtime) (load "target:tools/comcom")
;; Compile at least new-genesis, so that genesis doesn't take ages
#+(or no-compiler runtime) (comf "target:compiler/generic/new-genesis")
#-(or no-pcl runtime) (load "target:tools/pclcom")

(setq *gc-verbose* t *interactive* t)

(load "target:tools/worldbuild")

make: *** [all] Error 139

!!! ERROR: dev-lisp/cmucl-18e-r4 failed.
!!! Function src_compile, Line 42, Exitcode 2
!!! (no error message)

Ok, I should probably report that one for cmucl... But still, I can't emerge maxima, and unfortunately it's already for months like that :-(

I'll now try with gcl, but that'll be another large download on my 56k-line...
Any suggestions?
Comment 15 Gilles Schintgen 2004-02-29 10:14:41 UTC
Hmm, it worked alright with gcl. Still, the other two lisp-implementations didn't work.
Comment 16 Jan Drugowitsch 2004-05-31 12:26:21 UTC
I have found the following:
which made maxima-5.9.0-r2 compile on my pc with clisp 2.33.1

Explanations why clisp doesn't work is given in the above links,
I will attach a patch that can easily be added to the maxima ebuild.
Comment 17 Jan Drugowitsch 2004-05-31 12:27:56 UTC
Created attachment 32405 [details, diff]
A fix for compilation problems when using clisp
Comment 18 Petr Baudis 2005-02-01 10:31:16 UTC
Note that x86 maxima is STILL BROKEN after half a year. Please either integrate Jan Drugowitsch's patch to 5.9.0 (which seems to fix the problem; dunno if that's possible in portage's versioning) or make some newer fixed version stable.
Comment 19 M. Edward Borasky 2005-02-01 20:12:24 UTC
I have maxima 5.9.1-r1 running with all four available LISPs: clisp, cmucl, gcl and sbcl. All of my x86-ish boxes (Athlon XP, Athlon Tbird and PIII) have it running that way. I just checked the Maxima home page and 5.9.1 is the latest release (last fall). So 5.9.0 should most likely be abandoned. Are there any outstanding bugs against 5.9.1-r1?
Comment 20 Patrick Kursawe (RETIRED) gentoo-dev 2005-08-17 03:01:59 UTC
Since 5.9.0 isn't in portage any more, maybe we can mark this as closed.