How to install Maxima on OS X

Stuart Schmitt
 
13 May 2009
first revision, 21 April 2008
original version, 10 January 2007


Updated introduction

The original goal of this page was to supply directions for installing Maxima on a computer running Mac OS XMaxima is a computer algebra system, much like the commercial packages Mathematica and Maple.  Previously, getting Maxima to work on Macs was a laborious process (see below).  Now the maintainers of the package supply a precompiled application for OS X.  I recommend using it.  Get it by downloading the “-MacOS” file from the Maxima download page.

You may still want to have a text-based maxima application available for use in a terminal.  If that is the case, I recommend simply installing a second copy in the unix directory tree.  To do that, follow steps 1–7 below, downloading only CMUCL and Maxima.

Below, I have left the old directions for building your own Maxima application, in case some unusual reason leads you to attempt it.  The portions concerned with installing GNUPlot and wxMaxima may no longer work.


Introduction

The purpose of this page is to provide step-by-step instructions for installing Maxima on a computer running Mac OS XMaxima is a computer algebra system, much like the commercial packages Mathematica and Maple.  It is a text-mode application, but there are two graphical interfaces for it—XMaxima and wxMaxima.  The former is simply text-mode Maxima in a GUI window, while the latter is a fully graphical implementation with inline plots and attractive rendering of mathematical type.  These instructions will guide you through installing all of the versions.

You will be downloading and compiling the source codes of the Maxima package and the modules it depends on.  Therefore, this web page assumes an intermediate knowledge of the UNIX command line.  Information about UNIX commands abounds on the Web; use a search engine to find instructive web pages if something below is unfamiliar.

These instructions have the following assumptions:
Instructions
  1. Download the following binaries (precompiled software packages).
  2. Download the following source code packages.
  3. Open up a Terminal window.  Change to the root user with the su command.  If you don't know what that means, look for information on the web.
  4. Install CMUCL.
    1. cd /usr/local
    2. tar xjf [full path to download directory]/cmucl-[build-date]-[platform]-darwin.tar.bz2

  5. Test the CMUCL installation.
    1. lisp
    2. If it reports bus error, you have probably installed the wrong version of CMUCL.  See the note above.
      If it entered Lisp, type (quit) and press enter.

  6. Extract the archives.
    1. cd [full path to download directory]
    2. Extract the files:
      • For .tar.gz files, execute tar xzf [filename].tar.gz
      • For .tar.bz2 files, execute tar xjf [filename].tar.bz2
      • For .zip files, execute unzip [filename].zip

  7. Install Maxima.  Some steps my take several minutes.
    1. cd maxima-[version]
    2. configure --with-cmucl=/usr/local/bin/lisp
    3. make
    4. make install
    5. cd ..

  8. Compile and install some of the auxiliary software packages.  For each of them, use the following steps:
    1. cd [package]-[version] (the directories you created in step 6)
    2. configure
    3. make
    4. make install
    5. cd ..
    For some of the packages, some steps may take several minutes.  Compile and install the software packages in precisely the following order:
    1. expat
    2. zlib
    3. libpng
    4. jpeg
    5. pdflib
    6. freetype
    7. fontconfig
    8. gd (for GD Library)
    9. SDL (for Simple DirectMedia Layer)

  9. Install AquaTerm.
    1. In the Finder, navigate to your download directory.
    2. Double-click on the AquaTerm[version].dmg file.
    3. Navigate to the newly mounted disk image.
    4. Double-click on the AquaTerm.pkg file.
    5. Follow the instructions in the familiar Apple installer.

  10. Install gnuplot (just like step 8).
    1. cd gnuplot-[version]
    2. configure
    3. make
    4. make install
    5. cd ..

  11. Install wxWidgets and disable the old version that was already on your computer.
    1. cd wxMac-[version]
    2. mkdir osx-build
    3. cd osx-build
    4. ../configure --disable-shared --enable-unicode --disable-webkit
    5. make
    6. make install
    7. mv /usr/bin/wx-config /usr/bin/wx-config-old
    8. cd ../..

  12. Configure wxMaxima for compilation.
    1. cd wxMaxima-[version]
    2. configure --enable-dnd --enable-printing --enable-unicode-glyphs
      If it fails to find wxWidgets, close your terminal window and open a new one.  Don’t forget to su and cd to the wxMaxima-[verison] directory.  Then try again.

  13. Fix a bug in the wxMaxima source code.  You must edit wxMaxima-[version]/src/wxMaximaFrame.cpp .  Change the line that reads
             wxImage(wxT("art/toolbar/input.png")),
    to read
             IMAGE("input.png"),
    If you cannot find this line, this bug was likely fixed in the version of wxMaxima that you downloaded.
  14. Compile wxMaxima.
    1. make
    2. make wxMaxima.app

  15. Tell Maxima to use gnuplot for plotting.  You will be creating an initialization script that gets called every time Maxima starts.
    1. exit (if you are still in su mode)
    2. cd ~
    3. mkdir .maxima
    4. cd .maxima
    5. Create a file maxima-init.mac with the following contents:
           gnuplot_command:"/usr/local/bin/gnuplot"$
           draw_command:"/usr/local/bin/gnuplot"$
           set_plot_option([gnuplot_term, aqua])$
           set_plot_option([gnuplot_pipes_term, aqua])$

  16. Install wxMaxima by using the Finder.  Navigate to the wxMaxima-[version] directory.  Drag the wxMaxima.app file to the Applications directory.
  17. Start wxMaxima by double-clicking wxMaxima.app.  If the large upper text area does not show a startup message, wxMaxima is not yet pointed at the Maxima engine.  Go to the wxMaxima menu and select Preferences.  In the text box labeled “Maxima program,” enter /usr/local/bin/maxima .

Installation is complete!

Text-mode Maxima may be accessed by running maxima from a terminal.  XMaxima may be run with the xmaxima command from an xterm window in Apple X11wxMaxima may be run by double-clicking it in the Finder.


Cleanup

If you're confident that Maxima is functioning correctly, you can delete the directories you created in step 6.  In terminal type rm -rf [directory], or simply use the Finder.


Credit

Much of the information on this page is derived from instructions for OS X on the wxMaxima web site, which is unfortunately somewhat incomplete.


Return to Stuart Schmitt's home page.