InstallationMacWithoutMacports

Joel Andersson edited this page Oct 7, 2012 · 4 revisions

Installation on Mac OS X without Macports

The following way has proven to work on Mac OS X Lion (10.7):

 * Install gfortran from http://hpc.sourceforge.net/
 * Update Xcode to latest version (we have tested 4.3) using App Store
 * Open the Preferences inside Xcode and install "Command Line Tools" from the Downloads tab
 * Install CMake from website
 * Compile Ipopt from sources [as described for Linux](InstallationLinux).
 * Install SWIG from sources (the macports version turned out to be corrupted). When calling "configure", pass the argument --without-pcre
 * Check to make sure that Apple's default Python installation works (in our case it was Python 2.7)
 * Install PySide from the website (needed for Spyder) which in turn needed the installation of QT4
 * Install easy_install
 * Install numpy, scipy, ipython, readline, sphinx (needed for spyder) and spyder from easy_install
 * Installing matplotlib failed using easy_install for us. A safer bet is to follow the installation instructions on matplotlib's website.
 * Build and install CasADi just as for Linux above. Note the following:
     - Use the default generator for cmake and compile from the command line. We never managed to get the XCode project generator to work.
     - After uploading Xcode, clang should have been chosen as the C/C++ compiler by CMake. If this is not automatic, issuing `export CC=/usr/bin/clang, export CXX=/usr/bin/clang++` before calling CMake should work as well.