[Icon home]

Icon on Macintosh

Gregg M. Townsend
Department of Computer Science
The University of Arizona

www.cs.arizona.edu/icon/v943/macintosh.htm
Last updated September 22, 2009

Introduction

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.

Co-Expressions

On Intel Macintosh platforms, Icon uses POSIX threads to implement co-expressions; and because Apple did 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.

Graphics

For graphics, Icon uses the X Window System, generally called X11 in Macintosh documentation. Beginning with Mac OS 10.5 (Leopard), X11 starts automatically when needed, and no advance preparations are needed. An X11 icon appears in the dock when an Icon graphics program is run and persists innocuously afterward.

Building Icon

Building Icon from source requires the Xcode toolbox, which comes on the OS X installation disc. When installing XCode, be sure to select a custom installation and add X11 to the default set.

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.

All of the standard tests pass except the io test. It fails because there is no /etc/motd file on Macintosh Unix. This is a deficiency of the test and does not indicate a problem with Icon itself.