[GRASS-user] Grass on MacOS (Ken Mankoff)

Ken & Co.

You might find this of interest.

I’ve been working off and on for the past several month to find a new way to compile and distribute GRASS for Mac with all dependencies created outside the Mac system folders and bundled with it. The goal is to eliminate the SIP problem and the potential for conflicts with different versions of dependencies/frameworks/python/wxpython.

With a lot of help from colleague Eric Hutton (Community Surface Dynamics Modeling System), we are very close to having a reproducible and distributable build of GRASS under Anaconda. Our goal is to compile GRASS in an Anaconda environment so that it is distributable in two related ways: as a standard Mac package and app, and as an Anaconda package (installed via the command ‘conda install [grass version]’). This will be a fully 64 bit GRASS version using wxPython 3 for the GUI.

Due to the many other responsibilities and pulls on our time, Eric and I have only been able to work sporadically. But as of this week we are down to one main baffling and annoying problem left to solve. Then we can do some clean up and begin making this build available to test. With that in mind, if anyone has experience in creating Mac *.app and *.pkg environments for distribution, please get in touch. You might be able to help us get over the last hurdle.

Cheers
Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)

www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Jan 14, 2018, at 1:00 PM, grass-user-request@lists.osgeo.org wrote:

From: Ken Mankoff <mankoff@gmail.com>

Subject: Re: [GRASS-user] Grass on MacOS

Date: January 14, 2018 at 7:46:27 AM MST

To: Adam Dershowitz <adershowitz@exponent.com>

Cc: Carlos Grohmann <carlos.grohmann@gmail.com>, “grass-user@lists.osgeo.org” <grass-user@lists.osgeo.org>

Hi Adam,

I’m glad to hear you got GRASS working on OS X w/ MacPorts. That is the system I use too. I recently switched from HomeBrew. I got GRASS working with fink too, but prefer MacPorts, although there are some MacPort-specific issues if you want to use the temporal framework.

I found it helpful to set GRASS_PYTHON and have it pointing to

export GRASS_PYTHON=/opt/local/bin/python2.7

I don’t like installing 3rd-party frameworks, so I also have QGIS installed via MacPorts and it works well.

For GRASS, I had to “sudo port install gdal +netcdf” in order to be able to read in NetCDF files. For QGIS I did “sudo port install QGIS +qt4 +grass”.

-k.

On 2018-01-14 at 00:37, Adam Dershowitz <adershowitz@exponent.com> wrote:

Thanks, but…I use Macports for a bunch of things, and homebrew and
maports don’t play well together. So, I can’t easily do that. I did
get the macports version to work after I asked the question. It was
actually just due to the fact that I have been using the Kyngchoas
version for a long time, and that used to require that GRASS_PYTHON be
set in .bash_profile. But, I had set it to point to an old directory a
while back, and that folder didn’t exist. So, I just had to delete
that environmental variable and the macports version now works fine.
And, the Kyngchaos version of qgis does seem to work fine.

Thanks for the suggestion. I suppose that it would be useful to have
working binaries to avoid these kinds of issues.

This is good news. Did you take a look at the modified startup script I sent the other day?

Michael Barton
School of Human Evolution &Social Change
Center for Social Dynamics & Complexity
Arizona State University

…Sent from my iPad

···

On Jan 14, 2018, at 3:23 PM, Eric Hutton <hutton.eric@gmail.com> wrote:

Hi Michael

Thanks for your earlier clarification about how grass runs (I was missing a key point!). I think I have a solution now. Basically, the Grass72.app/Contents/MacOS/Grass script now opens up a terminal and, within that terminal, executes the startup script (the one we were using before, which is now Grass.sh).

You can see what I mean here:

https://github.com/mcflugen/grass-conda-build/tree/master/osx/Grass72.app/Contents/MacOS

I’ll start to make a new app but the one I have seems to be working now (I’ve been using the NC data you sent me).

Eric

On Sun, Jan 14, 2018 at 1:31 PM Michael Barton <Michael.Barton@asu.edu> wrote:

Ken & Co.

You might find this of interest.

I’ve been working off and on for the past several month to find a new way to compile and distribute GRASS for Mac with all dependencies created outside the Mac system folders and bundled with it. The goal is to eliminate the SIP problem and the potential for conflicts with different versions of dependencies/frameworks/python/wxpython.

With a lot of help from colleague Eric Hutton (Community Surface Dynamics Modeling System), we are very close to having a reproducible and distributable build of GRASS under Anaconda. Our goal is to compile GRASS in an Anaconda environment so that it is distributable in two related ways: as a standard Mac package and app, and as an Anaconda package (installed via the command ‘conda install [grass version]’). This will be a fully 64 bit GRASS version using wxPython 3 for the GUI.

Due to the many other responsibilities and pulls on our time, Eric and I have only been able to work sporadically. But as of this week we are down to one main baffling and annoying problem left to solve. Then we can do some clean up and begin making this build available to test. With that in mind, if anyone has experience in creating Mac *.app and *.pkg environments for distribution, please get in touch. You might be able to help us get over the last hurdle.

Cheers
Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)

www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Jan 14, 2018, at 1:00 PM, grass-user-request@lists.osgeo.org wrote:

From: Ken Mankoff <mankoff@gmail.com>

Subject: Re: [GRASS-user] Grass on MacOS

Date: January 14, 2018 at 7:46:27 AM MST

To: Adam Dershowitz <adershowitz@exponent.com>

Cc: Carlos Grohmann <carlos.grohmann@gmail.com>, “grass-user@lists.osgeo.org” <grass-user@lists.osgeo.org>

Hi Adam,

I’m glad to hear you got GRASS working on OS X w/ MacPorts. That is the system I use too. I recently switched from HomeBrew. I got GRASS working with fink too, but prefer MacPorts, although there are some MacPort-specific issues if you want to use the temporal framework.

I found it helpful to set GRASS_PYTHON and have it pointing to

export GRASS_PYTHON=/opt/local/bin/python2.7

I don’t like installing 3rd-party frameworks, so I also have QGIS installed via MacPorts and it works well.

For GRASS, I had to “sudo port install gdal +netcdf” in order to be able to read in NetCDF files. For QGIS I did “sudo port install QGIS +qt4 +grass”.

-k.

On 2018-01-14 at 00:37, Adam Dershowitz <adershowitz@exponent.com> wrote:

Thanks, but…I use Macports for a bunch of things, and homebrew and
maports don’t play well together. So, I can’t easily do that. I did
get the macports version to work after I asked the question. It was
actually just due to the fact that I have been using the Kyngchoas
version for a long time, and that used to require that GRASS_PYTHON be
set in .bash_profile. But, I had set it to point to an old directory a
while back, and that folder didn’t exist. So, I just had to delete
that environmental variable and the macports version now works fine.
And, the Kyngchaos version of qgis does seem to work fine.

Thanks for the suggestion. I suppose that it would be useful to have
working binaries to avoid these kinds of issues.

Eric,

I wrote you on this but apparently it never was sent.

I tested your new app and it works like a charm. Opens with a double click and no problems. There are a couple extra shell scripts in …/Contents/MacOS/ that don’t seem to be called by anything. Or am I just not seeing it? I will try inserting the new start up scripts into my own build tomorrow and see if it works the same.

How did you get the size down so much? I got it close last week by removing the pkg folder, env folder, doc folder, and then some selective items in bin. But I’m hoping your have a more systematic list of what can be removed.

This looks like exactly what is needed. Hopefully I can package it as you did and get it posted to test by the end of the week.

Thanks again
Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)

www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Jan 14, 2018, at 3:23 PM, Eric Hutton <hutton.eric@gmail.com> wrote:

Hi Michael

Thanks for your earlier clarification about how grass runs (I was missing a key point!). I think I have a solution now. Basically, the Grass72.app/Contents/MacOS/Grass script now opens up a terminal and, within that terminal, executes the startup script (the one we were using before, which is now Grass.sh).

You can see what I mean here:

https://github.com/mcflugen/grass-conda-build/tree/master/osx/Grass72.app/Contents/MacOS

I’ll start to make a new app but the one I have seems to be working now (I’ve been using the NC data you sent me).

Eric

On Sun, Jan 14, 2018 at 1:31 PM Michael Barton <Michael.Barton@asu.edu> wrote:

Ken & Co.

You might find this of interest.

I’ve been working off and on for the past several month to find a new way to compile and distribute GRASS for Mac with all dependencies created outside the Mac system folders and bundled with it. The goal is to eliminate the SIP problem and the potential for conflicts with different versions of dependencies/frameworks/python/wxpython.

With a lot of help from colleague Eric Hutton (Community Surface Dynamics Modeling System), we are very close to having a reproducible and distributable build of GRASS under Anaconda. Our goal is to compile GRASS in an Anaconda environment so that it is distributable in two related ways: as a standard Mac package and app, and as an Anaconda package (installed via the command ‘conda install [grass version]’). This will be a fully 64 bit GRASS version using wxPython 3 for the GUI.

Due to the many other responsibilities and pulls on our time, Eric and I have only been able to work sporadically. But as of this week we are down to one main baffling and annoying problem left to solve. Then we can do some clean up and begin making this build available to test. With that in mind, if anyone has experience in creating Mac *.app and *.pkg environments for distribution, please get in touch. You might be able to help us get over the last hurdle.

Cheers
Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)

www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Jan 14, 2018, at 1:00 PM, grass-user-request@lists.osgeo.org wrote:

From: Ken Mankoff <mankoff@gmail.com>

Subject: Re: [GRASS-user] Grass on MacOS

Date: January 14, 2018 at 7:46:27 AM MST

To: Adam Dershowitz <adershowitz@exponent.com>

Cc: Carlos Grohmann <carlos.grohmann@gmail.com>, “grass-user@lists.osgeo.org” <grass-user@lists.osgeo.org>

Hi Adam,

I’m glad to hear you got GRASS working on OS X w/ MacPorts. That is the system I use too. I recently switched from HomeBrew. I got GRASS working with fink too, but prefer MacPorts, although there are some MacPort-specific issues if you want to use the temporal framework.

I found it helpful to set GRASS_PYTHON and have it pointing to

export GRASS_PYTHON=/opt/local/bin/python2.7

I don’t like installing 3rd-party frameworks, so I also have QGIS installed via MacPorts and it works well.

For GRASS, I had to “sudo port install gdal +netcdf” in order to be able to read in NetCDF files. For QGIS I did “sudo port install QGIS +qt4 +grass”.

-k.

On 2018-01-14 at 00:37, Adam Dershowitz <adershowitz@exponent.com> wrote:

Thanks, but…I use Macports for a bunch of things, and homebrew and
maports don’t play well together. So, I can’t easily do that. I did
get the macports version to work after I asked the question. It was
actually just due to the fact that I have been using the Kyngchoas
version for a long time, and that used to require that GRASS_PYTHON be
set in .bash_profile. But, I had set it to point to an old directory a
while back, and that folder didn’t exist. So, I just had to delete
that environmental variable and the macports version now works fine.
And, the Kyngchaos version of qgis does seem to work fine.

Thanks for the suggestion. I suppose that it would be useful to have
working binaries to avoid these kinds of issues.

Hi Michael,

Although my name is in the subject, I didn't get this email until just now - Apparently I have a filter that is too aggressive - I follow the grass-users list but not the grass-dev list, and even though I was on the "To:" field I didn't get it.

Anyway, using Anaconda is a neat idea. I'm happy with MacPorts for now, but will test this, and be very interested if it offers more bleeding-edge versions than MacPorts (still at 7.2.2), or improves on some existing bugs (g.extension, t.*, etc.). I note that Linux users also use Anaconda so your user base may grow larger than the MacPorts base.

Thank you!

  -k

On 2018-01-14 at 20:31, Michael Barton <Michael.Barton@asu.edu> wrote:

Ken & Co.

You might find this of interest.

I've been working off and on for the past several month to find a new
way to compile and distribute GRASS for Mac with all dependencies
created outside the Mac system folders and bundled with it. The goal
is to eliminate the SIP problem and the potential for conflicts with
different versions of dependencies/frameworks/python/wxpython.

With a lot of help from colleague Eric Hutton (Community Surface
Dynamics Modeling System), we are very close to having a reproducible
and distributable build of GRASS under Anaconda. Our goal is to
compile GRASS in an Anaconda environment so that it is distributable
in two related ways: as a standard Mac package and app, and as an
Anaconda package (installed via the command 'conda install [grass
version]'). This will be a fully 64 bit GRASS version using wxPython 3
for the GUI.

Due to the many other responsibilities and pulls on our time, Eric and
I have only been able to work sporadically. But as of this week we are
down to one main baffling and annoying problem left to solve. Then we
can do some clean up and begin making this build available to test.
With that in mind, if anyone has experience in creating Mac *.app and
*.pkg environments for distribution, please get in touch. You might be
able to help us get over the last hurdle.

Cheers
Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University

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