RE: [GRASS-dev] Issues of 6.5 build on WinXP

> >> FYI: I've set this environment variable at the begining of
> >> C:\OSGeo4W\etc\ini\grass.bat file. Setting this variable
in the OS control
> >> panel directly may require restart of Windows (but I am
not sure) to have
> >> any effect.
> >
> > Unfortunately it's not working on my machine
> >
> > $ env | grep LC_ALL
> > LC_ALL=cs_CZ
> >
> > but wxGUI starts still unlocalized...
>
> mystery partly solved, during compilation process in not created
> 'locale' directory and 'make' says
>
> $ make clean; make

> Creating translations (= 'make mo')
> make[1]: Entering directory `/c/OSGeo4W/usr/src/grass6_devel/locale'

> make[1]: Nothing to be done for `mo'.
> make[1]: Leaving directory `/c/OSGeo4W/usr/src/grass6_devel/locale'
>
> Not sure what is wrong...

First, ensure that you have GNU make 3.81; I wouldn't trust older
versions to handle non-trivial use of "eval".

FWIW, the locale directory from GRASS 6.5 builds fine for me on
Windows (with make 3.81).

I can confirm that. The locale directory is really created on my PC, but I
don't know if all of us mean the same path.
I've found two locations:
- C:\OSGeo4W\apps\grass\grass-6.5.svn\locale
- C:\OSGeo4W\usr\src\grass6-devel\dist.i686-pc-mingw32\locale

BTW, Glynn, can you add a new vector map? Here is a snippet from the
original post:

1) I cannot add a new vector map layer. Only a dummy one is added without
the standard option dialog. All corresponding messages from the Command
output tab can be found at the bottom of this e-mail. Raster maps are Ok.

...
self._parser.Parse(data, 0)
xml.parsers.expat
.
ExpatError
:
not well-formed (invalid token): line 559, column 58
Traceback (most recent call last):
  File
"C:/OSGeo4W/apps/grass/grass-6.5.svn/etc/wxpython/wxgui.py",
line 368, in OnCBPageClosed
...

Jan Tošovský wrote:

> First, ensure that you have GNU make 3.81; I wouldn't trust older
> versions to handle non-trivial use of "eval".
>
> FWIW, the locale directory from GRASS 6.5 builds fine for me on
> Windows (with make 3.81).

I can confirm that. The locale directory is really created on my PC, but I
don't know if all of us mean the same path.
I've found two locations:
- C:\OSGeo4W\apps\grass\grass-6.5.svn\locale
- C:\OSGeo4W\usr\src\grass6-devel\dist.i686-pc-mingw32\locale

Both of those directories should have identical contents.

The GRASS build system stores everything which is meant to be
installed in the dist.<arch> directory, where <arch> is the
architecture name (e.g. i686-pc-linux-gnu for a typical Linux system
or i686-pc-mingw32 for MinGW).

"make install" copies the dist.<arch> directory to the final
destination ($prefix/grass-$version), as well as installing the
scripts from bin.<arch> after modifying them to reflect the
installation directory.

The idea is that after building GRASS, you can run it from the source
directory without installing it.

BTW, Glynn, can you add a new vector map? Here is a snippet from the
original post:

1) I cannot add a new vector map layer. Only a dummy one is added without
the standard option dialog. All corresponding messages from the Command
output tab can be found at the bottom of this e-mail. Raster maps are Ok.

It works for me with 6.4.0-RC5; I'll try with 6.5 once it's compiled
(which should take around an hour).

...
self._parser.Parse(data, 0)
xml.parsers.expat
.
ExpatError
:
not well-formed (invalid token): line 559, column 58

Can you run:

  d.vect --interface-description > out.txt

and see if there's anything strange about that file (specifically,
line 559 or thereabouts)?

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

Glynn Clements wrote:

> BTW, Glynn, can you add a new vector map? Here is a snippet from the
> original post:
>
> 1) I cannot add a new vector map layer. Only a dummy one is added without
> the standard option dialog. All corresponding messages from the Command
> output tab can be found at the bottom of this e-mail. Raster maps are Ok.

It works for me with 6.4.0-RC5; I'll try with 6.5 once it's compiled
(which should take around an hour).

Tried that. It doesn't work for me, although I don't get the same
error. As soon as I have typed the map name (and before I have pressed
"OK"), the GUI hangs and has to be forcibly terminated.

Oh, and I get exactly the same behaviour with 7.0 on Linux. Raster
maps work fine on both Linux and Windows; it only happens for vectors.

This seems to be related to the auto-completion "enhancements" (the
fact that it happens as soon as the text field contains a valid map
name is a big clue). This needs to be completely reworked or, failing
that, removed.

Apart from anything else, it should not be running commands after each
key press; this is just far too slow, particularly on Windows
(although it's still noticable on Linux).

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

Glynn Clements wrote:

Tried that. It doesn't work for me, although I don't get the same
error. As soon as I have typed the map name (and before I have pressed
"OK"), the GUI hangs and has to be forcibly terminated.

Oh, and I get exactly the same behaviour with 7.0 on Linux. Raster
maps work fine on both Linux and Windows; it only happens for vectors.

Here's another data point: 7.0 only hangs on Linux with DEBUG=
enabled. In that case, wxgui.py is blocked wait()ing for v.category to
terminate, and v.category is blocked write()ing to the pipe connected
to its stderr.

So it appears that something is making a blocking wait() call without
having checked that both stdout and stderr have been closed.

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

Hi,

2009/12/28 Jan Tošovský <j.tosovsky@tiscali.cz>:

1) I cannot add a new vector map layer. Only a dummy one is added without
the standard option dialog. All corresponding messages from the Command
output tab can be found at the bottom of this e-mail. Raster maps are Ok.

I commented out problematic code in r40191. Now should work.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

2009/12/28 Jan Tošovský <j.tosovsky@tiscali.cz>:
> 1) I cannot add a new vector map layer. Only a dummy one is
added without
> the standard option dialog. All corresponding messages from
the Command
> output tab can be found at the bottom of this e-mail.
Raster maps are Ok.

I commented out problematic code in r40191. Now should work.

Martin

Wow, it works as expected (I can add a vector map via GUI)!

Even the encoding issue is eliminated now, although several strings from the
last build are back in English (e.g. tab labels 'Required' or 'Manual' in
the insert Raster layer dialog).

Many thanks!

Jan

Error messages are properly recorded in the Command Console (wxPython) now,
but Clear output button doesn't clear anything.

When error messages are mentioned, there are several I've just met:

The first one appears 'sometimes' when Kriging interpolation is selected via
menu.

The second one when search in Command Console was tested. I found the
reason. The 'Find module' combo has not selected a default value. If the
'description' item is chosen, no errors appear anymore. But 'keywords'
throws another error message.

These errors are cosmetic, but I am reporting them in hope it can be
beneficial for someone.

Regards,
Jan

========= 1 ===========
Traceback (most recent call last):
  File "C:\OSGeo4W\apps\grass\grass-6.5.svn\etc\wxpython\gui
_modules\menuform.py", line 840, in OnOK

cmd = self.OnApply(event)
  File "C:\OSGeo4W\apps\grass\grass-6.5.svn\etc\wxpython\gui
_modules\menuform.py", line 846, in OnApply

cmd = self.createCmd()
  File "C:\OSGeo4W\apps\grass\grass-6.5.svn\etc\wxpython\gui
_modules\menuform.py", line 939, in createCmd

return
self.notebookpanel.createCmd(ignoreErrors=ignoreErrors)
  File "C:\OSGeo4W\apps\grass\grass-6.5.svn\etc\wxpython\gui
_modules\menuform.py", line 1654, in createCmd

message=unicode(err),
UnicodeEncodeError
:
'ascii' codec can't encode character u'\xe1' in position 21:
ordinal not in range(128)
=========== 1 =============

=========== 2 =============
Traceback (most recent call last):
  File "C:\OSGeo4W\apps\grass\grass-6.5.svn\etc\wxpython\gui
_modules\goutput.py", line 566, in OnSearchModule

if self.__checkKey(text, data['keywords']):
AttributeError
:
'GMConsole' object has no attribute '_GMConsole__checkKey'
=========== 2 =============

2010/1/2 Jan Tošovský <j.tosovsky@tiscali.cz>:

Error messages are properly recorded in the Command Console (wxPython) now,
but Clear output button doesn't clear anything.

Already fixed in r40199.

> 2009/12/28 Jan Tošovský <j.tosovsky@tiscali.cz>:
> > 1) I cannot add a new vector map layer. Only a dummy one is
> added without
> > the standard option dialog. All corresponding messages from
> the Command
> > output tab can be found at the bottom of this e-mail.
> Raster maps are Ok.
>
> I commented out problematic code in r40191. Now should work.
>
> Martin

Wow, it works as expected (I can add a vector map via GUI)!

I've built 6.5 from svn 40297 and adding map layers is broken again. Now
both vector and raster!

Jan

======= raster log ============
Traceback (most recent call last):
  File
"C:/OSGeo4W/apps/grass/grass-6.5.svn/etc/wxpython/wxgui.py",
line 1244, in OnAddRaster

self.AddRaster(event)
  File
"C:/OSGeo4W/apps/grass/grass-6.5.svn/etc/wxpython/wxgui.py",
line 1369, in AddRaster

self.curr_page.maptree.AddLayer('raster')
  File "c:/OSGeo4W/usr/src/grass6-devel/dist.i686-pc-
mingw32/etc/wxpython/gui_modules/wxgui_utils.py", line 794,
in AddLayer

self.PropertiesDialog(layer, show=True)
  File "c:/OSGeo4W/usr/src/grass6-devel/dist.i686-pc-
mingw32/etc/wxpython/gui_modules/wxgui_utils.py", line 862,
in PropertiesDialog

parentframe=self)
  File "C:\OSGeo4W\apps\grass\grass-6.5.svn\etc\wxpython\gui
_modules\menuform.py", line 1811, in ParseCommand

get_dcmd=get_dcmd, layer=layer)
  File "C:\OSGeo4W\apps\grass\grass-6.5.svn\etc\wxpython\gui
_modules\menuform.py", line 810, in __init__

self.goutput.SetSashPosition(int(self.GetSize()[1] * .75))
AttributeError
:
'NoneType' object has no attribute 'SetSashPosition'

========= vector log ============

Traceback (most recent call last):
  File
"C:/OSGeo4W/apps/grass/grass-6.5.svn/etc/wxpython/wxgui.py",
line 1301, in OnAddVector

self.AddVector(event)
  File
"C:/OSGeo4W/apps/grass/grass-6.5.svn/etc/wxpython/wxgui.py",
line 1403, in AddVector

self.curr_page.maptree.AddLayer('vector')
  File "c:/OSGeo4W/usr/src/grass6-devel/dist.i686-pc-
mingw32/etc/wxpython/gui_modules/wxgui_utils.py", line 794,
in AddLayer

self.PropertiesDialog(layer, show=True)
  File "c:/OSGeo4W/usr/src/grass6-devel/dist.i686-pc-
mingw32/etc/wxpython/gui_modules/wxgui_utils.py", line 891,
in PropertiesDialog

parentframe=self)
  File "C:\OSGeo4W\apps\grass\grass-6.5.svn\etc\wxpython\gui
_modules\menuform.py", line 1811, in ParseCommand

get_dcmd=get_dcmd, layer=layer)
  File "C:\OSGeo4W\apps\grass\grass-6.5.svn\etc\wxpython\gui
_modules\menuform.py", line 810, in __init__

self.goutput.SetSashPosition(int(self.GetSize()[1] * .75))
AttributeError
:
'NoneType' object has no attribute 'SetSashPosition'

Hi,

2010/1/7 Jan Tošovský <j.tosovsky@tiscali.cz>:

I've built 6.5 from svn 40297 and adding map layers is broken again. Now
both vector and raster!

fixed in r40307.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa