Difference between revisions of "Installation/Mac OS/OpenFOAM 2.2.2"

From OpenFOAMWiki
(Created page with " == Introduction and Notes == This guide is derived from <span class="plainlinks">[http://openfoamwiki.net/index.php/Installation/Mac_OS/OpenFOAM_2.1.x OpenFOAM 2.1.x Install...")
 
Line 36: Line 36:
 
sudo xcodebuild -license
 
sudo xcodebuild -license
 
</bash>
 
</bash>
 +
and when asked type "agree" to accept the license. Now xCode "things" should work correctly.
  
 +
==== MacPorts Installation ====
 +
Now to install Macports you can download the pre-compiled package from the [http://www.macports.org/install.php#pkg Official Website].
  
and when asked type "agree" to accept the license. Now xCode "things" should work correctly
+
=== Build and Install the necessary software ===
 +
To install all the tools we'll need run in Terminal:
 +
<bash>
 +
sudo port selfupdate
 +
</bash>
 +
Wait for the end of all operations then do:
 +
<bash>
 +
sudo port install gcc46 openmpi boost cgal ccache flex bison
 +
</bash>

Revision as of 12:25, 15 November 2013

1 Introduction and Notes

This guide is derived from OpenFOAM 2.1.x Installation with some modifications derived thanks to help provided on this thread of CFD Online Forum . The format of the page is based on OpenFOAM 1.7.x Installation.

These compilation instructions have only been tested on the following system:

Macbook (version 6,2)
Intel Core i7 2.66Ghz
Mac OS X Mavericks (version 10.9)

These instructions may need to be tailored as required to fit your specific system if they deviate from the above; you would be able to ask support on this thread if you needed it.

Many thanks go to Bernhard Gschaider (a.k.a. gschaider) of CFD Online for maintaining the latest OpenFOAM Mac OS X patches and for the big help that he provided me.

2 Prepare your Mac OS X Environment

2.1 Macports

To install Macports you need to install xCode, you can find it on the App Store. After XCode you need to install the Command Line Tools. Installing Command Line Tools for Mavericks is different from what you would do with previous OSX versions.

2.1.1 Command Line Tools for OSX 10.9 "Mavericks"

To install CLT on OSX 10.9 open a terminal application (for example Terminal.app) and run

 
xcode-select --install

a window will be prompted where you can confirm installation.

2.1.2 Command Line Tools for OSX version < 10.9

In previous versions of OSX (and of xCode) you can download CLT directly from xCode Preferences > Downloads > Components

2.1.3 xCode License

Now you should accept the xCode License so run, always in the Terminal (this could be needed only on OSX 10.9)

 
sudo xcodebuild -license

and when asked type "agree" to accept the license. Now xCode "things" should work correctly.

2.1.4 MacPorts Installation

Now to install Macports you can download the pre-compiled package from the Official Website.

2.2 Build and Install the necessary software

To install all the tools we'll need run in Terminal:

 
sudo port selfupdate

Wait for the end of all operations then do:

 
sudo port install gcc46 openmpi boost cgal ccache flex bison