[GRASS-dev] WinGrass testing results 6.3.0rc2

Moritz and Benjamin,

I’ve had a couple of students install the new winGRASS 6.3.0RC2 binary and test it. The main remaining problems are (hopefully) easy to fix. See below.

The PROJ_SHARE variable is not set correctly
NVIZ won’t launch (but did in a recent binary)

Other stuff seems to be working fine. Hopefully you’ll be able to fix NVIZ soon. The PROJ_SHARE issue should be easy.

Benjamin, any hope for the all-in-one *.exe package soon?

Michael


Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

------ Forwarded Message
From: Sean Bergin sbergin@asu.edu
Reply-To: Sean.Bergin@asu.edu
Date: Mon, 26 Nov 2007 13:06:57 -0700
To: Michael Barton Michael.Barton@asu.edu
Subject: WinGrass Problems

Michael,

Here are some of the problems Alex and I noticed:

The EPSG Code Browser tries to find the code at : /c/grass63RC2/share/proj/epsg , and it should be C:/grass63RC2/share/proj/epsg once entered, everything seems to work ok, although only once, if you restart it continues to look in the wrong place…

NVIZ: if NVIZ is run from the menu, you get child killed: Sigabrt / then a box that says dialog 0 opens. If it is run from the map window, it crashes with chil process exited abnormally.

Sean


Sean Bergin
Ph.D. Student, Archaeology
Graduate Assistant, Integrating Socio-Ecological Sciences Project
School of Human Evolution and Social Change, ASU
Tempe, AZ 85287-2402

Sean.Bergin@asu.edu

------ End of Forwarded Message

On 26/11/07 21:17, Michael Barton wrote:

Moritz and Benjamin,

I’ve had a couple of students install the new winGRASS 6.3.0RC2 binary and test it. The main remaining problems are (hopefully) easy to fix. See below.

The PROJ_SHARE variable is not set correctly

Yes, sorry, my fault. I forgot that this is not solved in the code yet, so still needed to correct this manually.

(see thread
http://lists.osgeo.org/pipermail/grass-dev/2007-November/033973.html)

NVIZ won’t launch (but did in a recent binary)

It works fine for me. Could you be a bit more specific (how do you launch it ? What is the error message ?) ?

Benjamin, any hope for the all-in-one *.exe package soon?

Are you speaking of an installer or of a self-extracting zip ?

Moritz

NVIZ won’t launch (but did in a recent binary)

This can be somewhat tricky. For me, it fails to launch from within
the MSYS shell as well as a sh.exe started via Window's cmd.exe.

It does start, however when run directly through cmd.exe and also
starts up fine from the gis.m menu.

It works fine for me. Could you be a bit more specific (how do you
launch it ? What is the error message ?) ?

Benjamin, any hope for the all-in-one *.exe package soon?

Yes, sort of. I am making good progress and have succeeded in setting
up a complete compilation environment for GRASS and QGIS on MinGW.
Hopefully, I will be able to push a first beta version onto some
webserver by the end of the year or early next year.

Are you speaking of an installer or of a self-extracting zip ?

I will look into creating an installer for Windows. This should not
be hard to do. In fact, I think Windows provides pretty much everything
you need for a .exe or .msi installer package.

Moritz

Benjamin

--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg

On Tue, 27 Nov 2007, Benjamin Ducke wrote:

NVIZ won?t launch (but did in a recent binary)

This can be somewhat tricky. For me, it fails to launch from within
the MSYS shell as well as a sh.exe started via Window's cmd.exe.

That might be because the Msys shell doesn't recognise a .bat file (in this case nviz.bat) as an executable and/or can't run it. What happens if you add the GRASS scripts directory ($GISBASE/scripts IIRC) to your path? Then it should pick up the nviz shell script that will (should be???) installed in there. Or maybe try running "cmd.exe /c nviz" from the Msys shell? Just a wild guess. There might be other issues though.

It does start, however when run directly through cmd.exe and also
starts up fine from the gis.m menu.

cmd.exe and the Windows version of Tcl both recognise .bat files as executable and will correctly pick up nviz.bat, so that should explain that.

Paul

On 27/11/07 11:07, Paul Kelly wrote:

On Tue, 27 Nov 2007, Benjamin Ducke wrote:

NVIZ won?t launch (but did in a recent binary)

This can be somewhat tricky. For me, it fails to launch from within
the MSYS shell

I cannot confirm this: If I launch grass using /c/grass/bin/grass63
(i.e. the shell launch script, not the .bat), nviz works perfectly for
me, both from the gui and from the comand line.

(You have to change the definition of GISBASE from c:/ syntax to /c/
syntax for it to work...I've corrected this in the wingrass6.3RC2
package now)

as well as a sh.exe started via Window's cmd.exe.

Could you be more precise as to what exactly you are doing ? Do you
launch grass via grass63.bat and then launch sh.exe within a running
grass session ?

That might be because the Msys shell doesn't recognise a .bat file
(in this case nviz.bat) as an executable and/or can't run it. What
happens if you add the GRASS scripts directory ($GISBASE/scripts
IIRC) to your path? Then it should pick up the nviz shell script that
will (should be???) installed in there.

If you run grass in msys you have to run the grass63 file which then
calls Init.sh which sets the path to the scripts directory.

Moritz

Moritz Lennert wrote:

On 27/11/07 11:07, Paul Kelly wrote:

On Tue, 27 Nov 2007, Benjamin Ducke wrote:

NVIZ won?t launch (but did in a recent binary)

This can be somewhat tricky. For me, it fails to launch from within
the MSYS shell

I cannot confirm this: If I launch grass using /c/grass/bin/grass63
(i.e. the shell launch script, not the .bat), nviz works perfectly for
me, both from the gui and from the comand line.

(You have to change the definition of GISBASE from c:/ syntax to /c/
syntax for it to work...I've corrected this in the wingrass6.3RC2
package now)

Cool. I'll try that as soon as I can.

as well as a sh.exe started via Window's cmd.exe.

Could you be more precise as to what exactly you are doing ? Do you
launch grass via grass63.bat and then launch sh.exe within a running
grass session ?

Yes, exactly. I have sh.exe and friends in my system PATH.

That might be because the Msys shell doesn't recognise a .bat file
(in this case nviz.bat) as an executable and/or can't run it. What
happens if you add the GRASS scripts directory ($GISBASE/scripts
IIRC) to your path? Then it should pick up the nviz shell script that
will (should be???) installed in there.

OK, I'll try that, too.

If you run grass in msys you have to run the grass63 file which then
calls Init.sh which sets the path to the scripts directory.

Good point.

Cheers,

Benjamin

Moritz

--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg

On 11/27/07 2:08 AM, "Moritz Lennert" <mlennert@club.worldonline.be> wrote:

NVIZ won¹t launch (but did in a recent binary)

It works fine for me. Could you be a bit more specific (how do you
launch it ? What is the error message ?) ?

Attempt to launch the NVIZ gui from the file menu
Attempt to automatically launch NVIZ from the map display toolbar button
Attempt to launch NVIZ from the gronsole command line
AFAIK there is no other way to launch this from GRASS for Windows.

In all cases there is either
1) TclTk error (child process aborted) or
2) Succinct Windows (?) error "Sigbert" or
3) Nothing

Benjamin, any hope for the all-in-one *.exe package soon?

Are you speaking of an installer or of a self-extracting zip ?

Either one. The installer would be safer for most people (i.e., make sure
that all the pieces get installed in the correct places).

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On 11/27/07 3:25 AM, "Moritz Lennert" <mlennert@club.worldonline.be> wrote:

On 27/11/07 11:07, Paul Kelly wrote:

On Tue, 27 Nov 2007, Benjamin Ducke wrote:

NVIZ won?t launch (but did in a recent binary)

This can be somewhat tricky. For me, it fails to launch from within
the MSYS shell

I cannot confirm this: If I launch grass using /c/grass/bin/grass63
(i.e. the shell launch script, not the .bat), nviz works perfectly for
me, both from the gui and from the comand line.

(You have to change the definition of GISBASE from c:/ syntax to /c/
syntax for it to work...I've corrected this in the wingrass6.3RC2
package now

Not sure I understand this. How can you launch GRASS from a command line in
Windows? How do you get a command line to launch it from?

Probably a good idea to always run it from the *.bat file during development
to make sure it works that way, since that's how most people will run it.

as well as a sh.exe started via Window's cmd.exe.

Could you be more precise as to what exactly you are doing ? Do you
launch grass via grass63.bat and then launch sh.exe within a running
grass session ?

That might be because the Msys shell doesn't recognise a .bat file
(in this case nviz.bat) as an executable and/or can't run it. What
happens if you add the GRASS scripts directory ($GISBASE/scripts
IIRC) to your path? Then it should pick up the nviz shell script that
will (should be???) installed in there.

If you run grass in msys you have to run the grass63 file which then
calls Init.sh which sets the path to the scripts directory.

Again, I'm not sure how one actually does this. Is there a problem of which
gets launched first--mysys or TclTk?

Michael

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On 27/11/07 16:30, Michael Barton wrote:

On 11/27/07 2:08 AM, "Moritz Lennert" <mlennert@club.worldonline.be> wrote:

NVIZ won¹t launch (but did in a recent binary)

It works fine for me. Could you be a bit more specific (how do you
launch it ? What is the error message ?) ?

Attempt to launch the NVIZ gui from the file menu
Attempt to automatically launch NVIZ from the map display toolbar button
Attempt to launch NVIZ from the gronsole command line
AFAIK there is no other way to launch this from GRASS for Windows.

There is when you launch grass with GRASS_GUI=text. Then you just type nviz at the command line.

In all cases there is either
1) TclTk error (child process aborted) or
2) Succinct Windows (?) error "Sigbert" or
3) Nothing

Hmmh, what version of tcltk is installed ?

Could you try launching grass in text mode (open windows terminal and type 'c:\grass63RC2\bin\grass.bat -text') and then type 'nivz' and see what happens ?

How do you launch grass ?

Moritz

On 27/11/07 16:35, Michael Barton wrote:

On 11/27/07 3:25 AM, "Moritz Lennert" <mlennert@club.worldonline.be> wrote:

On 27/11/07 11:07, Paul Kelly wrote:

On Tue, 27 Nov 2007, Benjamin Ducke wrote:

NVIZ won?t launch (but did in a recent binary)

This can be somewhat tricky. For me, it fails to launch from within
the MSYS shell

I cannot confirm this: If I launch grass using /c/grass/bin/grass63
(i.e. the shell launch script, not the .bat), nviz works perfectly for
me, both from the gui and from the comand line.

(You have to change the definition of GISBASE from c:/ syntax to /c/
syntax for it to work...I've corrected this in the wingrass6.3RC2
package now

Not sure I understand this.

The above is for those who want to launch grass from within an msys terminal window.

How can you launch GRASS from a command line in
Windows? How do you get a command line to launch it from?

For normal users (who do not work with msys as their terminal - you don't even need msys installed to do this):

- Open Start menu -> Run command -> type cmd.exe
- In cmd.exe type c:\PathToGrassFolder\bin\grass63.bat
- If you then want to launch the gis manager, type gis.m

Probably a good idea to always run it from the *.bat file during development
to make sure it works that way, since that's how most people will run it.

Yes, but just as in the other environments you can run grass in windows as a command line or a gui application (or both).

as well as a sh.exe started via Window's cmd.exe.

Could you be more precise as to what exactly you are doing ? Do you
launch grass via grass63.bat and then launch sh.exe within a running
grass session ?

That might be because the Msys shell doesn't recognise a .bat file
(in this case nviz.bat) as an executable and/or can't run it. What
happens if you add the GRASS scripts directory ($GISBASE/scripts
IIRC) to your path? Then it should pick up the nviz shell script that
will (should be???) installed in there.

If you run grass in msys you have to run the grass63 file which then
calls Init.sh which sets the path to the scripts directory.

Again, I'm not sure how one actually does this. Is there a problem of which
gets launched first--mysys or TclTk?

Ok, let's clear things up a bit (and yes, I know I should do this on the wiki ASAP):

The general philosophy of the windows port of grass is that it should be a completely native application, with no need of any kind of *nix emulation. For most of grass this is now possible, which means all you need to install to run grass is tcltk and my binary package. Nothing else, not even msys !

On that basis you can launch grass either by clicking on the grass63.bat file or by launching it from the command line as explained above. As in other environments, the choice of GRASS_GUI is stored in the .grassrc6 file which is stored by default in the %USERPROFILE% directory, which normally defaults to C:\Documents and Settings\username. So, you can change GRASS_GUI to text and grass will open in text mode, even if you click on the grass63.bat file.

What does not work in this setup are the many scripts as these are shell scripts and thus need a *nix-like shell environment to run, including a series of tools such as sed, awk, etc. If you need those, you can install msys in order to have a shell (sh.exe) and the necessary tools. Edit the grass63.bat file in order to set the path to where you installed msys (e.g. c:\msys\bin and c:\msys\lib) and to sh.exe. Now you should be able to run most scripts.

For those who would like to get the *nix look and feel in windows, they can do so by launching GRASS directly from within an msys shell (opened by going into the Start menu -> Applications ->Msys). But as this is a *nix emulation, you have to use the grass63, not the grass63.bat file to start grass (both are in the same directory). There used to be a problem with path syntax in the grass63 file (as explained above), but I corrected this this morning.

I hope this clarifies the issue a bit.

Moritz

This helps a LOT. I think it also explains why NVIZ doesn't work (although I
don't understand why it DOES work on some systems). NVIZ is launched from a
script. IIRC, there at least some scripts get *.bat equivalents. Is/was this
the case for the script named "nviz"? Everyone here has installed mysys as
suggested in the README. But it is nice to know that it is NOT needed. The
problem then is that you can't run any of the scripts and some of these are
important.

If I understand you correctly, if we modify the grass63.bat to make sure
that it correctly indicates the location of mysys (we are just installing it
in the default location), scripts (including nviz) *should* run.

Another question for the general group here. I'm about to try to convince a
classroom lab manager to put this on the computers in the lab. Is there any
problem to installing mysys in a tightly managed lab environment? Are we
likely to run into any permission problems trying to run GRASS in such an
environment (i.e., where students do not have write permission outside their
own home directories)?

Michael

On 11/27/07 9:07 AM, "Moritz Lennert" <mlennert@club.worldonline.be> wrote:

On 27/11/07 16:35, Michael Barton wrote:

On 11/27/07 3:25 AM, "Moritz Lennert" <mlennert@club.worldonline.be> wrote:

On 27/11/07 11:07, Paul Kelly wrote:

On Tue, 27 Nov 2007, Benjamin Ducke wrote:

NVIZ won?t launch (but did in a recent binary)

This can be somewhat tricky. For me, it fails to launch from within
the MSYS shell

I cannot confirm this: If I launch grass using /c/grass/bin/grass63
(i.e. the shell launch script, not the .bat), nviz works perfectly for
me, both from the gui and from the comand line.

(You have to change the definition of GISBASE from c:/ syntax to /c/
syntax for it to work...I've corrected this in the wingrass6.3RC2
package now

Not sure I understand this.

The above is for those who want to launch grass from within an msys
terminal window.

How can you launch GRASS from a command line in
Windows? How do you get a command line to launch it from?

For normal users (who do not work with msys as their terminal - you
don't even need msys installed to do this):

- Open Start menu -> Run command -> type cmd.exe
- In cmd.exe type c:\PathToGrassFolder\bin\grass63.bat
- If you then want to launch the gis manager, type gis.m

Probably a good idea to always run it from the *.bat file during development
to make sure it works that way, since that's how most people will run it.

Yes, but just as in the other environments you can run grass in windows
as a command line or a gui application (or both).

as well as a sh.exe started via Window's cmd.exe.

Could you be more precise as to what exactly you are doing ? Do you
launch grass via grass63.bat and then launch sh.exe within a running
grass session ?

That might be because the Msys shell doesn't recognise a .bat file
(in this case nviz.bat) as an executable and/or can't run it. What
happens if you add the GRASS scripts directory ($GISBASE/scripts
IIRC) to your path? Then it should pick up the nviz shell script that
will (should be???) installed in there.

If you run grass in msys you have to run the grass63 file which then
calls Init.sh which sets the path to the scripts directory.

Again, I'm not sure how one actually does this. Is there a problem of which
gets launched first--mysys or TclTk?

Ok, let's clear things up a bit (and yes, I know I should do this on the
wiki ASAP):

The general philosophy of the windows port of grass is that it should be
a completely native application, with no need of any kind of *nix
emulation. For most of grass this is now possible, which means all you
need to install to run grass is tcltk and my binary package. Nothing
else, not even msys !

On that basis you can launch grass either by clicking on the grass63.bat
  file or by launching it from the command line as explained above. As
in other environments, the choice of GRASS_GUI is stored in the
.grassrc6 file which is stored by default in the %USERPROFILE%
directory, which normally defaults to C:\Documents and
Settings\username. So, you can change GRASS_GUI to text and grass will
open in text mode, even if you click on the grass63.bat file.

What does not work in this setup are the many scripts as these are shell
scripts and thus need a *nix-like shell environment to run, including a
series of tools such as sed, awk, etc. If you need those, you can
install msys in order to have a shell (sh.exe) and the necessary tools.
Edit the grass63.bat file in order to set the path to where you
installed msys (e.g. c:\msys\bin and c:\msys\lib) and to sh.exe. Now you
should be able to run most scripts.

For those who would like to get the *nix look and feel in windows, they
can do so by launching GRASS directly from within an msys shell (opened
by going into the Start menu -> Applications ->Msys). But as this is a
*nix emulation, you have to use the grass63, not the grass63.bat file to
start grass (both are in the same directory). There used to be a problem
with path syntax in the grass63 file (as explained above), but I
corrected this this morning.

I hope this clarifies the issue a bit.

Moritz

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Benjamin,

If you need a place to put this, I can put it on my server here. I'd love to
have this (at least a complete GRASS setup) to pass out to my students next
semester. We start before the middle of January.

Michael

On 11/27/07 2:49 AM, "Benjamin Ducke" <benjamin.ducke@ufg.uni-kiel.de>
wrote:

NVIZ won¹t launch (but did in a recent binary)

This can be somewhat tricky. For me, it fails to launch from within
the MSYS shell as well as a sh.exe started via Window's cmd.exe.

It does start, however when run directly through cmd.exe and also
starts up fine from the gis.m menu.

It works fine for me. Could you be a bit more specific (how do you
launch it ? What is the error message ?) ?

Benjamin, any hope for the all-in-one *.exe package soon?

Yes, sort of. I am making good progress and have succeeded in setting
up a complete compilation environment for GRASS and QGIS on MinGW.
Hopefully, I will be able to push a first beta version onto some
webserver by the end of the year or early next year.

Are you speaking of an installer or of a self-extracting zip ?

I will look into creating an installer for Windows. This should not
be hard to do. In fact, I think Windows provides pretty much everything
you need for a .exe or .msi installer package.

Moritz

Benjamin

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Michael Barton wrote:

This helps a LOT. I think it also explains why NVIZ doesn't work (although I
don't understand why it DOES work on some systems). NVIZ is launched from a
script. > IIRC, there at least some scripts get *.bat equivalents. Is/was this
the case for the script named "nviz"?

Yes and no. The *.bat equivalents of the shell scripts are acutally just a call to the GRASS_SH to launch the shell script, where GRASS_SH will be msys' sh.exe for those who installed it and configured the grass63.bat file.

Nviz' case is different as the nviz.bat file directly calls %GISBASE%\etc\nviz2.2\nviz.exe and so doesn't need a shell. So, you do not need to have msys installed to launch nviz.

Everyone here has installed mysys as
suggested in the README. But it is nice to know that it is NOT needed. The
problem then is that you can't run any of the scripts and some of these are
important.

Obviously they are, although most are "just" a combination of different grass commands with some awk/sed/etc magic thrown in as a bonus. So many of the scripts can be reproduced by hand if really needed.

The idea for the future is to replace all the shell scripts with equivalents in a more portable language such as python. As python will be an obligatory dependency for anyone who wants to use the gui, it sounds like the best choice for replacement.

If I understand you correctly, if we modify the grass63.bat to make sure
that it correctly indicates the location of mysys (we are just installing it
in the default location), scripts (including nviz) *should* run.

As mentioned above, nviz should run in any case. If it doesn't then there is a problem and we need to identify it.

I'll try to find time tomorrow to squat a colleague's computer which has nothing (neither grass not tcltk) installed, yet, in order to test some more.

Benjamin also had problems with nviz (http://grass.itc.it/pipermail/grass5/2007-October/033804.html), but this was in what I would call a "non-standard" environment as he tried to work from within msys.

Another question for the general group here. I'm about to try to convince a
classroom lab manager to put this on the computers in the lab. Is there any
problem to installing mysys in a tightly managed lab environment? Are we
likely to run into any permission problems trying to run GRASS in such an
environment (i.e., where students do not have write permission outside their
own home directories)?

No idea.

Moritz