Skip to content

MacOS Build Environment

Chris Webster edited this page Nov 15, 2025 · 11 revisions

Setting up a MacOS development environment

This describes the steps necessary to configure MacOS for the development and building of RAF software. This procedure is valid for MacOS Sierra - Catalina and will work for ncplot, ncpp, and aircraft_oap.

Brew is used to install most of the necessary tools. It installs everything in /usr/local. You can also install other items in /usr/local, but it's best not to overwrite or change files that brew is managing. The actual software distributions, libraries, etc. are stored in /usr/local/Cellar, and brew then creates links in /usr/local/[bin,lib,Frameworks,opt]. (The links seem to be arbitrarily duplicated in one or more directories; it's a mystery to me why this is done.)

If you do mess things up for brew, use brew doctor to diagnose the problem. It will helpfully offer commands that you can use to clean up the mess, but use these carefully, with an understanding of what is happening.

  • brew search <pkg> to find a package.
  • brew info <pkg> to list the options that are available during the install.
  • brew install <options> <pkg> to install a package.
  • brew list to list installed packages.
  • brew list <pkg> to list files installed by a package.
  • brew upgrade <pkg> Upgrade package. Leave off to upgrade all.
  • brew doctor to find discrepancies.
  • brew cleanup to clean house.
  • man brew is well written.

Steps

  1. Make sure that your user account has admin privileges.

  2. Xcode - or Xcode command line tools Install Xcode from the Apple App store. You have to login with an iCloud ID, but apparently you can create one of these without providing billing information. After installing, run and accept license.

Easier, you can run 'xcode-select --install' on the terminal.

  1. XQuartz
    XQuartz allows old style X11 programs to display on MacOS. Install from https://www.xquartz.org/

  2. Homebrew

    ruby -e "$(curl -fsSL \
    https://raw.githubusercontent.com/Homebrew/install/master/install)" 
    
  3. Standard brew installs

    If there is a Brewfile in the directory, then:

    brew bundle
    

    Otherwise:

    brew install scons
    brew install pkgconf
    brew install netcdf netcdf-cxx
    brew install gsl
    brew install openmotif
    brew install log4cpp
    brew install xerces-c
    brew install boost
    brew install gmt  (Geo-Political Map for ncplot & aeros)
    

Clone this wiki locally