Opened 13 years ago

Closed 13 years ago

#1406 closed defect (fixed)

g.extension fails on Mac (maybe other platforms too?)

Reported by: cmbarton Owned by: grass-dev@…
Priority: normal Milestone: 6.4.2
Component: Compiling Version: unspecified
Keywords: g.extension Cc: martinl
CPU: OSX/Intel Platform: MacOSX

Description

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]

Change History (13)

in reply to:  description comment:1 by martinl, 13 years ago

Cc: martinl added
Keywords: g.extension added; extension removed

Replying to 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.

comment:2 by cmbarton, 13 years ago

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

in reply to:  2 comment:3 by martinl, 13 years ago

Replying to 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

in reply to:  description comment:4 by martinl, 13 years ago

Replying to 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

comment:5 by cmbarton, 13 years ago

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'.

comment:6 by cmbarton, 13 years ago

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

in reply to:  5 comment:7 by martinl, 13 years ago

Replying to 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.

in reply to:  6 comment:8 by martinl, 13 years ago

Replying to 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?

in reply to:  6 comment:9 by martinl, 13 years ago

Replying to cmbarton:

Can the wrapper dialog remain open when install is pushed? Currently, it closes automatically.

done in r47196.

in reply to:  6 comment:10 by martinl, 13 years ago

Replying to 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++

comment:11 by cmbarton, 13 years ago

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

comment:12 by neteler, 13 years ago

Duplicate of g.extension bug #854 ?

comment:13 by hamish, 13 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.