[GRASSLIST:1640] Re: grass-5.0.3rc5 on cygwin

Richard Greenwood Rich at GreenwoodMap.com
Sat Nov 1 13:50:36 EST 2003


Thank you for your prompt reply. After I examined the differences between 
my configure scripts for builds that worked and those that did not I found 
that by REMOVING the following two option I was able to build 5.0.3rc5 on 
cygwin with functional monitors.
I am working ion Windows 2000. I was not specifying --enable-w11 and I was 
specifying  -D__W98__

If I understand your reply and extrapolate it bit;
1. I was including the 'generic' drivers by specifying --x-includes... and 
2. But I was doing a 'native' build because I did not specify --enable-w11

I am still pretty confused by the 'generic' versus the 'native' cygwin 
versions. From a user perspective I understand the differences, but from a 
functional perspective I am rather unclear on what the differences are. And 
from a build perspective I am obviously confused. I do not mean to impose 
on your time for a tutorial on the subject, but if there is an existing 
discussion of the topic I would surely be interested in it.

Thanks for your help.


At 01:02 AM 11/1/2003, Glynn Clements wrote:

>Richard Greenwood wrote:
> > I've compiled 5.0.3rc5 on cygwin, but on starting a monitor I get:
> >
> >     Socket is already in use or not accepting connections.
> >     Use d.mon to select a monitor
> >     Problem selecting x0. Will try once more
> >     Socket is already in use or not accepting connections.
> >     Use d.mon to select a monitor
> >
> > I've compiled 5.0.2 from CVS and I get the same error.
> >
> > However I compiled 5.7 from 9/27 CVS snapshot and monitors run properly,
> > and I have a 5.0.2 Xwin installed from binary which runs properly.
>1. Which version of Windows?
>2. Did you use the --enable-w11 configure switch?
>Without --enable-w11, XDRIVER generally crashes on the DOS-based
>versions of Windows (95/98/ME); NT variants (NT/2K/XP) are reported to
>work, but this may depend upon the specific versions of Windows and/or
>Cygwin in use.
>If you want to build a "real" (i.e. not libW11) X11 version of XDRIVER
>for 95/98/ME, you have to manually add -D__W98__ to CFLAGS when
>configuring, e.g.:
>         CFLAGS='-g -O2 -D__W98__' ./configure ...
>The --enable-w98 switch defines __W98__ automatically, but it also
>uses libW11 for XDRIVER (i.e. produces the "generic" version). The
>__W98__ macro is used by mon.start (src/display/d.mon/pgms/start.c),
>and has two effects:
>1. XDRIVER is started using the Windows spawnl() function rather than
>the Unix execl() function.
>2. The second argument to XDRIVER is a dash, which prevents XDRIVER
>from going into the background with fork() (spawnl(_P_DETACH,...) is
>equivalent to a combined fork()+exec()).
>This feature was originally added for the wingrass_generic (libW11)
>version, but can be used to work around what appears to be a bug in
>either Cygwin's fork() or in their X libraries.
> > Unfortunately I am not smart enough to know where to even begin looking 
> for
> > the source(s) of my errors, so any pointers would be appreciated.
>You can start XDRIVER manually using e.g.
>         $GISBASE/driver/XDRIVER x0 - ""
>(three arguments; the first is the name, the second is a dash, the
>third is ignored but must be present). If this works, but using:
>         $GISBASE/driver/XDRIVER x0 "" ""
>(i.e. an empty second argument in place of the dash) doesn't,
>rebuilding mon.start with -D__W98__ should cure it.
>  Assuming that XDRIVER is
>crashing on startup, starting it manually may provide more information
>as to why. Better still, run it under GDB, e.g.
>         $ gdb $GISBASE/driver/XDRIVER
>         gdb> run x0 - ""
>         [crashes e.g. due to "Segmentation fault".]
>         gdb> where
>Glynn Clements <glynn.clements at virgin.net>

Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich <at> GreenwoodMap <dot> com
(307) 733-0203

More information about the grass-user mailing list