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:


$ 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: , ,

T-T-T-Triple Boot

Friday, January 18, 2008

I recently got my MacBook Pro to triple boot Leopard, Vista, and Fedora 8 x86_64 (since yes - the Intel Core 2 Duo is a 64-bit processor.)

The most comprehensive How-To that I came across was from onmac.net which worked for me except for a couple caveats. First you want to make sure that whatever version of linux you choose that you get the 64-bit version. Second, when creating your disk partitions using diskutil the how-to suggested:

sudo diskutil resizeVolume disk0s2 60G "Linux" "Linux" 17G "MS-DOS FAT32" "Windows" 15G


The diskutil that ships with Leopard doesn't know what format "Linux" is (and neither do I, maybe that means ext3?) but since you will be formatting that partition and further partitioning it when you get to the install step for linux you simply need to set it to something, it doesn't matter what. So instead try:

sudo diskutil resizeVolume disk0s2 60G "MS-DOS FAT32" "Linux" 17G "MS-DOS FAT32" "Windows" 15G


Third, I used rEFIt as my main boot loader and I didn't want to wait forever to boot into linux I set the timeout in my grub.conf to 0

Final note: Compiz-Fusion was fairly easy to get running this guy has a pretty good tutorial on how to do it.

Labels: , ,