Difference between revisions of "Installation of yade on MacOSX Leopard"

From Yade

 
Line 36: Line 36:
 
=== install boost from sources ===
 
=== install boost from sources ===
   
Since version 0.41, boost can be compiled by:
+
Since version 0.41, boost can easily be compiled in Snow Leopard thanks to macports:
  +
 
$ sudo port install boost
 
$ sudo port install boost
   

Latest revision as of 22:55, 10 March 2010

WARNING NOT YET READY!

Tools needed for Yade installation

Bazaar

We need bazaar (http://bazaar-vcs.org/Download) to get the sources of Yade. For installation from sources, simply type in bazaar's folder the following line:

$ sudo python setup.py install

Enter then your password. Note that python does not need to be installed.

MacPorts

You can get the pkg at http://www.macports.org/install.php. After installation type:

$ sudo port -v selfupdate

Apple X11

1. Insert the "Mac OS X Install DVD" and run the package named "Optional Installs". 2. At the software selection window expand the Applications category and click the check box beside X11 (and nothing else). 3. Click Install to install X11.

DeveloperTools

- install last version of xcode (DeveloperTools, mpkg): http://developer.apple.com/technology/xcode.html (need ADC Member Apple ID and password)


Scons

- install scons (sudo python setup.py install): http://www.scons.org/download.php


Installing dependencies

install boost from sources

Since version 0.41, boost can easily be compiled in Snow Leopard thanks to macports:

$ sudo port install boost

Otherwise, in the source folder of boost, type:

$ export BOOST=`pwd`
$ cd tools/jam/src
$ ./build.sh darwin
$ cd bin.macosxx86/
$ export PATH=`pwd`:$PATH
$ cd $BOOST
$ bjam --toolset=darwin --with-thread --with-filesystem --with-iostreams --with-regex --with-program_options --with-python --with-system --with-date_time --with-serialization stage
$ sudo bjam --toolset=darwin --with-thread --with-filesystem --with-iostreams --with-regex --with-program_options --with-python --with-system --with-date_time --with-serialization install

Then add some symbolic links (the example is for boost 1.39)

ln -s /usr/local/lib/libboost-filesystem-mt-1_39.dylib /usr/local/lib/libboost-filesystem-mt.dylib
ln -s /usr/local/lib/libboost-python-mt-1_39.dylib /usr/local/lib/libboost-python-mt.dylib
...
ln -s /usr/local/include/boost-1_39 /usr/local/include/boost

CGAL (version >= 3.4)

Get the sources here http://www.cgal.org/download.html

Specify the boost include directory. For example:

export BOOST_INCLUDEDIR=/usr/local/include/boost

Configure with cmake (that can be installed with sudo port install cmake):

cmake .

Then, build and install CGAL:

make
sudo make install

= example of scons.profile-default

PREFIX = '/Users/richefeu/Documents/YADE'
exclude = 'none'
features = 'gts,log4cxx,opengl,openmp,python'
version = 'vr'
QTDIR = ['/usr/share/qt3', '/usr/lib/qt', '/usr/lib/qt3', '/usr/qt/3', '/usr/lib/qt-3.3']
CXXFLAGS = ['-I/usr/local/include/boost-1_39', '-L/usr/local/bin']
SHCCFLAGS = ['-fPIC']

- install gnuplot: sudo port install gnuplot

- install glib2 (macports) - need g++ >= 4.2 (and g++ >= 4.3 for openMP support)


Compilation

TODO