CADP Installation on Mac OS X
          CADP (CONSTRUCTION AND ANALYSIS OF DISTRIBUTED PROCESSES)
                            MAC OS X INSTALLATION


This document is intended to every person planning to use CADP on a computer running Apple Mac OS X. If you do not plan to use CADP in an Apple Mac OS X environment, you can avoid reading this page.


SECTION 1. CADP FOR MAC OS X

The following versions of Mac OS X are supported:

The following versions are possibly supported:

For more details about supported architectures, please refer to

       http://cadp.inria.fr/status.html

To install CADP on Mac OS X, it is not necessary to be an administrator: a normal user can install CADP in his/her home directory. However, before installing CADP, the preliminary steps described in this document must be performed from an administrator account, in particular, because one will need to invoke the "sudo" command.


SECTION 2. INSTALLING X11 FOR MAC OS X

This depends on your version of Mac OS X:

Normally, X11 is installed by default. If not, you can find X11 in the install DVD (e.g., in Mac OS X 10.5, the "X11user.pkg" package is located in directory "System/Installation/Packages").

X11 is no longer included in Mac OS X by default but can be installed via the open source XQuartz project at

       http://xquartz.macosforge.org/landing

After installing XQuartz, you will have to log out and log in again in order to complete the installation. We advise to run it manually to make sure that the installation is complete and functional. This can be done by typing in a Terminal window:

          open -a XQuartz


SECTION 3. INSTALLING DEVELOPMENT TOOLS FOR MAC OS X

For using CADP, you will need a C compiler, as well as companion tools, such as "make".

If you already have these tools installed on your machine (check for /usr/bin/gcc, /usr/bin/make, etc.), we recommend that you keep them unchanged.

Otherwise, the standard way of getting these tools is to install Apple's XCode software. The installation of XCode depends on your version of Mac OS X:

On the installation CD for Snow Leopard, there is a directory named "Optional Installs". Open this directory and click on the Xcode icon.

During the installation you should select the "UNIX Dev Support" option so that development tools install themselves in /usr as usual. If the "UNIX Dev Support" option is absent (which indicates an old version of Xcode), you should modify the location where Xcode will be installed by changing this from "/Developer" to "/".

The following explanations have been prepared for XCode 5.0.1, but the installation procedure was similar for XCode 4.

XCode must be downloaded from Apple web site. XCode is available free of charge but you will need an Apple ID. If you do not have an Apple ID, you can create an account from:

       http://developer.apple.com/programs/register/

You will be prompted for much personal information, including e-mail, address, phone number, and credit card data (the latter is optional).

Then, go to the page

       http://developer.apple.com/xcode/

and click on "Mac App Store", then "Free", then "Install App". Once the installer has been downloaded, double click on it and perform the installation.

After this installation, the next steps may differ, seemingly depending on your version of Mac OS X. Check whether the command /usr/bin/gcc has been installed or not.

              sudo gcc      # or sudo xcodebuild -license

and answer "agree". Then, launch XCode ("Finder" -> "Go" -> "Applications" -> "XCode") and click on "Install" when prompted to "Install additional required components".

Note (November 2013): The XCode 5.0.1 package is heavy (2 Gbytes) and contains many functionalities not needed for CADP. It would be thus tempting to investigate alternative approaches:


SECTION 4. INSTALLING A POSTSCRIPT VIEWER FOR MAC OS X

The BCG_DRAW tool requires a PostScript interpreter and a PostScript viewer in order to display the BCG graphs. The installation of such an interpreter and viewer depends on your version of Mac OS X:

As regards the PostScript viewer, CADP will use by default the builtin viewer (named "Preview") that Apple provides as part of its operating system. Therefore, it is not required to install another viewer, such as the Ghostview software.

As regards the PostScript interpreter, we recommend using Ghostscript.

If you already have a working version of Ghostscript installed on your machine, we recommend that you keep it unchanged.

Otherwise, we recommend that you use MacPorts to install Ghostscript. This requires to install MacPorts first. Go to the MacPorts Web site:

       http://www.macports.org/install.php

and download the version of "pkg installer" corresponding to your version of Mac OS X. Double click to launch this installer, and proceed to the installation, which requires an administrator password and takes about one minute.

Make sure that your $PATH variable contains the two directories:

            /opt/local/bin   and   /opt/local/sbin

(so it enables access to /opt/local/bin/port in particular).

Finally, you can install Ghostscript as follows:

          sudo port install ghostscript

This takes some time, because many dependencies have to be installed.

Note: There may a window popping up to inform you that Java SE6 is needed by javac. There is no neeed to install this for using CADP.

Note: Command "sudo" will fail if you are not operating from an administrator account.


SECTION 5. INSTALLING GNUPLOT FOR MAC OS X

The Gnuplot plotting utility is required to run the full demo examples 30, 31 and 39 (it is used to visualize measurements produced by the CADP tools for performance evaluation).

Once MacPorts has been installed (see Section 4 above), it can be used to install Gnuplot easily:

          sudo port install gnuplot

Again, the installation takes time because of dependencies.

Note (November 2013): installation of Gnuplot using MacPorts failed on a Mac running Mac OS X 10.9 "Mavericks" without XCode but with Apple's Command Line Tools installed. The following warnings were displayed, suggesting that the entire XCode is needed:

Warning: xcodebuild exists but failed to execute Warning: Xcode does not appear to be installed; most ports will likely fail to build


SECTION 6. INSTALLING GNUTAR ON MAC OS X

There are different versions of the Unix "tar" command, especially the BSD tar and the GNU tar, the latter being used by CADP. For long, both versions have been present on Mac OS X. However, the GNU tar has been removed from Mac OS X 10.9 "Mavericks".

Once MacPorts has been installed (see Section 4 above), it can be used to install the GNU tar easily:

          sudo port install gnutar

Check that the command has been installed in /opt/local/bin/gnutar. If this file does not exist, please notify cadp@inria.fr.


SECTION 7. ASSIGNING A STATIC HOSTNAME TO YOUR MACHINE

By default, Mac OS X does not give your machine a static hostname, so that the name of the machine is dynamically assigned by the router and may change depending on the network to which the machine is connected. When the machine is disconnected from the network, its name changes to get a ".local" extension.

Setting a static hostname in Mac OS X does not alter its behaviour. All other operating systems (Solaris, Linux, Windows, etc.) are using static hostnames by default, and this is required for using CADP seamlessly.

Type the following command:

          hostname

when the machine is connected to the network and when it is disconnected. If both answers differ (and especially, if the answer returned when the machine is disconnected has with a ".local" extension), then your machine has a dynamic hostname.

To change it, choose the static hostname (noted here $NAME) you want to assign to your machine. It must be an alphanumeric string possibly containing dots (for instance, "jupiter" or "jupiter.univ.edu").

Then, type the following commands:

          sudo hostname $NAME
          sudo scutil --set HostName $NAME
          sudo scutil --set LocalHostName $NAME
          # typing the following command is optional
          sudo scutil --set ComputerName $NAME


SECTION 8. CHECK YOUR INSTALLATION

Install the "wget" command:

          sudo port install wget

Open a Terminal window and type the following commands:

          cd /tmp
          wget ftp://ftp.inrialpes.fr/pub/vasy/cadp/tst
          sh ./tst mac86

Note: If the command "wget" is not available on your machine, use your web browser to download the "tst" shell-script from

       ftp://ftp.inrialpes.fr/pub/vasy/cadp/tst

Inspect carefully the output of the "tst" command, looking for lines starting with "***", which report major installation problems. Apply the changes suggested until no problem is reported.

You are now ready to install the CADP software itself. Go back to:

       http://cadp.inria.fr/installator/index.html#macOS


ANNEX A. INSTALLING X11 FOR MAC OS X 10.4 AND 10.5

This depends on your version of Mac OS X:

Before installing CADP on your Mac OS X system, you have to install a X11 server.

If you already have an installed X11 server (like XDarwin or X11 for Max OS X), you can skip reading the present section of this file.

X11 for Mac OS X is an implementation of the X Window System that makes it possible to run X11-based applications under Mac OS X. To install X11 for Mac OS X on your system, follow the instructions below:

You can install X11 for Mac OS X directly from the installation DVD called "Mac OS X Install Disc 1" included in your system distribution.

Insert the "Mac OS X Install Disc 1" DVD in your DVD-ROM drive. Go to the /System/Installation/Packages directory and install the "X11User.pkg" package.

Normally, X11 is installed by default. If not, you can find X11 in the install DVD (e.g., in Mac OS X 10.5, the "X11user.pkg" package is located in directory "System/Installation/Packages").


ANNEX B. INSTALLING DEVELOPMENT TOOLS FOR MAC OS X 10.4 AND 10.5

You can download Xcode from

       http://developer.apple.com/xcode/

You have to download version 3.1.4 of Xcode. Version 3.2 and later can not be installed on these versions of Mac OS X.

If you do not have an Apple ID, you can create a free account from

       http://developer.apple.com/programs/register/


ANNEX C. INSTALLING A POSTSCRIPT VIEWER FOR MAC OS X 10.4 AND 10.5

We recommend using the Ghostscript interpreter and Ghostview viewer.

If you already have a working version of Ghostscript/Ghostview installed on your machine, we recommend that you keep it unchanged.

Otherwise you have to install the Mac OS X version of the Ghostscript and Ghostview tools. Please note that Ghostview requires X11 to display PostScript files. Thus it is mandatory to have X11 properly installed (see above the instructions about installing X11 for Mac OS X).

To install Ghostscript/Ghostview, you have two options: using Fink or using Macports.

Once Fink is installed, you can use it to get Ghostscript/Ghostscript:

          sudo fink install ghostscript
          sudo fink install gv

These commands install ghostscript and gv in the directory /sw/bin. You must add this directory to your $PATH variable; this can be done by invoking specific script-shells provided by Fink, namely:

          /sw/bin/init.sh      # for sh, bash, etc.
          /sw/bin/init.csh     # for csh, tcsh, etc.

Then, modify your $PATH variable by adding the two directories:

          /opt/local/bin and /opt/local/sbin

and your $MANPATH variable by adding the directory:

          /opt/local/share/man

Finally, you can install Ghostscript/Ghostscript as follows:

          sudo port install ghostscript
          sudo port install gv


ANNEX D. INSTALLING GNUPLOT FOR MAC OS X 10.4 AND 10.5

Once Fink is installed (see above how to download and install Fink), you can use it to get Gnuplot:

          sudo fink install gnuplot

This command installs gnuplot in the directory /sw/bin. You must add this directory to your $PATH variable.

Note: As of March 2010, we do recommend the use of Fink for MacOS X versions greater than 10.5, because the binary packages for Fink itself and other packages such as Ghostscript are not available, so that extensive recompilations must take place, in the course of which the users will be prompted with many questions interactively.

Once Macports is installed (see above how to download and install Macports), you can use it to get Gnuplot:

          sudo port install gnuplot


ANNEX E. ASSIGNING A STATIC HOSTNAME ON MAC OS X 10.4 AND 10.5

Consult the contents of the file /etc/hostconfig and search for a line starting with "HOSTNAME=".

If there is a line of the form "HOSTNAME=xxx", where xxx denotes an alphanumeric string possibly containing dots (for instance, "jupiter" or "jupiter.univ.edu"), then your machine has already been assigned the static hostname xxx. You can skip to the next section of this document.

If there is a line of the form "HOSTNAME=-AUTOMATIC-", then edit (with super-user privilege) the file /etc/hostconfig, and replace this line with "HOSTNAME=xxx", where xxx denotes the hostname that you want to give to your machine.

If there is no such line starting with "HOSTNAME=", then edit (with super-user privilege) the file /etc/hostconfig, and insert a new line of the form "HOSTNAME=xxx", where xxx denotes the hostname that you want to give to your machine.

After modifying /etc/hostconfig, renew the DHCP lease by executing the following command:

          sudo ipconfig set en0 DHCP

Alternately, you can reboot the machine.


Written by Hubert Garavel. Last updated on 2014/07/23 16:18:16
Back to the CADP Home Page