[GRASS-user] GRASS for Mac 64bit, wxPython 3, maybe fix for SIP problem - please test

Adam Dershowitz adershowitz at exponent.com
Thu Jun 2 07:21:23 PDT 2016


There were a bunch of other paths I had to fix as well.  But, after doing the following, it does now run with the gui:


$ install_name_tool -change @loader_path/../../../../libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_core_.so

$ install_name_tool -change @loader_path/../../../../libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_gdi_.so

$ install_name_tool -change @loader_path/../../../../libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_windows_.so

$ install_name_tool -change @loader_path/../../../../libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_controls_.so

$ install_name_tool -change @loader_path/../../../../libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_misc_.so

$ install_name_tool -change @loader_path/../../../../libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_combo.so

$ install_name_tool -change @loader_path/../../../../libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_aui.so

$ install_name_tool -change @loader_path/../../../../libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_html.so

$ install_name_tool -change @loader_path/../../../../libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_gizmos.so

$ install_name_tool -change @loader_path/../../../../libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_stc.so

$ install_name_tool -change @loader_path/../../../../libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libwx_osx_cocoau-3.0.0.2.0.dylib /Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_wizard.so

In addition to the prior fix:

install_name_tool -change /usr/local/lib/libintl.8.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libintl.8.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libgrass_gis.7.3.svn



I opened and displayed a single mapset, so I haven’t tested most other features, but it does now seem to run with SIP enabled.  So, it looks like you just missed the correct paths in the build to a few dynamic libraries that you have correctly included.


Thanks much for getting this going.



-- Adam


From: grass-user <grass-user-bounces at lists.osgeo.org<mailto:grass-user-bounces at lists.osgeo.org>> on behalf of Adam Dershowitz <adershowitz at exponent.com<mailto:adershowitz at exponent.com>>
Date: Thursday, June 2, 2016 at 10:06 AM
To: Michael Barton <Michael.Barton at asu.edu<mailto:Michael.Barton at asu.edu>>, GRASS developers list <grass-dev at lists.osgeo.org<mailto:grass-dev at lists.osgeo.org>>, grass-user grass-user <grass-user at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>>
Subject: Re: [GRASS-user] GRASS for Mac 64bit, wxPython 3, maybe fix for SIP problem - please test

And, I tried fixing that one path like this:


install_name_tool -change /usr/local/lib/libintl.8.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libintl.8.dylib /Applications/GRASS-7.3.app/Contents/MacOS/lib/libgrass_gis.7.3.svn.dylib



but then I get this dynamic library error:


$ '/Applications/GRASS-7.3.app/Contents/MacOS/grass.sh'; exit

Rebuilding Addon HTML manual pages index...

Rebuilding Addon menu...

Python 2.7.10 found.

Cleaning up temporary files...

Starting GRASS GIS...

Traceback (most recent call last):

  File "/Applications/GRASS-7.3.app/Contents/MacOS/gui/wxpython/gis_set.py", line 31, in <module>

    from core import globalvar

  File "/Applications/GRASS-7.3.app/Contents/MacOS/gui/wxpython/core/globalvar.py", line 96, in <module>

    import wx

  File "/Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/__init__.py", line 45, in <module>

    from wx._core import *

  File "/Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_core.py", line 4, in <module>

    import _core_

ImportError: dlopen(/Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_core_.so, 2): Library not loaded: @loader_path/../../../../libwx_osx_cocoau-3.0.0.2.0.dylib

  Referenced from: /Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_core_.so

  Reason: image not found

ERROR: Error in GUI startup. See messages above (if any) and if necessary, please report this error to the GRASS developers.

On systems with package manager, make sure you have the right GUI package, probably named grass-gui, installed.

To run GRASS GIS in text mode use the -text flag.

Exiting...

logout

Saving session...

...copying shared history...

...saving history...truncating history files...

...completed.


[Process completed]


-- Adam


From: Adam Dershowitz <adershowitz at exponent.com<mailto:adershowitz at exponent.com>>
Date: Thursday, June 2, 2016 at 9:54 AM
To: Michael Barton <Michael.Barton at asu.edu<mailto:Michael.Barton at asu.edu>>, GRASS developers list <grass-dev at lists.osgeo.org<mailto:grass-dev at lists.osgeo.org>>, grass-user grass-user <grass-user at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>>
Subject: Re: [GRASS-user] GRASS for Mac 64bit, wxPython 3, maybe fix for SIP problem - please test

Looks like you missed a library, or path.  I just tried it on 10.11 with SIP enabled, and I get this error:


$ '/Applications/GRASS-7.3.app/Contents/MacOS/grass.sh'; exit

Rebuilding Addon HTML manual pages index...

Rebuilding Addon menu...

Python 2.7.10 found.

Cleaning up temporary files...

Starting GRASS GIS...

dyld: Library not loaded: /usr/local/lib/libintl.8.dylib

  Referenced from: /Applications/GRASS-7.3.app/Contents/MacOS/lib/libgrass_gis.7.3.svn.dylib

  Reason: image not found

Traceback (most recent call last):

  File "/Applications/GRASS-7.3.app/Contents/MacOS/gui/wxpython/gis_set.py", line 31, in <module>

    from core import globalvar

  File "/Applications/GRASS-7.3.app/Contents/MacOS/gui/wxpython/core/globalvar.py", line 29, in <module>

    from core.debug import Debug

  File "/Applications/GRASS-7.3.app/Contents/MacOS/gui/wxpython/core/debug.py", line 77, in <module>

    Debug = DebugMsg()

  File "/Applications/GRASS-7.3.app/Contents/MacOS/gui/wxpython/core/debug.py", line 39, in __init__

    self.SetLevel()

  File "/Applications/GRASS-7.3.app/Contents/MacOS/gui/wxpython/core/debug.py", line 45, in SetLevel

    self.debuglevel = int(grass.gisenv().get('WX_DEBUG', 0))

  File "/Applications/GRASS-7.3.app/Contents/MacOS/etc/python/grass/script/core.py", line 953, in gisenv

    s = read_command("g.gisenv", flags='n')

  File "/Applications/GRASS-7.3.app/Contents/MacOS/etc/python/grass/script/core.py", line 458, in read_command

    process = pipe_command(*args, **kwargs)

  File "/Applications/GRASS-7.3.app/Contents/MacOS/etc/python/grass/script/core.py", line 433, in pipe_command

    return start_command(*args, **kwargs)

  File "/Applications/GRASS-7.3.app/Contents/MacOS/etc/python/grass/script/core.py", line 372, in start_command

    if debug_level() > 0:

  File "/Applications/GRASS-7.3.app/Contents/MacOS/etc/python/grass/script/core.py", line 1536, in debug_level

    _debug_level = int(gisenv().get('DEBUG', 0))

  File "/Applications/GRASS-7.3.app/Contents/MacOS/etc/python/grass/script/core.py", line 953, in gisenv

    s = read_command("g.gisenv", flags='n')

  File "/Applications/GRASS-7.3.app/Contents/MacOS/etc/python/grass/script/core.py", line 461, in read_command

    return handle_errors(returncode, stdout, args, kwargs)

  File "/Applications/GRASS-7.3.app/Contents/MacOS/etc/python/grass/script/core.py", line 329, in handle_errors

    returncode=returncode)

grass.exceptions.CalledModuleError: Module run None ['g.gisenv', '-n'] ended with error

Process ended with non-zero return code -5. See errors in the (error) output.

ERROR: Error in GUI startup. See messages above (if any) and if necessary, please report this error to the GRASS developers.

On systems with package manager, make sure you have the right GUI package, probably named grass-gui, installed.

To run GRASS GIS in text mode use the -text flag.

Exiting...

logout

Saving session...

...copying shared history...

...saving history...truncating history files...

...completed.




-- Adam


From: grass-user <grass-user-bounces at lists.osgeo.org<mailto:grass-user-bounces at lists.osgeo.org>> on behalf of Michael Barton <Michael.Barton at asu.edu<mailto:Michael.Barton at asu.edu>>
Date: Wednesday, June 1, 2016 at 7:50 PM
To: GRASS developers list <grass-dev at lists.osgeo.org<mailto:grass-dev at lists.osgeo.org>>, grass-user grass-user <grass-user at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>>
Subject: [GRASS-user] GRASS for Mac 64bit, wxPython 3, maybe fix for SIP problem - please test

I just posted a new binary for GRASS 7.3 built fully 64 bit, with wxPython 3.0.2.0 to the GRASS for Mac site (http://grassmac.wikidot.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__grassmac.wikidot.com&d=CwMFAg&c=t0wRGL5ICVzH157W8C8Wew&r=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM&m=g-_vMK6bUb2L_0yJaa2OvFkqicaKTyNnPnCZOxN-i6s&s=jF8bboxVJboLDUrCG5V5xobtx6ig-JEF92VM_t_MXA4&e=>)

It turns out the previous "64bit" GRASS binary still ran 32bit Python. I had to hack the python_wrapper.py file, but this one is fully 64bit AFAICT. I also tried some hacks that might be a way to solve the inability to run GRASS on El Capitan with SIP enabled. There are a couple of known bugs in the wxPython 3.x GUI

1. The most serious is switching to 3D mode and back to 2D mode leaves one of the map display menu buttons corrupted. It seems the only thing you can do is to close the map display and open a new one.

2. There are also some popup lists (e.g., for switching mapsets) that do not behave as they should. You cannot select an item with a mouse (but you can select with arrow keys and <return>) unless you hit <escape> to destroy part of the control. Then you can use the mouse to click something.

Please let us know if you encounter any other bug or strange behavior.

Also,  and importantly if anyone is running El Capitan, it would be great if you could reenable SIP (if you've turned it off) and see if this version runs.  Of course, maybe I've "fixed" it so that it only runs on my system and crashes on everyone else's.

Enjoy!
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<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.public.asu.edu_-7Ecmbarton&d=CwMFAg&c=t0wRGL5ICVzH157W8C8Wew&r=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM&m=g-_vMK6bUb2L_0yJaa2OvFkqicaKTyNnPnCZOxN-i6s&s=DWmxIXQue0rzESF_0QnhgEylY9V-yUIeg1aKl9gQ9Yc&e=>, http://csdc.asu.edu<https://urldefense.proofpoint.com/v2/url?u=http-3A__csdc.asu.edu&d=CwMFAg&c=t0wRGL5ICVzH157W8C8Wew&r=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM&m=g-_vMK6bUb2L_0yJaa2OvFkqicaKTyNnPnCZOxN-i6s&s=4wxcas1zdXuTlR2aqJsCv88HfPWUcHLeed-Z1RQ1svE&e=>















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


More information about the grass-user mailing list