[GRASS5] sockets XDriver error

Hi developers,

I have a problem with sockets XDriver.
Does anyone know this error?

GRASS 5.0beta11 > d.mon start=x0
Usage: x0 [nlev]
No socket to connect to for monitor <x0>.
,/usr/local/grass5/fonts/romans^CProblem selecting x0. Will try once more
No socket to connect to for monitor <x0>.
,/usr/local/grass5/fonts/romans^C
Mapset <hdcho> in Location <loc1>
GRASS 5.0beta11 >

Huidae Cho

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Huidae,

I haven't experienced this error, but I can suggest something to check.

It looks like the call to start the XDRIVER is failing in the syntax check at the
beginning of SWITCHER.c. Did d.mon routines recompile properly? Since Eric
changed the calling syntax in d.mon/pgms/start.c, using an old version of d.mon
start would have this effect.

Another clue: Eric added checks for the return value of R_open_driver() and the
messages printing out don't stop at the "No socket to connect...." message. It
looks like d.mon select is going to the next statement even though R_open_driver
should have return a NO_MON.

I suggest checking to see if d.mon was successfully recompiled and installed.
Also, make sure you are using the latest updates from Eric, to include the error
checking in d.mon select.

Hope this helps,

Malcolm

Huidae Cho wrote:

Hi developers,

I have a problem with sockets XDriver.
Does anyone know this error?

> GRASS 5.0beta11 > d.mon start=x0
> Usage: x0 [nlev]
> No socket to connect to for monitor <x0>.
> ,/usr/local/grass5/fonts/romans^CProblem selecting x0. Will try once more
> No socket to connect to for monitor <x0>.
> ,/usr/local/grass5/fonts/romans^C
> Mapset <hdcho> in Location <loc1>
> GRASS 5.0beta11 >

Huidae Cho

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

For those who didn't catch it in the grass-commit log...

In order to build the sockets stuff successfully, one should probably do
a make clean first, and then run './configure --with-socks'. It's
possible not to do a complete clean, but you still must run './configure
--with-socks' and you must make sure the d.mon/pgms/OBJ.$ARCH/start.o
is deleted (Make/gmake5 won't know to recompile start.c just because
USE_G_SOCKS is now defined -- triggers some conditional compilation code
in start.c).

I've added some checks to prevent the same monitor being opened more
than once (at least while earlier incantations are still accepting
connections).

As far as the BackingStore problem with long running processes. I don't
see any easy fix. The functions that block like
Get_location_with_pointer(), need to set-up Xevent handling so
Serve_Xevents() can be called to handle things like Expose events, while
the events of interest are handled by the function itself (or another
function). Probably trivial for someone who's real familiar with Xlib
functions (not me;).

--
Eric G. Miller <egm2@jps.net>

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Eric,

I have been trying to build the latest grass release under Solaris (7)
today. One of the problems that I have encountered is in "unix_socks.c"
in the gis lib. It fails at line 123 because it cannot find a definition
for PF_LOCAL. I have checked sys/socket.h, and for some reason it is not
defined there.

Any idea where I would find an upgrade to include PF_LOCAL?

Thanks in advance for any assistance.

--
Bob Covill

Tekmap Consulting
P.O. Box 2016
Fall River, N.S.
B2T 1K6
Canada

E-Mail: bcovill@tekmap.ns.ca
Phone: 902-860-1496
Fax: 902-860-1498

On Thu, Feb 15, 2001 at 04:37:49PM -0400, Bob Covill wrote:

Eric,

I have been trying to build the latest grass release under Solaris (7)
today. One of the problems that I have encountered is in "unix_socks.c"
in the gis lib. It fails at line 123 because it cannot find a definition
for PF_LOCAL. I have checked sys/socket.h, and for some reason it is not
defined there.

Any idea where I would find an upgrade to include PF_LOCAL?

I should've know better than using PF_LOCAL (Posix).
s/PF_LOCAL/AF_LOCAL/ and if that doesn't work s/AF_LOCAL/AF_UNIX/.

I'll change it to AF_LOCAL in CVS...

FYI: I found the definition in /usr/include/bits/socket.h (which is
included by /usr/include/sys/socket.h). It defines PF_UNIX, AF_LOCAL,
and AF_UNIX as synonyms for PF_LOCAL (which is defined as 1 here).

--
Eric G. Miller <egm2@jps.net>

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

"Eric G . Miller" wrote:

On Thu, Feb 15, 2001 at 04:37:49PM -0400, Bob Covill wrote:
> Eric,
>
> I have been trying to build the latest grass release under Solaris (7)
> today. One of the problems that I have encountered is in "unix_socks.c"
> in the gis lib. It fails at line 123 because it cannot find a definition
> for PF_LOCAL. I have checked sys/socket.h, and for some reason it is not
> defined there.
>
> Any idea where I would find an upgrade to include PF_LOCAL?

I should've know better than using PF_LOCAL (Posix).
s/PF_LOCAL/AF_LOCAL/ and if that doesn't work s/AF_LOCAL/AF_UNIX/.

I'll change it to AF_LOCAL in CVS...

FYI: I found the definition in /usr/include/bits/socket.h (which is
included by /usr/include/sys/socket.h). It defines PF_UNIX, AF_LOCAL,
and AF_UNIX as synonyms for PF_LOCAL (which is defined as 1 here).

--
Eric G. Miller <egm2@jps.net>

Eric,

Just to be difficult, Solaris does not define AF_LOCAL either. I have attached my
socket.h file to show how things are defined on my Solaris system. It does not
look for a bits/socket.h file as on other systems (linux), everything seems to be
defined in this one file from sys/socket.h.

Is AF_UNIX and PF_UNIX the same as AF_LOCAL? Would it be a legal fix to replace
AF_LOCAL with AF_UNIX? I am completely in the dark when it comes to sockets.

Thanks in advance for any assistance.

--
Bob Covill

Tekmap Consulting
P.O. Box 2016
Fall River, N.S.
B2T 1K6
Canada

E-Mail: bcovill@tekmap.ns.ca
Phone: 902-860-1496
Fax: 902-860-1498

(attachments)

socket.h (13.4 KB)

On Fri, Feb 16, 2001 at 09:59:15AM -0400, Bob Covill wrote:

Eric,

Just to be difficult, Solaris does not define AF_LOCAL either. I have
attached my socket.h file to show how things are defined on my Solaris
system. It does not look for a bits/socket.h file as on other systems
(linux), everything seems to be defined in this one file from
sys/socket.h.

Is AF_UNIX and PF_UNIX the same as AF_LOCAL? Would it be a legal fix
to replace AF_LOCAL with AF_UNIX? I am completely in the dark when it
comes to sockets.

I updated unix_socks.c to define AF_LOCAL = AF_UNIX and PF_LOCAL =
PF_UNIX if the two aren't defined already. I imagine there are still
quite a few machines in operation that don't have the POSIX naming
convention...

--
Eric G. Miller <egm2@jps.net>

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'