[GRASS-dev] compiling 7.0 on MacOS 10.9

Has anyone compiled GRASS 7.0 on MacOS Mavricks? Any tips?
Thanks,

···
-- 
Micha Silver
GIS Consulting
052-3665918
[http://www.surfaces.co.il](http://www.surfaces.co.il)

Micha,

i use homebrew to satisfy the dependencies for grass7

./configure
–with-opengl-includes=/opt/X11/include/
–with-opengl-libs=/opt/X11/lib/
–with-cairo-includes=/usr/local/Cellar/cairo/1.12.16/include/cairo/
–with-cairo-libs=/usr/local/Cellar/cairo/1.12.16/lib/
–with-freetype-includes=/usr/local/include/freetype2
–with-blas
–with-geos
–with-lapack
–with-netcdf
–with-odbc
–with-pthread
–with-postgres
–with-sqlite
–with-wxwidgets=/usr/local/Cellar/wxmac/3.0.0.0/bin/wx-config

the build ends with Errors in:
/Users/epi/dev/grass7_trunk/lib/nviz
/Users/epi/dev/grass7_trunk/misc/m.nviz.image
/Users/epi/dev/grass7_trunk/visualization/wximgview

The modules are all fully functionals but because i use python from home-brew as well (not the system one)
it is 64 bit and is not compatible with wx-2.8 … i have wx3.0 installed (that’s 64bit) but the main gui doesn’t start.
This the log from :

g.gui gui=wxpython

Launching GUI in the background, please wait…
GRASS 7.0.svn (nc_spm_08_grass7):~ > Traceback (most recent call last):
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/wxgui.py”, line 143, in
sys.exit(main())
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/wxgui.py”, line 136, in main
app = GMApp(workspaceFile)
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/wxgui.py”, line 50, in init
wx.App.init(self, False)
File “/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_core.py”, line 8631, in init
self._BootstrapApp()
File “/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_core.py”, line 8196, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/wxgui.py”, line 84, in OnInit
workspace = self.workspaceFile)
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/lmgr/frame.py”, line 109, in init
self._menuTreeBuilder = LayerManagerMenuData()
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/lmgr/menudata.py”, line 40, in init
MenuTreeModelBuilder.init(self, filename, expandAddons=expandAddons)
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/core/menutree.py”, line 69, in init
xmlTree = etree.parse(filename)
File “/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py”, line 1182, in parse
tree.parse(source, parser)
File “/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py”, line 657, in parse
self._root = parser.close()
File “/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py”, line 1654, in close
self._raiseerror(v)
File “/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py”, line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: no element found: line 1, column 0

the wx dialog for (most but not all **) the grass modules, works fine.
** command like g.region, r.mask and others do not lunch a gui dialog when type their name in the grass shell.

Massimo.

···
-- 
Micha Silver
GIS Consulting
052-3665918
[http://www.surfaces.co.il](http://www.surfaces.co.il/)

grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

···

Thanks.
We would be satisfied to get it working without the gui for now. But even that threw many more errors when compiling.

We had to have a huge configure line, pointing many --with-xxx-includes= and --with-xxx-libs= to the /usr/local/Cellar directory. Otherwise it did not find them.

Regards,

On 02/04/2014 11:37, epi wrote:

Micha,

i use homebrew to satisfy the dependencies for grass7

./configure
–with-opengl-includes=/opt/X11/include/
–with-opengl-libs=/opt/X11/lib/
–with-cairo-includes=/usr/local/Cellar/cairo/1.12.16/include/cairo/
–with-cairo-libs=/usr/local/Cellar/cairo/1.12.16/lib/
–with-freetype-includes=/usr/local/include/freetype2
–with-blas
–with-geos
–with-lapack
–with-netcdf
–with-odbc
–with-pthread
–with-postgres
–with-sqlite
–with-wxwidgets=/usr/local/Cellar/wxmac/3.0.0.0/bin/wx-config

the build ends with Errors in:
/Users/epi/dev/grass7_trunk/lib/nviz
/Users/epi/dev/grass7_trunk/misc/m.nviz.image
/Users/epi/dev/grass7_trunk/visualization/wximgview

The modules are all fully functionals but because i use python from home-brew as well (not the system one)
it is 64 bit and is not compatible with wx-2.8 … i have wx3.0 installed (that’s 64bit) but the main gui doesn’t start.
This the log from :

g.gui gui=wxpython

Launching GUI in the background, please wait…
GRASS 7.0.svn (nc_spm_08_grass7):~ > Traceback (most recent call last):
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/wxgui.py”, line 143, in
sys.exit(main())
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/wxgui.py”, line 136, in main
app = GMApp(workspaceFile)
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/wxgui.py”, line 50, in init
wx.App.init(self, False)
File “/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_core.py”, line 8631, in init
self._BootstrapApp()
File “/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_core.py”, line 8196, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/wxgui.py”, line 84, in OnInit
workspace = self.workspaceFile)
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/lmgr/frame.py”, line 109, in init
self._menuTreeBuilder = LayerManagerMenuData()
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/lmgr/menudata.py”, line 40, in init
MenuTreeModelBuilder.init(self, filename, expandAddons=expandAddons)
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/core/menutree.py”, line 69, in init
xmlTree = etree.parse(filename)
File “/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py”, line 1182, in parse
tree.parse(source, parser)
File “/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py”, line 657, in parse
self._root = parser.close()
File “/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py”, line 1654, in close
self._raiseerror(v)
File “/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py”, line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: no element found: line 1, column 0

the wx dialog for (most but not all **) the grass modules, works fine.
** command like g.region, r.mask and others do not lunch a gui dialog when type their name in the grass shell.

Massimo.

On Apr 2, 2014, at 9:48 AM, Micha Silver <micha@arava.co.il> wrote:

Has anyone compiled GRASS 7.0 on MacOS Mavricks? Any tips?
Thanks,

_______________________________________________ grass-dev mailing list

This mail was received via Mail-SeCure System.

-- 
Micha Silver
GIS Consulting
052-3665918
[http://www.surfaces.co.il](http://www.surfaces.co.il)

-- 
Micha Silver
GIS Consulting
052-3665918
[http://www.surfaces.co.il](http://www.surfaces.co.il/)

grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Wed, Apr 2, 2014 at 4:37 AM, epi <massimodisasha@gmail.com> wrote:

the build ends with Errors in:
/Users/epi/dev/grass7_trunk/lib/nviz
/Users/epi/dev/grass7_trunk/misc/m.nviz.image

This looks like a problem to link OpenGL.

/Users/epi/dev/grass7_trunk/visualization/wximgview

This looks like a problem to link wxWidgets (the C++ library, not the

Python binding wxPython).

The modules are all fully functionals but because i use python from
home-brew as well (not the system one)
it is 64 bit and is not compatible with wx-2.8 … i have wx3.0 installed
(that’s 64bit) but the main gui doesn’t start.
This the log from :

g.gui gui=wxpython

Launching <wxpython> GUI in the background, please wait...
GRASS 7.0.svn (nc_spm_08_grass7):~ > Traceback (most recent call last):
  File "/usr/local/grass-7.0.svn/etc/gui/wxpython/wxgui.py", line 143, in
<module>
    ...
    self._menuTreeBuilder = LayerManagerMenuData()
  File "/usr/local/grass-7.0.svn/etc/gui/wxpython/lmgr/menudata.py", line
40, in __init__
    MenuTreeModelBuilder.__init__(self, filename,
expandAddons=expandAddons)
  File "/usr/local/grass-7.0.svn/etc/gui/wxpython/core/menutree.py", line
69, in __init__
    xmlTree = etree.parse(filename)
  ...
  File
"/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py",
line 1506, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: no element found: line 1, column 0

This is probably caused by the fact that compilation for gui/wxpython/xml

failed. I secretly hoped that this will be improved by r59485, are you
using that version? The workaround used before was delete
dist.../etc/gui/wxpython/xml and then run compilation of gui/wxpython
inside GRASS session.

https://trac.osgeo.org/grass/changeset/59485 (modify Rules.make to fix
build_modules_xml.py on Windows (TODO: replace this workaround))
http://lists.osgeo.org/pipermail/grass-dev/2014-March/067876.html (get
interface description for python modules on Windows)

the wx dialog for (most but not all **) the grass modules, works fine.

** command like g.region, r.mask and others do not lunch a gui dialog when
type their name in the grass shell.

This is actually standard behavior. Probably not documented well. This is

how g.region parameters are handled. Use `g.region --ui`.

Massimo.

On Apr 2, 2014, at 9:48 AM, Micha Silver <micha@arava.co.il> wrote:

Has anyone compiled GRASS 7.0 on MacOS Mavricks? Any tips?
Thanks,

--
Micha Silver
GIS Consulting
052-3665918http://www.surfaces.co.il

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Apr 2, 2014, at 4:10 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On Wed, Apr 2, 2014 at 4:37 AM, epi <massimodisasha@gmail.com> wrote:

the build ends with Errors in:
/Users/epi/dev/grass7_trunk/lib/nviz
/Users/epi/dev/grass7_trunk/misc/m.nviz.image

This looks like a problem to link OpenGL.

That’s correct, for some reason seems that it doesn’t detect the right architecture :

MacBook-Pro-di-Massimo-2:nviz epi$ make
cc -dynamiclib -compatibility_version 7.1 -current_version 7.1 -install_name /usr/local/grass-7.1.svn/lib/libgrass_nviz.7.1.svn.dylib -o /Users/epi/dev/grass7_trunk/dist.x86_64-apple-darwin13.1.0/lib/libgrass_nviz.7.1.svn.dylib -L/Users/epi/dev/grass7_trunk/dist.x86_64-apple-darwin13.1.0/lib -L/Users/epi/dev/grass7_trunk/dist.x86_64-apple-darwin13.1.0/lib -L/usr/local/opt/tcl-tk/lib -arch x86_64 OBJ.x86_64-apple-darwin13.1.0/change_view.o OBJ.x86_64-apple-darwin13.1.0/cplanes_obj.o OBJ.x86_64-apple-darwin13.1.0/draw.o OBJ.x86_64-apple-darwin13.1.0/exag.o OBJ.x86_64-apple-darwin13.1.0/lights.o OBJ.x86_64-apple-darwin13.1.0/map_obj.o OBJ.x86_64-apple-darwin13.1.0/nviz.o OBJ.x86_64-apple-darwin13.1.0/position.o OBJ.x86_64-apple-darwin13.1.0/render.o -lgrass_ogsf.7.1.svn -lgrass_gis.7.1.svn -L/opt/X11/lib/ -lGL
Undefined symbols for architecture x86_64:
“_XCloseDisplay”, referenced from:
_Nviz_destroy_render_window in render.o
“_XCreatePixmap”, referenced from:
_Nviz_create_render_window in render.o
“_XFree”, referenced from:
_Nviz_create_render_window in render.o
“_XFreePixmap”, referenced from:
_Nviz_destroy_render_window in render.o
“_XOpenDisplay”, referenced from:
_Nviz_create_render_window in render.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/epi/dev/grass7_trunk/dist.x86_64-apple-darwin13.1.0/lib/libgrass_nviz.7.1.svn.dylib] Error 1

MacBook-Pro-di-Massimo-2:~ epi$ file /opt/X11/lib/libGL.dylib
/opt/X11/lib/libGL.dylib: Mach-O universal binary with 2 architectures
/opt/X11/lib/libGL.dylib (for architecture i386): Mach-O dynamically linked shared library i386
/opt/X11/lib/libGL.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64

/Users/epi/dev/grass7_trunk/visualization/wximgview

This looks like a problem to link wxWidgets (the C++ library, not the Python binding wxPython).

i fixed this adding a sim. link in use/local

ln -s /usr/local/Cellar/wxmac/3.0.0.0/lib/libwx_osx_cocoau-3.0.0.0.0.dylib /usr/local/lib/

The modules are all fully functionals but because i use python from home-brew as well (not the system one)
it is 64 bit and is not compatible with wx-2.8 … i have wx3.0 installed (that’s 64bit) but the main gui doesn’t start.
This the log from :

g.gui gui=wxpython

Launching GUI in the background, please wait…
GRASS 7.0.svn (nc_spm_08_grass7):~ > Traceback (most recent call last):
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/wxgui.py”, line 143, in

self._menuTreeBuilder = LayerManagerMenuData()
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/lmgr/menudata.py”, line 40, in init
MenuTreeModelBuilder.init(self, filename, expandAddons=expandAddons)
File “/usr/local/grass-7.0.svn/etc/gui/wxpython/core/menutree.py”, line 69, in init
xmlTree = etree.parse(filename)

File “/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py”, line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: no element found: line 1, column 0

This is probably caused by the fact that compilation for gui/wxpython/xml failed. I secretly hoped that this will be improved by r59485, are you using that version? The workaround used before was delete dist…/etc/gui/wxpython/xml and then run compilation of gui/wxpython inside GRASS session.

thanks! i followed this procedure, now the gui starts :slight_smile: and it is usable.

a problem witth Wx font already reported previously :

http://lists.osgeo.org/pipermail/grass-dev/2013-December/066536.html

is still here, i have this log printed in the shell all the time i use the gui :

2014-04-02 23:31:51.720 Python[78021:d07] CoreText performance note: Client called CTFontCreateWithName() using name “.Lucida Grande UI” and got font with PostScript name “.LucidaGrandeUI”. For best performance, only use PostScript names when calling this API.

i know it is a known problem,
http://forums.wxwidgets.org/viewtopic.php?f=23&t=38311
i hoped it was a 2.9 bug … while it still here with wx3.0

https://trac.osgeo.org/grass/changeset/59485 (modify Rules.make to fix build_modules_xml.py on Windows (TODO: replace this workaround))
http://lists.osgeo.org/pipermail/grass-dev/2014-March/067876.html (get interface description for python modules on Windows)

the wx dialog for (most but not all **) the grass modules, works fine.

** command like g.region, r.mask and others do not lunch a gui dialog when type their name in the grass shell.

This is actually standard behavior. Probably not documented well. This is how g.region parameters are handled. Use g.region --ui.

i was aware that’s the standard behavior, but i found it a bit incoherent compared with what the other modules do.
Is there any reason for that ?

thanks!

Massimo.

On Apr 2, 2014, at 9:48 AM, Micha Silver <micha@arava.co.il> wrote:

Has anyone compiled GRASS 7.0 on MacOS Mavricks? Any tips?
Thanks,

-- 
Micha Silver
GIS Consulting
052-3665918
[http://www.surfaces.co.il](http://www.surfaces.co.il/)


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

epi wrote:

> This looks like a problem to link OpenGL.

That�s correct, for some reason seems that it doesn�t detect the right architecture :

The configure script doesn't attempt to detect the architecture. The
default is --with-opengl=yes, which is equivalent to --with-opengl=x11.

For MacOSX, you need to use --with-opengl=mac (any of mac, macosx,
osx, aqua and agl will work).

--
Glynn Clements <glynn@gclements.plus.com>

On Wed, Apr 2, 2014 at 5:47 PM, epi <massimodisasha@gmail.com> wrote:

https://trac.osgeo.org/grass/changeset/59485 (modify Rules.make to fix
build_modules_xml.py on Windows (TODO: replace this workaround))
http://lists.osgeo.org/pipermail/grass-dev/2014-March/067876.html (get
interface description for python modules on Windows)
>
>
> the wx dialog for (most but not all **) the grass modules, works fine.

** command like g.region, r.mask and others do not lunch a gui dialog
when type their name in the grass shell.

This is actually standard behavior. Probably not documented well. This is

how g.region parameters are handled. Use `g.region --ui`.

i was aware that’s the standard behavior, but i found it a bit incoherent
compared with what the other modules do.
Is there any reason for that ?

If you think it is wrong or badly documented, you should open separate
thread for it and not confuse it compilation issues. If you decide to do
so, do a mailing list and Trac issues search beforehand.