Gregg M. Townsend
Department of Computer Science
The University of Arizona
www.cs.arizona.edu/icon/uguide/macintosh.htm
Last updated October 17, 2014
Because Mac OS X is based on Unix, it can run Icon. There is no special Macintosh interface, so as a practical matter Icon on the Mac is for those who are comfortable using a Unix shell in a Terminal window.
The command-line interface to Icon is described by Unix
man pages. The icon
command executes a program from a
single source file. An Icon program in a simple text file
prog.icn
is executed by typing icon
prog.icn
. The more general icont
command, modeled after the Unix
cc command, supports multiple files, separate
compilation, and other features.
Because MacOS does not implement anonymous semaphores,
each co-expression creates an open file.
Programs with hundreds of active co-expressions may
abort with a cannot create semaphore
system error.
The open file limit can be raised from the typical default of 256
using a limit descriptors n
or
ulimit -nS n
command, depending on the shell.
If Icon is built with graphics enabled, the X Window System (“X11”) is required to run any Icon program. X11 is not needed if Icon is built with graphics disabled.
Beginning with Mac OS 10.8 (“Mountain Lion”), X11 is not part of the standard OS installation. When X11 is first needed, Mac OS provides instructions for downloading and installing it. After that is done, X11 starts automatically as needed. A ringed X icon appears in the dock when an Icon graphics program is run and persists innocuously afterward.
Building Icon from source requires the Xcode toolbox, which is available for free download with registration.
Icon is built in a Terminal window. The process is the same as
on other platforms and uses the configuration named
macintosh
. See
Building Icon for detailed instructions.