[GRASS5] Socket compilation error on HP-UX

Robert Lagacé lagace at grr.ulaval.ca
Wed May 30 12:22:15 EDT 2001


Glynn Clements wrote:
> 
> Robert Lagacé wrote:
> 
> > > > > > The <sys/select.h> is missing on HP-UX.  What are the symbols that
> > > > > > "connec_socket.c" is looking for in this file so I look where they are.
> > > > >
> > > > > on my linux box it compiles without sys/select.h. Perhaps you try to
> > > > > remove that include line and compile again. Maybe this is a residual
> > > > > from a former version?
> >
> > I remove the the include line and the compilation did not complained
> > but I do not know the implact.
> 
> Removing the line shouldn't cause any problems.
> 
> > The XDRIVER is not linked correctly because
> > /usr/ccs/bin/ld: Can't find library for -lX11.
> >
> > I need to find the X11 lib.
>

The libX11.a and libX11.sl were not installed.  The problem is solve 
and compilation is OK.  Next is testing.  Report as soon as it is done. 

GRASS wil have one more platform. 

> It's normally in "/usr/X11/lib". If it is installed, but the
> "configure" script can't find it, you can use the "--x-libraries"
> argument to force a specific directory.
> 
> > > > Yep; it's from the original attempt at getting the mouse functions to
> > > > terminate on EOF (from a couple of days ago). The select() has now
> > > > moved to Serve_Xevent.c.
> > >
> > > No it isn't; I was getting confused with command.c (which had a
> > > select() added then removed).
> > >
> > > > However, it appears that <sys/types.h> is the correct file to
> > > > include.
> > >
> > > This is still true. I'll change this.
> >
> > What are the symbols or functions defined there?
> 
> The ones for which <sys/select.h> was being used are the fd_set type
> and the FD_ZERO and FD_SET macros. In GNU libc 2, these are defined in
> <sys/select.h> but that file is included from <sys/types.h>. The
> latter is apparently the correct file to include for these 
> definitions.

On HP-UX 10.2, fd_set type and FD_ZERO and FD_SET macros are define in 
<sys/types.h>.  If for other platforms, these definitions are as you 
said in <sys/select.h> but included from <sys/types.h>, it not 
necessary to put the include statement #include <sys/select.h> since 
#include <sys/types.h> is already present.  The problem can only exist 
for systems where thoses definitions are not included directly or 
indirectly by <sys/types.h>.  In those case, the include will be 
conditional. We need to identify those systems.  HP-UX and LINUX 
seems OK.

One tempory solution i may be change the following statements in 
connect_sock.c 

#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>

to 

#include <sys/time.h>
#include <sys/types.h>

#ifndef _FD_SET

#include <sys/select.h>

#endif

It would be better if everyone check where those are defined on their 
platform.

> 
> --
> Glynn Clements <glynn.clements at virgin.net>
> _______________________________________________
> grass5 mailing list
> grass5 at geog.uni-hannover.de
> http://www.geog.uni-hannover.de/mailman/listinfo/grass5

-- 
Robert Lagacé, professeur
Pavillon Comtois
Université Laval
Ste-Foy, Québec, G1K 7P4
tel : (418)-656-2131#2276
Fax : (418)-656-3723
E-mail : lagace at grr.ulaval.ca



More information about the grass-dev mailing list