Building on OS X.

OS X is a Unix-based OS and ships with many of the basic components needed to build COIN-OR, but it's missing some things. For examples, the latest versions of OS X come with the clang compiler but no Fortran compiler. You may also be missing the wget utility and subversion and git clients (needed for obtaining source code). The easiest way to get these missing utilitites is to install Homebrew (see http://brew.sh). After installation, open a terminal and do

brew install gcc wget svn git

To obtain the source code, the first step is to get the installer that will then fetch the source for SYMPHONY and all its dependencies. *You do not need to clone SYMPHONY first, just do the following!* Open a terminal and execute

git clone https://www.github.com/coin-or/coinbrew

Next, to check out source code for and build all the necessary projects (including dependencies), execute the script in the coinbrew subdirectory. To execute the script, do

cd COIN-OR-OptimizationSuite
chmod u+x coi.install.sh
./coin.install.sh

(Note: The chmod command is only needed if the execute permission is not automatically set by git on cloning). Once you run the script, you will be prompted interactively to select a project to fetch and build. the rest should happen automagically. Alternatively, the following command-line incantation will execute the procedure non-interactively.

./coinbrew fetch build SYMPHONY@\VER

With this setup, clang will be used for compiling C++ by default. If you want to use the gcc compiler provided by Homebrew, then replace the build command above with

./coinbrew fetch build SYMPHONY@\VER CC=gcc-* CXX=g++-*
where * is the version number of gcc. The install script invokes a separate configure script that is auto-generated using the GNU autotools. This script takes a wide range of additional options and these options can be specified on the commnd-line when running coinbrew. For example, to build with debugging symbols, do

./coinbrew fetch build SYMPHONY@\VER --enable-debug

To get help with additional options available in running the script, do

./coinbrew --help

If you wish to install in a different directory, such as /usr/local, then run the command

./coinbrew fetch build SYMPHONY@\VER --prefix=/path/to/install/dir

After installation, you will also need to add /path/to/install/dir/bin to your PATH variable in your .bashrc and also add /path/to/install/dir/lib to your DYLD_LIBRARY_PATH if you want to link to COIN libraries.