[GRASS-dev] [GRASS GIS] #1406: g.extension fails on Mac (maybe other platforms too?)

#1406: g.extension fails on Mac (maybe other platforms too?)
-----------------------+----------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Keywords: extension | Platform: MacOSX
      Cpu: OSX/Intel |
-----------------------+----------------------------------------------------
Working in the current svn version of GRASS 7, I tried to install r.stream
via g.extension. First, I tried from the command line in the terminal.
Here is what happened.

{{{
GRASS 7.0.svn (Spain_wgs84z30):~ > g.extension -s extension=wx.stream
ERROR: install required. Please install 'install' first.
}}}

Then I tried from the g.extension menu item from the settings menu. Here
is what I got in the console output window.

{{{
Traceback (most recent call last):
   File "/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/etc
/gui/wxpython/wxgui.py", line 1035, in OnInstallExtension

win = InstallExtensionWindow(self, size = (650, 550))
   File "/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-
darwin10.8.0/etc/gui/wxpython/gui_modules/ghelp.py", line
832, in __init__

self.statusbar = self.CreateStatusBar(0)
   File "/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/etc
/python/wx/_windows.py", line 538, in CreateStatusBar

return _windows_.Frame_CreateStatusBar(*args, **kwargs)
wx._core
.
PyAssertionError
:
C++ assertion "m_nFields == (int)m_statusStrings.GetCount()"
failed at /BUILD/wxPython-
src-2.8.12.0/src/generic/statusbr.cpp(136) in
SetFieldsCount(): This really should never happen, can we do
away with m_nFields here?
}}}

Finally, I tried to launch g.extension from the terminal command line. The
module launches. But when I try to install r.stream, I get the same

  "ERROR: install required. Please install 'install' first."

message.

Then I tested in the GRASS 6 series.

g.extension launches fine in both 6.5 and 6.4.2. However, almost
everything fails to compile because...

{{{
make: *** No targets specified and no makefile found. Stop.
}}}

However, the r.stream.* modules do compile because they ignore targets set
and put everything on the desktop.

In all cases, the values set for GRASS_ADDON_PATH is ignored by
g.extension.

[An aside: it is not possible to pick 6.4.2 or all versions for the
version in the online trac application]

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1406&gt;
GRASS GIS <http://grass.osgeo.org>

#1406: g.extension fails on Mac (maybe other platforms too?)
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Keywords: g.extension | Platform: MacOSX
      Cpu: OSX/Intel |
-------------------------+--------------------------------------------------
Changes (by martinl):

* cc: martinl (added)
  * keywords: extension => g.extension

Comment:

Replying to [ticket:1406 cmbarton]:
{{{
> GRASS 7.0.svn (Spain_wgs84z30):~ > g.extension -s extension=wx.stream
> ERROR: install required. Please install 'install' first.
}}}

I removed this dependency in r47187. Please try to install the extension
again.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1406#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1406: g.extension fails on Mac (maybe other platforms too?)
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Keywords: g.extension | Platform: MacOSX
      Cpu: OSX/Intel |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

This fixes the first item on the list above. Thanks. Now g.extension can
open from the terminal in all versions of GRASS.

The other issues remain. It cannot be opened from the menu system in GRASS
7, and in all versions it fails because of no targets found for
installation. I've tried replacing the GRASS_ADDON_PATH variable with a
hard coded path to my addons directory but this makes no difference. Still
the same errors. Does this work on Windows and all Linux platforms?

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1406#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1406: g.extension fails on Mac (maybe other platforms too?)
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Keywords: g.extension | Platform: MacOSX
      Cpu: OSX/Intel |
-------------------------+--------------------------------------------------

Comment(by martinl):

Replying to [comment:2 cmbarton]:
> This fixes the first item on the list above. Thanks. Now g.extension can
open from the terminal in all versions of GRASS.

what do you mean by "can open from the terminal"? What happen if you
launch

{{{
g.extension -s ext=wx.stream
}}}

?

> The other issues remain. It cannot be opened from the menu system in
GRASS 7, and in all

do you mean from wxGUI?

Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1406#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1406: g.extension fails on Mac (maybe other platforms too?)
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Keywords: g.extension | Platform: MacOSX
      Cpu: OSX/Intel |
-------------------------+--------------------------------------------------

Comment(by martinl):

Replying to [ticket:1406 cmbarton]:
{{{
> Traceback (most recent call last):
> File "/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/etc
> /gui/wxpython/wxgui.py", line 1035, in OnInstallExtension
>
> win = InstallExtensionWindow(self, size = (650, 550))
> File "/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-
> darwin10.8.0/etc/gui/wxpython/gui_modules/ghelp.py", line
> 832, in __init__
>
> self.statusbar = self.CreateStatusBar(0)
> File "/Applications/GRASS/GRASS-7.0.app/Contents/MacOS/etc
> /python/wx/_windows.py", line 538, in CreateStatusBar
>
> return _windows_.Frame_CreateStatusBar(*args, **kwargs)
> wx._core
> .
> PyAssertionError
> :
> C++ assertion "m_nFields == (int)m_statusStrings.GetCount()"
> failed at /BUILD/wxPython-
> src-2.8.12.0/src/generic/statusbr.cpp(136) in
> SetFieldsCount(): This really should never happen, can we do
> away with m_nFields here?
}}}

Please try out r47191

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1406#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1406: g.extension fails on Mac (maybe other platforms too?)
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Keywords: g.extension | Platform: MacOSX
      Cpu: OSX/Intel |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

OK. Will try.

{{{
g.extension -s ext=wx.stream
}}}

...from the command line gives the following error

{{{
GRASS 7.0.svn (SAmerica_LL_WGD84):~ > g.extension -s ext=wx.stream
Fetching 'wx.stream' from GRASS-Addons SVN (be patient)...
A wx.stream/gui_modules
A wx.stream/gui_modules/rstream.py
A wx.stream/gui_modules/rstream_panelOne.py
A wx.stream/Makefile
Checked out revision 47190.
Compiling 'wx.stream'...
/usr/bin/install -c -m 644 gui_modules/rstream.py
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-
darwin10.8.0/etc/gui/wxpython/gui_modules/rstream.py
/usr/bin/install -c -m 644 gui_modules/rstream_panelOne.py
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-
darwin10.8.0/etc/gui/wxpython/gui_modules/rstream_panelOne.py
python -m py_compile /Users/Shared/grass_dev/grass70_dev/dist.i386-apple-
darwin10.8.0/etc/gui/wxpython/gui_modules/rstream.py
python -m py_compile /Users/Shared/grass_dev/grass70_dev/dist.i386-apple-
darwin10.8.0/etc/gui/wxpython/gui_modules/rstream_panelOne.py
make parsubdirs
make[1]: Nothing to be done for `parsubdirs'.
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1406#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#1406: g.extension fails on Mac (maybe other platforms too?)
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Keywords: g.extension | Platform: MacOSX
      Cpu: OSX/Intel |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

The new version fixes the problem with the dialog not opening from the
settings menu. It also works when the -s flag is enabled. It fails without
the -s flag. This may in part be related to problems with the default
GRASS_ADDON_PATH for Mac, though there is no way to set a path in the new
wrapper dialog.

Can the wrapper dialog remain open when install is pushed? Currently, it
closes automatically. The same goes for the r.in.gdal wrapper dialog--and
this should not be modal.

Thanks for the updates
Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1406#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#1406: g.extension fails on Mac (maybe other platforms too?)
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Keywords: g.extension | Platform: MacOSX
      Cpu: OSX/Intel |
-------------------------+--------------------------------------------------

Comment(by martinl):

Replying to [comment:5 cmbarton]:

> ...from the command line gives the following error
>
{{{
> GRASS 7.0.svn (SAmerica_LL_WGD84):~ > g.extension -s ext=wx.stream
> Fetching 'wx.stream' from GRASS-Addons SVN (be patient)...
> A wx.stream/gui_modules
> A wx.stream/gui_modules/rstream.py
> A wx.stream/gui_modules/rstream_panelOne.py
> A wx.stream/Makefile
> Checked out revision 47190.
> Compiling 'wx.stream'...
> /usr/bin/install -c -m 644 gui_modules/rstream.py
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-
darwin10.8.0/etc/gui/wxpython/gui_modules/rstream.py
> /usr/bin/install -c -m 644 gui_modules/rstream_panelOne.py
/Users/Shared/grass_dev/grass70_dev/dist.i386-apple-
darwin10.8.0/etc/gui/wxpython/gui_modules/rstream_panelOne.py
> python -m py_compile /Users/Shared/grass_dev/grass70_dev/dist.i386
-apple-darwin10.8.0/etc/gui/wxpython/gui_modules/rstream.py
> python -m py_compile /Users/Shared/grass_dev/grass70_dev/dist.i386
-apple-darwin10.8.0/etc/gui/wxpython/gui_modules/rstream_panelOne.py
> make parsubdirs
> make[1]: Nothing to be done for `parsubdirs'.
}}}

I don't see any kind of error which would be related to {{{g.extension}}}.

{{{
> make parsubdirs
> make[1]: Nothing to be done for `parsubdirs'.
}}}

This is bug in Makefile provided in {{{wx.stream}}}.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1406#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#1406: g.extension fails on Mac (maybe other platforms too?)
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Keywords: g.extension | Platform: MacOSX
      Cpu: OSX/Intel |
-------------------------+--------------------------------------------------

Comment(by martinl):

Replying to [comment:6 cmbarton]:
> The new version fixes the problem with the dialog not opening from the
settings menu. It also works when the -s flag is enabled. It fails without
the -s flag. This may in part be related to problems with the default
GRASS_ADDON_PATH for Mac, though there is no way to set a path in the new
wrapper dialog.

{{{-s}}} flag is required for any wxGUI extensions. Does it fail also for
other extensions?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1406#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#1406: g.extension fails on Mac (maybe other platforms too?)
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Keywords: g.extension | Platform: MacOSX
      Cpu: OSX/Intel |
-------------------------+--------------------------------------------------

Comment(by martinl):

Replying to [comment:6 cmbarton]:
> Can the wrapper dialog remain open when install is pushed? Currently, it
closes automatically.

done in r47196.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1406#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#1406: g.extension fails on Mac (maybe other platforms too?)
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Keywords: g.extension | Platform: MacOSX
      Cpu: OSX/Intel |
-------------------------+--------------------------------------------------

Comment(by martinl):

Replying to [comment:6 cmbarton]:
> Can the wrapper dialog remain open when install is pushed? Currently, it
closes automatically. The same goes for the r.in.gdal wrapper dialog--and
this should not be modal.

They are not modal in 6.4.2++

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1406#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#1406: g.extension fails on Mac (maybe other platforms too?)
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Keywords: g.extension | Platform: MacOSX
      Cpu: OSX/Intel |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

Thanks for the update. The import raster maps wrapper goes modal when you
bring up the r.in.gdal 'command dialog' (the

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1406#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>

#1406: g.extension fails on Mac (maybe other platforms too?)
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Keywords: g.extension | Platform: MacOSX
      Cpu: OSX/Intel |
-------------------------+--------------------------------------------------

Comment(by neteler):

Duplicate of g.extension bug #854 ?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1406#comment:12&gt;
GRASS GIS <http://grass.osgeo.org>

#1406: g.extension fails on Mac (maybe other platforms too?)
------------------------+---------------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: unspecified
Resolution: fixed | Keywords: g.extension
  Platform: MacOSX | Cpu: OSX/Intel
------------------------+---------------------------------------------------
Changes (by hamish):

  * status: new => closed
  * resolution: => fixed

Comment:

Closing as a duplicate of bug #854. continued there (if needed).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1406#comment:13&gt;
GRASS GIS <http://grass.osgeo.org>