Installing octave on Leopard
Sunday, January 20, 2008
Installing octave on Leopard is difficult because emacs is broken - wait what? If you're using darwinports to try and install octave which requires gnuplot which uses emacs in the build process, you're going to have a hard time. The error that I eventually got to after hours and hours of downloading an compiling was:
This is because one of the dependencies of octave was failing - gnuplot. Trying to install gnuplot by compiling from source confirmed this. I found a few postings to message boards and mailing lists but nothing useful until someone mentioned that this error indicated an error with emacs. Sure enough trying to invoke emacs from the command line produced:
Further digging produced a rather lengthy exchange on the Apple support forums, but more importantly a solution! Before trying the solution below, I also tried compiling emacs from source but to no avail so to get a functioning emacs on Leopard simply type:
And, viola! Now if you run
Now I just need to get readline working...
EDIT: Well after much MORE wrangling I was still unable to get octave to install using darwinports... or compile the source from the website, so I resorted to fink. I tried my best to avoid it, but now I have two command line software management packages on my laptop... to go with gem... and easy_install... In order to install octave using fink you need to enable the 'unstable' repositories and then it's just a matter of
$ sudo port install octave
...
(seriously it took forever)
...
Making all in lisp
emacs -batch -q -no-site-file -l ./dot.el -f batch-byte-compile gnuplot.el
Fatal malloc_jumpstart() error
make[2]: *** [gnuplot.elc] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
This is because one of the dependencies of octave was failing - gnuplot. Trying to install gnuplot by compiling from source confirmed this. I found a few postings to message boards and mailing lists but nothing useful until someone mentioned that this error indicated an error with emacs. Sure enough trying to invoke emacs from the command line produced:
$ emacs
Fatal malloc_jumpstart() error
Further digging produced a rather lengthy exchange on the Apple support forums, but more importantly a solution! Before trying the solution below, I also tried compiling emacs from source but to no avail so to get a functioning emacs on Leopard simply type:
$ sudo mv /usr/bin/emacs-i386 /usr/bin/emacs-i386.backup
$ sudo /usr/libexec/dumpemacs -d
$ emacs --version
$ emacs
And, viola! Now if you run
$sudo port install octave
again darwinports will pick up where it left off and eventually you'll come to the NEXT error: octave won't compile. >.< The reason it gave me was due to the lack of a suitable fortran compiler. Never fear, ATT labs has a binary for OS X.Now I just need to get readline working...
EDIT: Well after much MORE wrangling I was still unable to get octave to install using darwinports... or compile the source from the website, so I resorted to fink. I tried my best to avoid it, but now I have two command line software management packages on my laptop... to go with gem... and easy_install... In order to install octave using fink you need to enable the 'unstable' repositories and then it's just a matter of
$sudo fink install octave
Labels: mac, opensource, programming