[GRASS5] Re: grass5 digest, Vol 1 #1033 - 6 msgs

Glynn,

It is great news that you have GRASS 5.3 compiling successfully for Cygwin. I have several questions.

1. In the list of Cygwin components you list has having installed (in section of copied message below) are opengl and sunrpc. Are these only necessary for compiling Cygwin or are they also needed for the binaries? I ask because there is an old version of sunrpc on the WinGRASS web page, but the binaries installation instructions ignore it.

2. Can GRASS 5.3 open monitors via the tcltk menu or is it still necessary to do this from the command line using d.mon?

3. If GRASS 5.3 works with tcltk 8.3.4, does that mean that it works with the Cygwin version of tcltk or is it still necessary to install a separate version?

Thanks for your time and help.

Michael

On Monday, February 9, 2004, at 04:01 AM, grass5-request@grass.itc.it wrote:

Done that; NVIZ still works.

-r-xr-xr-x 1 root root 749892 Mar 28 2002 libtcl8.3.a*
-r-xr-xr-x 1 root root 985818 Mar 28 2002 libtk8.3.a*

fb69cc3342aa19f3fdb709738f6055e7 libtcl8.3.a
4e60b25c070637250f52aa13d5fcdc47 libtk8.3.a

From:

2983750b94c52b8a5ce1aa3e39e54e45 xtcltk-8.3.4-CYGWIN.tar.gz

Upon giving the above command, an empty (black) Windows command-line
window appeared; the title bar contained the name of the NVWISH2.2
program. The message
---Type <return> to continue, or q <return> to quit---
then appeared in the terminal where NVIZ was started and on pressing
return, the segmentation fault happened.

What do the two question marks and empty brackets mean? Do the provided
xtcltk libaries have debugging information? Does anything else need to be
compiled with debugging turned on?

The xtcltk 8.3.4 libraries don't have debug info, but they weren't
compiled with -fomit-frame-pointer, so you should still get a
backtrace, and functions which are from the NVIZ source code can be
debugged.

Although, if I run NVWISH2.2 under gdb, I get a segfault in libXext,
but not if I run it directly (with identical arguments).

FWIW, the relevant Cygwin components are:

XFree86-bin-4.2.0-3.tar.bz2
XFree86-xserv-4.2.0-37.tar.bz2
binutils-20030307-1.tar.bz2
cygwin-1.3.22-1.tar.bz2
gcc-2.95.3-5.tar.bz2
gdb-20030303-1.tar.bz2
opengl-1.1.0-6.tar.bz2
sunrpc-4.0-1.tar.bz2
zlib-1.1.4-1.tar.bz2

--
Glynn Clements <glynn.clements@virgin.net>

______________________________
Michael Barton, Professor & Curator
Department of Anthropology
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671

Michael Barton wrote:

It is great news that you have GRASS 5.3 compiling successfully for
Cygwin. I have several questions.

1. In the list of Cygwin components you list has having installed (in
section of copied message below) are opengl and sunrpc. Are these only
necessary for compiling Cygwin or are they also needed for the
binaries? I ask because there is an old version of sunrpc on the
WinGRASS web page, but the binaries installation instructions ignore it.

Oops; you don't need the "opengl" package for GRASS. The modules which
use OpenGL (NVIZ and r3.showdspf.openGL) use the OpenGL implementation
from XFree86. You need XFree86-bin (which contains the DLLs) to run
those modules; you also need XFree86-prog (which contains the headers)
to compile them.

You need the sunrpc package in order to compile GRASS (it uses the XDR
functions in librpclib.a for reading/writing floating-point maps), but
not to run it (only static libraries are used).

2. Can GRASS 5.3 open monitors via the tcltk menu or is it still
necessary to do this from the command line using d.mon?

I didn't try that; I'll check later.

3. If GRASS 5.3 works with tcltk 8.3.4, does that mean that it works
with the Cygwin version of tcltk or is it still necessary to install a
separate version?

No, it only works with the xtcltk-8.3.4-CYGWIN.tar.gz package, which
is available from the GRASS website in the same place as the Cygwin
binary package.

In some respects, it would be easier to get tcltkgrass and NVIZ
working with the native Windows Tcl/Tk than with Cygwin's version.

The Togl widget, on which NVIZ is based, natively supports both
Unix/X11 and Windows (at least, the original version does; the GRASS
version might have modifications which break portability).

Also, many of the X11 dependencies in tcltkgrass are somewhat
gratuitous (e.g. use of xwininfo, hard-coded use of "xterm"), and
could be removed without significant loss of functionality.

--
Glynn Clements <glynn.clements@virgin.net>

Glynn Clements wrote:

> 2. Can GRASS 5.3 open monitors via the tcltk menu or is it still
> necessary to do this from the command line using d.mon?

I didn't try that; I'll check later.

I've checked that; it still doesn't work.

The problem appears to be this in start_monitor, in gui.tcl:

    exec xterm -geometry 40x5 -e d.mon start=$monitor

The xterm terminates as soon as d.mon completes, which seems to end up
killing the monitor (this may be due to a difference in the way that
Cygwin handles terminals, or due to the use of the Win32 spawn()
function rather than Cygwin's fork+exec).

A possible fix is to change the above line not to use an xterm, i.e.

    exec d.mon start=$monitor &

You will still need to select the monitor separately.

--
Glynn Clements <glynn.clements@virgin.net>