GEMPAK Installation for Mac OS X

This installation document, conceived by Kevin Tyle, University of Albany, serves to guide users through building GEMPAK on Intel Mac OS X 10.6 (Snow Leopard) with the GCC 4.4 compilers. The same procedure should also work for 10.5 (Leopard), but earlier versions/CPU's of OS X remain untested.

  1. Install Xcode on the host system. This can be found as an optional install on the install DVD, or 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

  2. Install the MacPorts package from http://www.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.

  3. 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:

    • a. Install gcc44. This will take a long time, perhaps even a couple hours if you are on a slower/low-RAM system.
      sudo port install gcc44
    • b. Install gcc_select
      sudo port install gcc_select
    • c. Make gcc44 the default compiler
      sudo gcc_select mp-gcc44
    • d. Install a variety of xorg packages, culminating with the libXtst package
      sudo port install xorg-libXtst
    • e. Install OpenMotif (current MacPorts version 2.3.2, although 2.3.3 has been released) and its prerequisites
      sudo port install openmotif
    • f. Install the xpm package
      sudo port install xpm

  4. As OpenMotif >= 2.3.2 is incompatible with NMAP2, download and install OpenMotif 2.3.1 from source:

    • a. Obtain the tarball from motifzone.net and untar in a directory of your choice.

    • b. To avoid a compile-time error: In the subdirectory clients/uil, change line 286 of UilDefI.h from:

      #if defined(linux)
        to
      #if defined(linux) || defined(__APPLE__)

    • c. Set the CFLAGS and LDFLAGS environment variables: if using a Bourne-like shell, type

      export CFLAGS="-I/opt/local/include"; export LDFLAGS="-L/opt/local/lib"

      If using a C-like shell, type

      setenv CFLAGS -I/opt/local/include; setenv LDFLAGS -L/opt/local/lib

    • d. In the top level of OpenMotif 2.3.1-1, configure, build, and install:

      configure --prefix=/opt/local; make all ; sudo make install

  5. Extract the GEMPAK tarball archive, and modify Gemenviron or Gemenviron.profile depending on your shell so that the environmental variable $NAWIPS is set to the correct directory path.

  6. Build GEMPAK normally. Type make > make.out and verify there are no errors (there should be two non-critical Error 2 messages but no Error 1 messages.

  7. If all went well, run make install and you should be good-to-go.

  8. CAVEAT: If the build fails for any reason and/or you need to remake the build, I recommend a fresh extraction of $NAWIPS/extlibs/netCDF/netcdf-4.1.1.tar.gz to eliminate a known bug where netcdf tries to reinstall documentation with the texi2dvi program, which is not present.

  9. Of courser it's possible individuals with different CPUs/OS versionss man discover some problems not mentioned 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