I previously went over how to install SML on OS X via Homebrew, which currently installs version 110.74 of SML/NJ. Unfortunately, this version does not work with the recently released OS X 10.8 Mountain Lion out of the box. If you are running both SML and OS X at these version numbers, some light additional tuning is required.
Note that this bug will be fixed in SML/NJ 110.75. (Update: 110.75 is now available.)
When running version 110.74 on Mountain Lion, the command
results in a not overly helpful but easily resolved error:
What happens here is that SML is unable to handle the operating system number of Mountain Lion, so we need to tell it how to interpret that. In order to do so, we first need to figure out which directory Homebrew installed SML to. Running
gives us an output similar to the following:
From this, we can tell that SML has been installed to
Open the file
bin/.arch-n-opsys located in this directory in your text editor of choice:
Inside, you will find the following instructions, starting at line 63:
As you may have noticed, OS X version 10.8 is not listed here yet. Simply add a line covering version number 12 (as returned by
uname -r) to this list:
When trying to save the change, your text editor is probably going to tell you that the file is read-only, but you will have to overwrite the contents here.
After that, running
will once again greet you with the expected command prompt.