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/Mojave

Upgrading to El Capitan/Sierra/HighSierra from Yosemite was pretty painless. If you're upgrading to High Sierra or Mojave 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/Mojave

  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. *While you're at it, do an xcode-select --install
  8. Fix ssh:
  9. *Re-run the install task in IRAF:
  10. 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.
  11. Open up TeXShop and let it download the latest version (3.61).
  12. Take this opportunity to dowload the latest X11 from the X11 Quartz site.
  13. Download and install the latest XCODE. Open it and agree to install the additional stuff.
  14. Settings->General-->Show scroll bars "always". Jeez.
  15. For the pgfortran compiler to work, you need to do a: sudo ln -s /Applications/ /usr/lib/crt1.o
  16. *ftp has disappeared in High Sierra/Mojave. See below for what to do about that.


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

  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. xcode-selec --install
  9. Fix ssh:
  10. Install ds9
  11. Install Super Mongo
  12. Install TeXShop and TeX
  13. If you want to do the whole aasTeX thing and have LaTeX find them no matter where you are....
  14. Install FORTRAN
  15. 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 [no longer works]



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.
      • Starting up the license daemon:
        • sudo bash
        • cd /opt/bin/osx86-64/2018/bin
        • sudo cp com.pgroup.flexlm.plist /Library/LaunchDaemons
        • sudo chown root:wheel /Library/LaunchDaemons/com.pgroup.flexlm.plist
        • sudo chmod 0644 /Library/LaunchDaemons/com.pgroup.flexlm.plist
        • sudo launchctl load /Library/LaunchDaemons/com.pgroup.flexlm.plist.
        • When that fails, just do a /opt/pgi/osx86-64/18.3/bin/lmgrd
        • Recently I've been trying this and getting a message about not being able to open a port. Turns out that here was some conflict with the idl83 lmgrd. Do a ps -ax | grep lmgrd. Now...if you just kill it, it will restart. So, I did something more draconian and did a mv of the executible in the IDL directory to lmgrdold. I then rebooted. At that point the 2018 PGI version came to life, and it read my license file fine and I could compile again. Lord knows what's going to happen when I go to run IDL though...
      • Strongly recommend downloading latest xcode and trying to open it (so that you install the other stuff) before doing much else.
      • 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.
    • 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/pgplotorig/pgplot/pgplot (pretty sure this line does NOTHING)
      • setenv PGPLOT_FONT /Volumes/strax/pgplotorig/pgplot/pgplot/grfont.dat
      • setenv NCPUS 4
      • limit stacksize unlimited
  2. 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!
  3. 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.
  4. Download the latest and great atomic data as well from the above link.
  5. Edit cmfgen/cur_cmf/Makefile_definitions so it looks something like this.
  6. If you update the version of the compiler, make sure you change the library location in the Makefile_definitions.
  7. NO LONGER NEEDED: 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.
  8. edit cur_cmf/com/ to contain the right paths
  9. make clean
  10. make all
  11. 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 &
  12. 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.