Maxima で綴る数学の旅

紙と鉛筆の代わりに、数式処理システムMaxima / Macsyma を使って、数学を楽しみましょう

-Android- Maxima-5.39.0をecl-16.1.3を使ってAndroid 7.0上で動かせた!

 

結構時間がかかったのですが、ここ3週間くらいで以下の作業を行いました。

時間がかかってしまったのにはいくつか大きな理由がありました。

  • 静的リンクで1つのファイルにしたかったのですが、コンパイル環境の設定がわからず悩みました。結局configureの引数に--disable-sharedを指定すると静的リンクになりました。
  • Maximaソースコードコンパイルして静的リンクをして、eclとmaximaが含まれるバイナリを作る方法がわからず悩みました。結局、lispのコアの部分のコンパイル処理の部分にlispのコアだけでなくmaximaのソースも加えてコンパイル、リンク処理をさせるようにしました。
  • 上記の変更を行うと、CLOSのメッソド結合関数が未定義だ、とエラーを吐いてビルドが止まってしまうのです。理由はlispコアのCLOSの定義にはcombin.lspが、maximaにはcombin.lispがあり、前者をコンパイルして出来たcombin.oを後者のコンパイル結果が書き潰していたのでした。

本日ようやく全部のコンパイル、リンク、エミュレータ上でのecl起動、maxima起動までたどり着きました。

 

iMac2F:ecl-16.1.3 yasube$ adb shell
generic_x86:/ $ cd /data/local/tmp
generic_x86:/data/local/tmp $ ./ecl --eval '(cl-user::run)'
;;; Warning: Maxima is unable to set up the help system.
(Details: CL-INFO::LOAD-PRIMARY-INDEX: Filesystem error with pathname #P"/Users/yasube/Programming2/maxima-5.39.0/doc/info/maxima-index.lisp".
Either
 1) the file does not exist, or
 2) we are not allowed to access the file, or
 3) the pathname points to a broken symbolic link.)

Warning: argument eval not recognized.
Maxima 5.39.0 http://maxima.sourceforge.net
using Lisp ECL 16.1.3
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) sum(1/n^2,n,1,inf);
                                   inf
                                   ====
                                   \     1
(%o1)                               >    --
                                   /      2
                                   ====  n
                                   n = 1
(%i2)