navigation map

Chapters:
  1: Introduction
  2: Simple example
  3: Invocation
  4: Finer Control
  5: X-Y Plots
  6: Contour Plots
  7: Image Plots
  8: Examples
  9: Gri Commands
  10: Programming
  11: Environment
  12: Emacs Mode
  13: History
  14: Installation
  15: Gri Bugs
  16: Test Suite
  17: Gri in Press
  18: Acknowledgments
  19: License

Indices:
  Concepts
  Commands
  Variables
index.html#Top Installation.html#Installation Gri: installing Gri Gri: bugs index.html#Top Gri: bugs

14.6: Compilation in Macintosh OS X

The OS X system provides a BSD unix that suites Gri very well. With the (free) developer package, it also provides a very up-to-date version of the `gcc' compiler. Thus, installing Gri on Macintosh can be done using the normal Unix instructions.

But there are also easier ways. Gri is compatible with Fink and Darwinports, the two popular packaging systems on OS X. If you use OS X and do not have Fink or Darwinports installed, then you should probably install one, or both. Each distribution has strengths, and each has weaknesses, and it is difficult to provide a firm recommendation between the two.

Caveat. As of mid-2007, neither distribution appears to handle package dependencies as well as is done by popular linux distributions. For example, in working through the steps listed below, the author found that his Darwinports system had a problem with a system library that handles internationalization. The "update" operation of the system was insufficient to solve the problem, and so it was necessary to do some web searching to find a patch. The patch failed, but another search revealed a second (hand-edit) patch that got it working. In excess 4 CPU hours were required to rebuild the packages that were broken.

If you'd like to build a local Darwinports version of Gri, to get the latest version instead of whatever version is provided by Darwinports, follow these steps:

  • Download the source from CVS at SourceForge. (If you don't know what the previous sentence means, you will quite likely have difficulties with the other steps.)

  • Visit the `darwinports' directory of the newly-created directory tree, and type
    
    sudo port -d -v build
    
    to build it. This will take several minutes, during which you may find it helpful to do a search on "darwinport build". For example, the O'Reilly page (`http://www.oreillynet.com/pub/a/mac/2004/04/09/darwinports.html?page=3', last checked in July 2007) is very good. Note that you will be building from the source that is stored on SourceForge, not from the Darwinports source. That's the trick of issuing the `build version' of the `port' command.

  • Do a "destroot" operation:
    
    sudo port -d -v destroot
    

  • Install it:
    
    sudo port -d -v install
    
    Note: if you already have an older version of Gri in the Darwinports system, you must first issue the command
    
    sudo port deactivate gri
    

navigation map