[GRASS-user] Compiling under OSX Mountain Lion

Michael Barton Michael.Barton at asu.edu
Tue Nov 27 07:42:23 PST 2012


Yes. I tried it last week and it failed to compile in several places. I'll try it again today or tomorrow. Here is the workflow I use for compiling under OSX 10.8 in order to have it run in 10.6-10.8. Note that AFAIK, volume display is still broken.


*****
Do this once:

edit /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config/Makefile
change the MACOSX_DEPLOYMENT_TARGET line to:

MACOSX_DEPLOYMENT_TARGET=10.6

Create a script called "python" with the following in it and put it somewhere in your path.

#!/bin/sh
exec arch -i386 pythonw2.6 "$@"

*****
Do this whenever you compile:


export PATH="/Applications/python/bin32:/System/Library/Frameworks/Python.framework/Versions/2.6/bin:$PATH"

export CXX=g++ (this may not be necessary if you don't compile LAS tools)

./configure --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-freetype --with-freetype-includes="/Library/Frameworks/FreeType.framework/unix/include/freetype2 /Library/Frameworks/FreeType.framework/unix/include" --with-freetype-libs=/Library/Frameworks/FreeType.framework/unix/lib --with-gdal=/Library/Frameworks/GDAL.framework/Programs/gdal-config --with-proj --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/Resources/proj --with-geos=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --with-jpeg-includes=/Library/Frameworks/UnixImageIO.framework/unix/include --with-jpeg-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-tiff-includes=/Library/Frameworks/UnixImageIO.framework/unix/include --with-tiff-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib --with-cairo --with-cairo-includes="/Library/Frameworks/cairo.framework/unix/include/cairo /Library/Frameworks/cairo.framework/unix/include" --with-cairo-libs=/Library/Frameworks/cairo.framework/unix/lib --with-cairo-ldflags="-lcairo" --without-postgres --without-mysql --with-odbc --with-sqlite --with-sqlite-libs=/Library/Frameworks/SQLite3.framework/unix/lib --with-sqlite-includes=/Library/Frameworks/SQLite3.framework/unix/include --with-fftw-includes=/Library/Frameworks/FFTW3.framework/unix/include --with-fftw-libs=/Library/Frameworks/FFTW3.framework/unix/lib --with-x --with-cxx --with-opengl=aqua --without-readline --prefix=/Applications/GRASS --enable-macosx-app --with-python --with-wxwidgets=/usr/local/lib/wxPython-unicode-2.8.12.1/bin/wx-config --with-tcltk-includes="/Library/Frameworks/Tcl.framework/Headers /Library/Frameworks/Tk.framework/Headers /Library/Frameworks/Tk.framework/PrivateHeaders" --with-tcltk-libs="/usr/local/tcltk_active/lib" --with-macosx-archs="i386 x86_64" --with-nls --with-liblas="/usr/local/bin/liblas-config"

(take out --with-nls --with-liblas="/usr/local/bin/liblas-config if you have not compiled gettext and liblas)

For GRASS 6.x, simply run make
For GRASS 7.x, run make GDAL_DYNAMIC=

If you are just running this on your local machine, a simple make install will work. If you want others to use it, you may want to bundle wxpython and other libraries. There are some other steps to that. Let me know if you need them.

Michael

______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ  85287-2402
USA

voice:  480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:          480-965-7671(SHESC), 480-727-0709 (CSDC)
www:  http://csdc.asu.edu, http://shesc.asu.edu
http://www.public.asu.edu/~cmbarton

On Nov 27, 2012, at 12:14 AM, <grass-user-request at lists.osgeo.org<mailto:grass-user-request at lists.osgeo.org>>
 wrote:

From: Markus Neteler <neteler at osgeo.org<mailto:neteler at osgeo.org>>
Subject: Re: [GRASS-user] Compiling under OSX Mountain Lion
Date: November 26, 2012 2:11:26 PM MST
To: Carlos Grohmann <carlos.grohmann at gmail.com<mailto:carlos.grohmann at gmail.com>>
Cc: GRASS user list <grass-user at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>>


Hi Carlos,

On Mon, Nov 26, 2012 at 6:24 PM, Carlos Grohmann
<carlos.grohmann at gmail.com<mailto:carlos.grohmann at gmail.com>> wrote:
Hi all,

I'm trying to compile GRASS 7.0 svn on OSX Mountain Lion (10.8) here.

Compilation seems to go OK, but when running the .app, the wxpython GUI
crashes (I'm using wxpython 2.9.4 cocoa):


Welcome to GRASS 7.0.svn
...

Launching <wxpython> GUI in the background, please wait...
GRASS 7.0.svn (newLocation):~ >
/Applications/GRASS-7.0.app/Contents/MacOS/etc/gui/wxpython/wxgui.py:54:
wxPyDeprecationWarning: Call to deprecated item 'InitAllImageHandlers'.
 wx.InitAllImageHandlers()
/Applications/GRASS-7.0.app/Contents/MacOS/etc/gui/wxpython/gui_core/goutput.py:230:
wxPyDeprecationWarning: Call to deprecated item 'SetVirtualSizeHints'.
 outputSizer.SetVirtualSizeHints(self.panelOutput)
Traceback (most recent call last):
 File
"/Applications/GRASS-7.0.app/Contents/MacOS/etc/gui/wxpython/mapdisp/mapwindow.py",
line 351, in OnPaint
   self.PrepareDC(dc)
AttributeError: 'BufferedWindow' object has no attribute 'PrepareDC'

please update from SVN just to exclude that you fell into the middle of the
wxGUI refactoring. If it persists, maybe Anna or Vaclav can help.

Best
Markus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20121127/cbb1638f/attachment-0001.html>


More information about the grass-user mailing list