Difference between revisions of "Compiling on MacOSX"

From GRASS-Wiki
Jump to: navigation, search
(cleanup; uptodate notes in source)
Line 1: Line 1:
Up-to-date compilation instructions are maintained in the source <tt>macosx/ReadMe.rtf</tt>.
+
Up-to-date compilation instructions are maintained in the source <tt>[http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/macosx/ReadMe.rtf?format=raw macosx/ReadMe.rtf]</tt>.
 
This builds a double-clickable application with "aqua" options where possible (Tcl/Tk, Python, OpenGL,...)  
 
This builds a double-clickable application with "aqua" options where possible (Tcl/Tk, Python, OpenGL,...)  
 
and leaves out obscure X11-only-based features that have newer system-agnostic options (like motif/xganim),  
 
and leaves out obscure X11-only-based features that have newer system-agnostic options (like motif/xganim),  
Line 17: Line 17:
 
Postgres can be easily compiled from source.
 
Postgres can be easily compiled from source.
  
Download a cvs version http://grass.itc.it/download/index.php
+
Download a SVN version http://grass.osgeo.org/download/index.php
  
Then configure and make grass cvs :
+
Then configure and make GRASS from SVN/source code snapshot :
  
 
<pre>
 
<pre>

Revision as of 11:12, 13 April 2009

Up-to-date compilation instructions are maintained in the source macosx/ReadMe.rtf. This builds a double-clickable application with "aqua" options where possible (Tcl/Tk, Python, OpenGL,...) and leaves out obscure X11-only-based features that have newer system-agnostic options (like motif/xganim), though these newer features may not be quite as fully-featured, yet. The X11 display system is included, since it is simple to include and is still quite useful.

The method below is for the older X11-based compilation, and includes the X11 motif-based xganim.

To build Grass from source you can use the frameworks that are on : http://www.kyngchaos.com/software:frameworks great thanks to W.Kyngesburye.

After installing all the frameworks you can add some library such "motif" needed by Xganim, using fink or build the source code

Install from source the tcl-tk library : http://www.tcl.tk/software/tcltk/downloadnow84.tml in /usr/local

Postgres can be easily compiled from source.

Download a SVN version http://grass.osgeo.org/download/index.php

Then configure and make GRASS from SVN/source code snapshot :

cd /path_to_grass_source

./configure --enable-sysv --with-x --with-opengl=x11 --without-odbc --with-cxx --with-freetype \
--with-freetype-includes=/Library/Frameworks/FreeType.framework/unix/include \
--with-freetype-libs=/Library/Frameworks/FreeType.framework/unix/lib \
--with-gdal=/Library/Frameworks/GDAL.framework/Versions/1.5/Programs/gdal-config \
--with-proj-includes=/Library/Frameworks/PROJ.framework/unix/include \
--with-proj-libs=/Library/Frameworks/PROJ.framework/unix/lib \
--with-proj-share=/Library/Frameworks/PROJ.framework/Versions/4.5/unix/share/ \
--with-jpeg --with-jpeg-includes=/Library/Frameworks/UnixImageIO.framework/unix/include \
--with-jpeg-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib \
--with-tiff --with-tiff-includes=/Library/Frameworks/UnixImageIO.framework/unix/include \
--with-tiff-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib \
--with-png-includes=/Library/Frameworks/UnixImageIO.framework/unix/include \
--with-png-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib \
--with-sqlite --with-sqlite-libs=/Library/Frameworks/SQLite3.framework/unix/lib \
--with-sqlite-includes=/Library/Frameworks/SQLite3.framework/unix/include \
--with-fftw --with-fftw-includes=/Library/Frameworks/FFTW3.framework/unix/include \
--with-fftw-libs=/Library/Frameworks/FFTW3.framework/unix/lib \
--with-postgres-includes=/usr/local/pgsql/include --with-postgres-libs=/usr/local/pgsql/lib \
--with-freetype --with-freetype-includes=/Library/Frameworks/FreeType.framework/unix/include \
--with-freetype-libs=/Library/Frameworks/FreeType.framework/unix/lib --with-python --with-readline \
--with-readline-includes=/sw/include/readline --with-readline-libs=/sw/lib --with-tcltk-includes=/usr/local/include \
--with-tcltk-libs=/usr/local/lib --with-blas --with-lapack \
--with-blas-includes=/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers \
--with-lapack-includes=/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers \
--with-motif --with-motif-includes=/sw/include --with-motif-libs=/sw/lib --with-glw

make
sudo make install