g+
g+ Communities
Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  Index 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014 
<== Date ==> <== Thread ==>

Subject: RE: Epics R3.13.1.1 build with gcc2.95
From: johill@lanl.gov (Jeff Hill)
To: "Matt Newville" <newville@cars1.uchicago.edu>
Cc: "EPICS-tech-talk" <tech-talk@aps.anl.gov>
Date: Tue, 18 Jan 2000 12:40:53 -0700
Hi Matt,

Thanks for the heads up. EPICS R3.13.2 builds just fine on Solaris 
with gcc 2.95.2. I think that you are having troubles because of a 
new version of LINUX. 

Problem 1, implicit int)
This only causes a warning on the new gcc but it nevertheless has 
been fixed in 3.14 (before you brought this to my attention).

Problem 2, different types for length)
This is new and more serious because it is a change in the socket API which
is not constant on all OS. I notice that this "socklen_t" _is_ in the
prototypes in the "Single UNIX Specification" at
http://www.opengroup.org/onlinepubs/007908799/toc.htm, but it is not
yet used by either the Microsoft or the SUN implementation of sockets.

Before I can fix this problem I will need to know:
1) In what version of LINUX was this change introduced.
2) How can the C preprocessor identify the range of
LINUX versions requiring source code changes to dodge 
this feature.

Perhaps the long term solution is to define a type in osiSock.h
which maps into the proper type. On LINUX this may require a C preprocessor
ifdef on the version of linux :-(

Jeff

> 
> I'm trying to build R3.13.1.1 on a linux box with gcc2.95.1 (which I
> understand to now be the official gcc, though a minor bugfix release has
> been released).
> 
> Anyway, most of epics base/ built with gcc2.95, but I got the following
> errors in building base/src/cas: 
> 
> A minor error in  generic/caServer.cc:
>    line 94:  static  init; 
> 
> I guessed you wanted this to be  
>               static int init;

This was changed to "static bool init" in the current version of R3.14

> 
> and that compiled OK.
> 
> More serious errors happened in  io/bsdSocket/casInfIO.cc:
> 
>  casIntfIO.cc: In method `caStatus casIntfIO::init(const caNetAddr &, 
>                    casDGClient &, int, int)':
>  casIntfIO.cc:120: passing `int *' as argument 3 of 
>                    `getsockname(int, sockaddr *, socklen_t *)' 
> changes signedness
>  casIntfIO.cc: In method `class casStreamOS * 
>                    casIntfIO::newStreamClient(caServerI &) const':
>  casIntfIO.cc:217: passing `int *' as argument 3 of 
>                   `accept(int, sockaddr *, socklen_t *)' changes 
> signedness
> 
> 
> Does this just need a conversion of sizeof() to type socklen_t?  Anyway,
> this code built with gcc2.7.2, but gcc2.95 seems pretty strict about ANSI
> C++.  I understand that future releases will be even more strict!

I think that you are having troubles because of a new version of LINUX.

Solaris has the following function prototype:

     int getsockname(int socket, struct sockaddr *address,
          size_t *address_len);

and WIN32 has this prototype:

int getsockname (
  SOCKET s,                    
  struct sockaddr FAR*  name,  
  int FAR*  namelen            
);
 

Jeff


Navigate by Date:
Prev: Monitors for the STAT field Benjamin Franksen
Next: EpicsR3.13.1 CA build Zoltan Kakucs
Index: 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014 
Navigate by Thread:
Prev: Monitors for the STAT field Benjamin Franksen
Next: EpicsR3.13.1 CA build Zoltan Kakucs
Index: 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·