Mac Software Hints

The following works on OSX 10.10.3 (Yosemite) and on 10.9 (Mavericks) with a few exceptions


Upgrading to El Capitan/Sierra/HighSierra

Upgrading to El Capitan/Sierra/HighSierra from Yosemite was pretty painless. If you're upgrading to High Sierra from one of the others, it's even easier---just do the items marked with a *. The main problem is that Apple has intorduced a new security feature that prevents even "sudo" commands from altering anything deemed "system." Very unfortunately, /usr/local is considered system and is protected. So, step A: disable this feature long enough to change the permissions on /usr/local. If you're paranoid, then turn them back on. Here's what you do after installing El Capitan/Sierra/HighSierra

  1. Turn off Syste Integrety Protection (SIP):
  2. sudo mkdir /usr/local ; sudo chflags norestricted /usr/local ; sudo chown yourself:admin /usr/local ; sudo chown -R yourself:admin /usr/local
  3. *sudo ln -s /opt/X11 /usr/X11R6 [necessary for any of the X11IRAF stuff to work]
  4. sudo ln -s /opt/X11 /usr/X11
  5. Make sure that /usr/include exists. If not, sudo mkdir /usr/include
  6. If you're going to ever compile the cmfgen version of pgplot, find a version of stdint.h and put it in /usr/include. Here is a copy
  7. Fix ssh:
  8. *Re-run the install task in IRAF:
  9. If you want SIP back on, go back into recovery mode, and do a "csrutil enable" I didn't do this on my machine, so I haven't tested if there are additional problems.
  10. Open up TeXShop and let it download the latest version (3.61).
  11. Take this opportunity to dowload the latest X11 from the X11 Quartz site.
  12. Download and install the latest XCODE. Open it and agree to install the additional stuff.
  13. Settings->General-->Show scroll bars "always". Jeez.
  14. For the pgfortran compiler to work, you need to do a: sudo ln -s /Applications/ /usr/lib/crt1.o
  15. *ftp has disappeared in High Sierra. See below for what to do about that.


Setting up a New Mac (El Capitan/Sierra/HighSierra)

  1. Do a software update
  2. Associate MAC address with name
  3. Get X11 from XQuartz
  4. Change the default shell to tcsh
  5. Change some things
  6. sudo ln -s /opt/X11 /usr/X11R6
  7. sudo ln -s /opt/X11 /usr/X11
  8. Fix ssh:
  9. Install ds9
  10. Install Super Mongo
  11. Install TeXShop and TeX
  12. If you want to do the whole aasTeX thing and have LaTeX find them no matter where you are....
  13. Install FORTRAN
  14. Install IRAF


Installing IRAF

  1. Install the basic system.


Installing the software

Things have gotten a lot easier to install. I found once I brought up Homebrew, I could install with only minimal head-bashing:
  1. Download and install Homebrew by:
    • bash
    • ruby -e "$(curl -fsSL"
    • exit
    • Do a 'brew doctor' and try to make it happy. Brew hates having macports, fink, or any librariespresent in /usr/local/bin that it doesn't already know about. This may be very childish of it, but you can hide your libraries and macports and fink by sticking them in temporary files that you can then put back when you've got working. Keep running 'brew doctor' and doing what it requests until you finall get a 'ready to brew' message.
  2. brew install homebrew/science/astrometry-net
  3. Follow the instructions when it gets stuck on something.
  4. One problem with version 72 is a conflict with Pyfits; need to do a: sudo pip install fitsio after first downloading and installing pip (see You'll have to do this as sudo).
  5. Install the indicies.
    • Download the 2MASS indicies, the TYCHO indicies and the USNO-B1.0indicies and stick them somewhere where you have a spare 65Gb of space.
    • Edit the /usr/local/Cellar/astrometry-net/etc/astrometry.cfg file to reflect where you've put the indicies, i.e., something like this:
      # In which directories should we search for indices?
      add_path /Volumes/pepe/astromindicies/2MASS-indicies
      add_path /Volumes/pepe/astromindicies/TYCHO-indicies
      add_path /Volumes/pepe/astromindicies/USNO-indicies 
  6. Add /usr/local/astrometry/bin to your path
  7. Try it on a test image:
    • solve-field --overwrite --scale-units arcsecperpix --scale-low 0.44 --scale-high 0.46 --ra 23.33 --dec 29.27 --radius 0.5 121028-987.fits
    • solve-field --overwrite --scale-units arcsecperpix --scale-low 0.43 --scale-high 0.44 --ra 84.0 --dec -69.2 --radius 0.5 n2044test.fits
    • solve-field --overwrite --scale-units arcsecperpix --scale-low 0.23 --scale-high 0.25 --ra 179.8 --dec 12.3 --radius 0.1 lmi.0079.fits
    • Can add:
      • --use-sextractor
      • --no-tweak or --tweak-order 1
      • --no-remove-lines (very useful when it won't solve). Should probably be the default.



  1. Simply use a very old version.

    I never successfully got the latest version of SExtractor to install on any Mac: it requires ATLAS, and nothing seemed to work---the Macports version failed, downloading the source ATLAS and doing a "make build" went on for 26 hours before I pulled the plug, and although "brew install sextractor" should work, it bombed when it tried to install ATLAS. I got around all of this by simply downloading an older version, 2.5, as this doesn't require ATLAS.

    1. Download version 2.5 from here
    2. ./configure
    3. make
    4. sudo make install

    That was it! After struggling for a week the issue was a lot easier to deal with than I thought.

  2. Matt Craig kindly got Sextractor working under brew. So, can do: brew install sextractor



CMFGEN is John Hillier's wonderful radiative transfer code for hot stars with stellar winds. The care and feeding of the code is beyond the scope of the current notes. Hese are some hints that should help in getting in getting the code up and running.
  1. You will seriously need to buy the PGF95 compiler.
    • Hints in getting the damn license server to work:
      • In getting the permanet license, first do a "lmutil lmhostid" to see which MAC address the damn thing is picking up.
      • Create a startup file that seems not to work:
        • sudo /opt/PGI/PGI start
      • When THAT fails, /opt/pgi/osx86-64/17.7/bin/lmgrd
    • For the pgfortran compiler to work, you need to do a sudo ln -s /Applications/ /usr/lib/crt1.o
    • For Yosemite you will also need a
      • sudo ln -s /opt/X11 /usr/X11R6
      • sudo ln -s /opt/X11 /usr/X11
    • For El Capitan/Sierra, one needs to find an older version of stdint.h and put it in /usr/include. Here is a copy This is needed for compiling pgplot.
  2. In the .tcshrc put
    • setenv PGI /opt/pgi
    • setenv LM_LICENSE_FILE $PGI/license.dat
    • source /Volumes/strax/cmfgen/cur_cmf/com/
    • set path = ($PGI/osx8-64/15.3/bin/ $path)
    • setenv PGPLOT_DEV /xserve
    • setenv PGPLOT_DIR /Volumes/strax/pgplot/pgplot
    • setenv NCPUS 4
    • limit stacksize unlimited
  3. One needs the "special" Mac version of pgplot. Here it is. cd to pgplot/pgplot (not pgplotsrc!), "fix" the directory names at the top in Makefile, and then do a "make clean" and a "make all". It will bomb with an error message when it tries to create the cpgdemo stuff (Undefined symbols in MAIN) but you will find to your surprise that libpgplot.a has been created! Joy!
  4. Download the CMFGEN source files from the above link. Create a subdirectory cur_cmf_date and stick the stuff there. Create a symbolic link ln -s cur_cmf_date cur_cmf.
  5. Download the latest and great atomic data as well from the above link.
  6. Edit cmfgen/cur_cmf/Makefile_definitions so it looks something like this.
  7. If you update the version of the compiler, make sure you change the library location in the Makefile_definitions.
  8. Modify the Makefile definitions in "subs" and "plane" to invoke FZ rather than whatever flag it users. This gets around a bug with 14.10 that affects subs/fg_j_cmf_v9.f and plane/fg_j_cmf_v12.f.
  9. edit cur_cmf/com/ to contain the right paths
  10. make clean
  11. make all
  12. So, you think you're all set, don't you? Well, you're not. You're going to have so start some damn server: /Volumes/strax/PGPLOTOrig/pgplot11.0/pgplot/pgxwin_server &
  13. While how to use CMFGEN is way beyond the scope of this little note, Kathryn's CMFGENGuide is invaluable.





Rob Simcoe (MIT) provides some excellent reduction software for his amazing Magellan instrument FIRE. I did find some of the installation and usage instructions a bit confusing. The following instructions were constructed with some help from Jane Rigby.