GRASS GIS on Mac OS X

Original author: Scott Mitchell; redone by: William Kyngesburye

Last change: $Date$


| Home | Platform Notes | Mac GRASS Build Main | Downloads |


NOTE: this document is old. Up to date compilation instructions are maintained in macosx/ReadMe.rtf in the source, and will be mirrored in the GRASS wiki in the future.

GRASS GIS on Mac OS X

GRASS on Mac OS X shares all the functionality enjoyed on other UNIX- or Linux-based platforms.  There are quirks to the operating system that occasionally pose challenges when new features are added or changed in the GRASS source code, but these are usually sorted out promptly.  In addition, due to the fact that Mac OS X has evolved quite differently from other UNIX systems, there is a variety of ways to get GRASS installed on a Mac.  This page is an attempt to help you navigate through the options.  Some assumptions are made about your familiarity with GRASS, in that we are not re-explaining things here that are found in other pages on the GRASS web site.

Main Issues:  UNIX/X11 vs. Aqua

No matter which method you choose to get GRASS working on your system, the following issues may come up.  MacOS X has a split heritage - the user interface that came from the marriage of Apple and NeXT, and the UNIX tradition that came in through FreeBSD.  This means that there are multiple alternatives for developing user interfaces to applications.  GRASS comes from a UNIX and X11 heritage.  The tools that are used in the standard (i.e. shared with other platforms) GRASS user interface are now all readily available on the Mac, but there are also alternatives.

Therefore, building GRASS requires a decision on whether or not GRASS will use features that are exclusive to Apple's graphic interface ("Aqua").  This allows more seamless integration in to the Apple environment, but requires work "outside" of the main GRASS development to make it work.  There are two approaches to this: use an Aqua version of the Tcl/Tk interface, or port GRASS to native GUI APIs. The latter requires a LOT of work and dedicated/fanatical Mac programmers.

The Tcl/Tk Aqua method just takes minimal work (but work nonetheless) to make sure everything works well in the Aqua environment, and much progress has been made on this front. The problem is that there is one module that still requires X11 - NVIZ. Also, in Mac OS 10.3, Apple's Aqua Tcl is just Tcl, no Tk - you need a third-party installation of an Aqua Tcl/Tk. Mac OS 10.4 "Tiger" does include an Aqua Tk (in fact, a subset of that third-party Tcl/Tk Aqua).

So, the alternative approach is to stick with the X11 interface that is shared amongst other UNIX systems, in which case GRASS will look and behave pretty much the same as on other platforms.  As of OS 10.3 "Panther", Apple includes X11 with the operating system, combining XFree86 with a window manager that is integrated with the Aqua graphics system.  So if you have this version of the operating system, the windows that you run GRASS in can now all be part of the normal Mac windowing system, although if you want the graphical menuing system (which is an optional way to run GRASS), it will use standard X11-based Tcl/Tk, and requires that you have that installed separately.  If you are still using OS 10.2 ("Jaguar"), you can install X11 separately a number of ways (see below).

There is one other issue regarding Tcl/Tk under OS X. The release of Tiger (OS 10.4) changed the default configuration of SSH, and it has implications for the use of GRASS between hosts on a network (i.e. running it on one machine but displaying it on another). If you are interacting with GRASS on a Mac, but actually running it on a remote machine that you connect to with SSH, you will need to use the "trusted forwarding" mode of SSH in order for the Tcl/Tk generated graphics, such as d.m and the GUI version of the initial mapset selection, to make it through your connection. This can be done using the -Y flag when you start the ssh session:
ssh -Y remotehost
Using the -X flag, or simply turning on X11Forwarding in the SSH configuration files, is not enough: the symptoms in this case are that a d.mon window will function fine, but none of the Tcl/Tk dialogues will work, failing with an error message complaining either about Wish not behaving as expected, or a "Bad Atom". This applies to both X11 Tcl/Tk and the Aqua option.

General Requirements

Here are some general requirements to run GRASS GIS on Mac OS X. There are some additional requirements to building GRASS that are listed on the build page.

Mac OS X 10.3.9 is the recommended minimum, but GRASS will run and build on any 10.3.x system, and it will build on 10.2 (and possibly even 10.1, but only extenuating circumstances should keep you from upgrading), and some binaries will run on 10.2.

X11 is needed for most binaries, and for building from source. Tcl/Tk needs it, and NVIZ needs it. X11 comes with Mac OS X starting with 10.3. If you're lucky, you may have downloaded the beta for 10.2, otherwise you will have to settle for XDarwin or Oroboros (can't help with setting those up).

Tcl/Tk Most binaries come with their own copy of Tcl/Tk of the UNIX variety. There really aren't any UNIX Tcl/Tk installers anyways, so you shouldn't have to worry about it, the build instructions tell you how to roll-your-own for GRASS from source. You may need an Aqua Tcl/Tk installed, however. The binary distribution should say if you do.

Binary releases of GRASS for Mac OS X

Binary releases of GRASS for Mac OS X can be found on the GRASS Downloads page. One big problem with packaging binaries of UNIX software for Mac OS X is redundancy and packaging. Other than the UNIX /usr/local standard for installing software, there is no standard 'packaging' system for UNIX software on Mac OS X, though there are a couple 'defacto' standards. Mac OS X has its own packaging system for distribution (.pkg installers) that work well for the /usr/local installations, but the other packaging systems use a more Linux style of packaging.

Here is a short description of the various binary distributions (see the downloads page for details on obtaining these):

1) GRASS from Fink - GRASS from the Fink system uses all its own dependencies, so you are limited to how well they are kept up-to-date, and what features are included. Dependencies in the Fink system can be used in building GRASS from source, or in other distributions.  The Apple Developer Tools are still required, since it's not really a binary distribution, but builds from source like other Linux package managers.  GRASS from Fink can be run all the way back to Mac OS 10.2, although that option only provides GRASS version 5.0.3 (for Mac OS 10.3 or 10.4, GRASS versions 5.7 and 6.0 are also available through Fink).

2) Open OS X - The Open OS X port of GRASS is a binary release with extra functionality, but its maintenance and documentation is a parallel, separate activity (which has contributed back some very useful fixes to the main GRASS project).  It is completely self-contained, all dependencies are in a double-clickable Mac OS X application. Requires at least Mac OS 10.3.

3) Lorenzo Moretti's "one stop" solution - Lorenzo's GRASS is a double-clickable Mac OS X application, and provides some double-clickable extras. It includes all dependencies needed, and separate optional packages are available for PostGIS, QGIS and some other stuff. Lorenzo uses a split installation - while is it a double-clickable Mac application, the dependencies are installed in an isolated subfolder in /usr/local. This GRASS distribution runs on Mac OS 10.2.8 and newer.

Building from source

Detailed instructions for building GRASS on Mac OS X, including all dependencies.


© 2003-2005 GRASS Development Team
Imprint | Comments about this page
Last change: $Date$