[Gpm] Re: gpm 1.19.3 doesn't build?

Ian Zimmerman itz@speakeasy.org
04 Aug 2000 21:28:11 -0700


> Hi. I can't get gpm 1.19.3 to build. I get the following error:
> etc\" -DSBINDIR=\"/usr/local/sbin\"  -g
> -O2  -c -o gpm.o /home/fredlwm/gpm-1.19.3/gpm.c
> /home/fredlwm/gpm-1.19.3/gpm.c: In function `processConn':
> /home/fredlwm/gpm-1.19.3/gpm.c:830: storage size of `sucred' isn't known
> /home/fredlwm/gpm-1.19.3/gpm.c:831: sizeof applied to an incomplete type
> make: *** [gpm.o] Error 1
> 
> Linux pervalidus.dyndns.org 2.4.0-test5 #1 Fri Jul 28 00:11:04 BRT 2000 i586 unknown
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs
> gcc version 2.7.2.3
> 
> glibc 2.0.7 from RedHat 5.2

Uh-oh.  Not incompatible libcs _again_!  I thought I would put an end
to it by installing Debian (and glibc) after many distribution-less
years :(

I get:

kronstadt:~$ dpkg --status libc6-dev
Package: libc6-dev
Status: install ok installed
Priority: standard
Section: devel
Installed-Size: 9932
Maintainer: Joel Klecker <debian-glibc@lists.debian.org>
Source: glibc
Version: 2.1.3-10
Replaces: ldso (<< 1.9.0-0), man-db (<= 2.3.10-41), gettext (<= 0.10.26-1), ppp (<= 2.2.0f-24), libgdbmg1-dev (<= 1.7.3-24)
Provides: libc-dev
Depends: libc6 (= 2.1.3-10)
Recommends: c-compiler
Suggests: glibc-doc
Conflicts: libc-dev, libstdc++2.9-dev, libdl1-dev, libdb1-dev, libgdbm1-dev, libpthread0-dev, gcc (<= 2.7.2.3-1)
Description: GNU C Library: Development Libraries and Header Files.
 Contains the symlinks, headers, and object files needed to compile
 and link programs which use the standard C library.

kronstadt:~$ gid -f /var/local/id-utils/_usr_include.ID SO_PEERCRED
/usr/include/asm/socket.h:25:#define SO_PEERCRED        17
kronstadt:~$ gid -f /var/local/id-utils/_usr_include.ID ucred
/usr/include/bits/socket.h:287:struct ucred
/usr/include/linux/netlink.h:88:        struct ucred            creds;         /* Skb credentials       */
/usr/include/linux/socket.h:122:#define SCM_CREDENTIALS 0x02            /* rw: struct ucred             */
/usr/include/linux/socket.h:125:struct ucred {
kronstadt:~$ 

So, struct ucred is defined in bits/socket.h, which is included by
sys/socket.h.

Somebody (not me) could write an autoconf macro to check that this
struct is defined, and if not, define it by hand (maybe in gpmInt.h).
I am not sure it's worth it.  Here's the definition:

/* User visible structure for SCM_CREDENTIALS message */

struct ucred
{
  pid_t pid;			/* PID of sending process.  */
  uid_t uid;			/* UID of sending process.  */
  gid_t gid;			/* GID of sending process.  */
};

The Debian users among us know why Debian 2.2, just-just out of the
door, will be dedicated to Joel Klecker, who's listed as Debian's
glibc maintainer above.  Thanks, Joel.

P.S. Alessandro, did you get my private message earlier this week?  I
assumed you were away, but now I see you aren't :)

-- 
Ian Zimmerman, Oakland, California, U.S.A.
In his own soul a man bears the source
from which he draws all his sorrows and his joys.
Sophocles.