ぱたへね

はてなダイアリーはrustの色分けができないのでこっちに来た

LispWorksにMaximaをインストールする

Quicklisp を使うをみていたら、初期化ファイルの中でmaximaに関する記述がありました。LispWorksでも動きそうなのでやってみました。環境は64bit Windows7、LispWorks Professional Edition 5.1です。

まず、http://sourceforge.net/projects/maxima/files/Maxima-source/ からソースをダウンロードします。圧縮ファイルを展開した後、INSTALL.lispに書かれている事を順番にやっていきます。

ところが、 (maxima-compile) を実行すると、このように表示されコンパイルができません。

(		(Error:
Source file "c:\\home\\maxima\\maxima-5.24.0\\src\\share-subdirs.lisp" and binary file "\\home\\maxima\\maxima-5.24.0\\src\\binary-lispworks\\share-subdirs.ofasl" do not exist.
  1 (continue) Continue, ignoring missing files.
  2 (abort) Return to level 0.
  3 Return to top loop level 0.

Type :b for backtrace, :c <option number> to proceed,  or :? for other options))

webを検索してみましたが、share-subdirs.lispに関する問題はいくつか見つかります。今のバージョンでは、Webで見つかるパッチは全て適用されていて、今の問題は解決できませんでした。ただ、share-subdirs.lispファイルさえあれば問題がなさそうです。仕方が無いので、Windows上でCygwinを使ってshare-subdirs.lispを作成しました。Cygwinから、maximaディレクトリへ移動し、./configureを実行します。しばらくconfigureの様子を見ていると、config.status: creating src/share-subdirs.lisp と表示されるので、share-subdirs.lispが生成されたことがわかります。ファイルを確認したら、CygwinはコントロールCで止めても問題ありません。

share-subdirs.lispができれば、もう一度INSTALL.lispに書かれている手順で(configure)から実行すれば、最後までインストール出来ました。

share-subdirs.lispの中身はこうなっていますので、このままコピーしてshare-subdirs.lispをsrcディレクトリにおいても、うまくいくと思います。

;; -*- Mode: lisp -*-
;;
;; Setup the share-subdirs-list.  This is a list of each subdirectory
;; (basically) of share that contains code that can be run by maxima.
;;
;; A default version is checked in, but configure will update this
;; with the correct values.  The default checked in version is useful
;; if you're doing a lisp-only build without configure.  But configure
;; is the preferred way to build.
(in-package :maxima)

(defun share-subdirs-list ()
  '#.(remove-if-not
      #'stringp
      ;; DO NOT EDIT THIS LIST.  It is automatically
      ;; generated by configure.
      '(
"affine" "algebra" "algebra/charsets" "algebra/solver" "calculus" "cobyla" "cobyla/ex" "cobyla/lisp" "colnew" "colnew/lisp" "combinatorics" "contrib" "contrib/Grobner" "contrib/Zeilberger" "contrib/altsimp" "contrib/amatrix" "contrib/bitwise" "contrib/boolsimp" "contrib/descriptive" "contrib/diffequations" "contrib/diffequations/tests" "contrib/distrib" "contrib/ezunits" "contrib/finance" "contrib/format" "contrib/fourier_elim" "contrib/fractals" "contrib/fresnel" "contrib/gentran" "contrib/gentran/man" "contrib/gentran/test" "contrib/gf" "contrib/graphs" "contrib/integration" "contrib/levin" "contrib/lurkmathml" "contrib/maximaMathML" "contrib/mcclim" "contrib/namespaces" "contrib/noninteractive" "contrib/nset" "contrib/numericalio" "contrib/pdiff" "contrib/prim" "contrib/rand" "contrib/sarag" "contrib/simplex" "contrib/simplex/Tests" "contrib/solve_rec" "contrib/state" "contrib/stats" "contrib/stringproc" "contrib/unit" "contrib/vector3d" "diff_form" "diffequations" "draw" "dynamics" "hypergeometric" "integequations" "integration" "lapack" "lapack/blas" "lapack/lapack" "lbfgs" "linearalgebra" "macro" "matrix" "minpack" "minpack/lisp" "misc" "numeric" "orthopoly" "physics" "simplification" "sym" "tensor" "trigonometry" "utils" "vector" 
	)))