GEMPAK Installation for Mac OS X

This installation document, created by Kevin Tyle, University of Albany, serves to guide users through building the latest version of GEMPAK on Intel Mac OS X 10.6 (Snow Leopard) and 10.7 (Lion) with the GCC 4.5 compilers, and should also work for 10.5 (Leopard). Earlier versions/CPUs of OS X are untested.

The following steps should lead to a successful build, with a user account with admin (sudo) privileges.

1. Install Xcode

Prior to Lion (10.7), Xcode can be found as an optional install on the install DVD, or (again pre-Lion) you can download the latest disk image of Xcode from the Apple Developer web site (you will have to register in order to download the .dmg file): http://developer.apple.com/technologies/tools/xcode.html

For Mountain Lion (10.8), Xcode can be downloaded from the Mac App Store, Command Line Tools are optional, so you must install it manually in the Preferencs tab:

This is required for Macports to operate correctly.

2. Install MacPorts Packages

If you don't have MacPorts installed for your version of OS X, download and install the program from macports.org. Once installed, your .profile or .cshrc should have /opt/local/bin first in your path. Check to be sure this is the case before proceeding, and resource your .profile or .cshrc if not.

Using MacPorts, install several packages (all necessary pre-requisites of each package will automatically be downloaded and installed first, similar to "yum install" in CentOS/Fedora flavors of Linux). Perform some configuration following the installation of some of them. The sequence is as follows:

3. Install OpenMotif

The GEMPAK graphical programs, such as NMAP2 and NWX, require OpenMotif. This is no longer available from MacPorts, so you need to download and install OpenMotif 2.3.3. Unfortunately the OpenMotif source obtained from motifzone.net will produce compilation errors on OS X systems, so the UPC has provided the package with necessary edits in order to correctly build on your system.

4. Build and Install GEMPAK

Extract the GEMPAK tarball archive obtained from the GEMPAK Downloads page and modify Gemenviron or Gemenviron.profile depending on your shell so that the environmental variable $NAWIPS is set to the correct directory path. Then cd into the $NAWIPS directory (this is the parent directory of the GEMPAK/N-AWIPS directory tree).

Be sure you are cd'd into the top level GEMPAK6.6.0 directory at this time. Type

make > make.out
to build the package, which may take a long time, depending on the speed of your computer. In a separate window, you can watch the compilation process by typing

tail -f make.out
Once done, verify there are no fatal errors in the make.out file (there should be two non-critical Error 2 messages but no Error 1 messages. If all went well, run

make install
and you should be good-to-go.

5. Troubleshooting

No doubt some individuals with different CPUs/OS versions may discover some problems not mentioned or covered here. Although basic run-time testing on OS X-compiled GEMPAK has been successful, it's possible there may be bugs in the OS X build which are not seen on other platforms. Users can report known probelms to Unidata's GEMPAK Support desk (support-gempak@unidata.ucar.edu), and are encouraged to post updates and questions to the GEMBUD mailing list (gembud@unidata.ucar.edu) as well.

Corrections and comments concerning this guide can be sent to support-gempak@unidata.ucar.edu