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 X. Maxima 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 X. Maxima 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:
- The Apple Developer Tools must be installed. They were installed on my computer when it was manufactured.
- The libiconv library must be installed. It also came installed on my computer. I think I needed to install it manually on my previous computer, which ran OS X 10.3 (Panther).
- Tcl/tk must be installed. It is included in OS X 10.4 (Tiger), but it may need to be installed manually for older versions.
- The current directory is in your path. If it is not, when following the instructions below, type ./configure instead of simply configure.
- The directory /usr/local/bin is in your path.
Instructions
- Download the following binaries (precompiled software packages).
- CMUCL—the Carnegie Mellon Univertsity version of Common Lisp, which is the programming language that Maxima is written in. Navigate to a particular monthly build directory. Versions known to work as of this writing are 2007/11, 2008/03, and 2009/05. If you have an Intel Mac, download the “x86-darwin.tar.bz2” version; if you have a PowerPC Mac, download the “ppc-darwin.tar.bz2” version.
NOTES:
- Unless you plan on experimenting, use only versions of CMUCL listed above. Versions from December 2007 through February 2008 do not work. If you try a newer version, test as below in step 5. If it works, contact me.
- GNU CLISP works for Maxima and XMaxima, but not for wxMaxima. See instructions on installing Maxima with CLISP.
- GCL is quite popular in the Lisp programming community, but does not work at all for Maxima on OS X.
- AquaTerm—an application that allows for the display of plots produced by gnuplot, which a a helper application to XMaxima and wxMaxima. Download the “.dmg” file.
- Download the following source code packages.
- Maxima—Download “.tar.gz” archive of the source code of the latest version.
- Expat—an XML parser used by gnuplot.
- zlib—a compression library used by libpng. Do not download the “dll”; any one of the others is OK.
- libpng—a graphics library used by gnuplot. Download “libpng-[version].tar.gz” or “libpng-[version].tar.bz2” .
- jpeg—Download “jpegsrc.v6b.tar.gz” .
- libpdf
- FreeType (freetype2)—a font rasterization library used by gnuplot.
- fontconfig—a font configuration library used by gnuplot. Look at the main fontconfig page for the current version, then obtain it from the download page.
- GD Library (libgd)—a graphics library used by gnuplot. Download the version that is not an “RC” (release candidate).
- Simple DirectMedia Layer (libsdl)—a graphics library used by gnuplot. Under the “Download” heading, click “SDL [version]” . Download the “.tar.gz” source code.
- gnuplot—a plotting package used by XMaxima and wxMaxima. Download the “gnuplot-[version].tar.gz” file.
- wxWidgets (wxMac)—the GUI display library used by wxMaxima. You likely cannot use the old version that is installed on your computer by default.
- wxMaxima—the GUI frontend to Maxima.
- 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.
- Install CMUCL.
- cd /usr/local
- tar xjf [full path to download directory]/cmucl-[build-date]-[platform]-darwin.tar.bz2
- Test the CMUCL installation.
- lisp
- 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.
- Extract the archives.
- cd [full path to download directory]
- 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
- Install Maxima. Some steps my take several minutes.
- cd maxima-[version]
- configure --with-cmucl=/usr/local/bin/lisp
- make
- make install
- cd ..
- Compile and install some of the auxiliary software packages. For each of them, use the following steps:
- cd [package]-[version] (the directories you created in step 6)
- configure
- make
- make install
- cd ..
For some of the packages, some steps may take several minutes. Compile and install the software packages in precisely the following order:
- expat
- zlib
- libpng
- jpeg
- pdflib
- freetype
- fontconfig
- gd (for GD Library)
- SDL (for Simple DirectMedia Layer)
- Install AquaTerm.
- In the Finder, navigate to your download directory.
- Double-click on the AquaTerm[version].dmg file.
- Navigate to the newly mounted disk image.
- Double-click on the AquaTerm.pkg file.
- Follow the instructions in the familiar Apple installer.
- Install gnuplot (just like step 8).
- cd gnuplot-[version]
- configure
- make
- make install
- cd ..
- Install wxWidgets and disable the old version that was already on your computer.
- cd wxMac-[version]
- mkdir osx-build
- cd osx-build
- ../configure --disable-shared --enable-unicode --disable-webkit
- make
- make install
- mv /usr/bin/wx-config /usr/bin/wx-config-old
- cd ../..
- Configure wxMaxima for compilation.
- cd wxMaxima-[version]
- 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.
- 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.
- Compile wxMaxima.
- make
- make wxMaxima.app
- Tell Maxima to use gnuplot for plotting. You will be creating an initialization script that gets called every time Maxima starts.
- exit (if you are still in su mode)
- cd ~
- mkdir .maxima
- cd .maxima
- 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])$
- Install wxMaxima by using the Finder. Navigate to the wxMaxima-[version] directory. Drag the wxMaxima.app file to the Applications directory.
- 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 X11. wxMaxima 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.