[Pmk-devel] Re: pmk problems on FreeBSD and DragonFlyBSD
Brought to you by:
coudercd
|
From: Damien C. <mip...@us...> - 2005-04-13 20:05:31
|
Toma=BE Bor=B9tnar wrote: > Hello! >=20 > I came across pmk while (unsuccesfully) trying to compile=20 > libmemcache. At first I tried it on DragonFlyBSD=20 > (http://www.dragonflybsd.org/) and it did not work, but later I tried o= n=20 > FreeBSD 4.11 and same problem. Developer of libmemcache mentions pmk=20 > 0.9.x having problems, but I tried both 0.8.2 and 0.9.2 - from ports an= d=20 > manually installed. Always the same: >=20 > * Checking header [include_socket] > Use C language with CC compiler. > Store compiler flags in 'CFLAGS'. > Found function 'socket' in 'sys/socket.h' : no. > Error : failed to find function 'socket'. >=20 > On DragonFly i have it there: >=20 > > grep socket /usr/include/sys/socket.h > * @(#)socket.h 8.4 (Berkeley) 2/21/94 > * $FreeBSD: src/sys/sys/socket.h,v 1.39.2.7 2001/07/03 11:02:01 ume Exp= $ > * $DragonFly: src/sys/sys/socket.h,v 1.10 2005/01/26 23:09:58 hsu Exp $ > * Definitions related to sockets: types, address families, options. > #define SOCK_STREAM 1 /* stream socket */ > #define SOCK_DGRAM 2 /* datagram socket */ > * Option flags per-socket. > #define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ > #define SO_TYPE 0x1008 /* get socket type */ > * Level number for (get/set)sockopt() to apply to socket itself. > #define SOL_SOCKET 0xffff /* options for socket level */ > #define AF_NETGRAPH 32 /* Netgraph sockets */ > * information in raw sockets. > * RFC 2553: protocol-independent placeholder for socket addresses > int socket (int, int, int); > int socketpair (int, int, int, int *); >=20 > One of DFly developers wrote this as possible cause: >=20 > I guess they don't include sys/types.h first as it is common convention= . > Stand-alone system headers is still on my list. >=20 > Joerg >=20 > --------- >=20 > Any idea what could be done in order to successfully use pmk to compile= =20 > libmemcache? Hi Toma=BE, well this problem would have been appeared soon or later. There is two=20 way of resolving that matter. First we could put by default some headers=20 in the test code but i'm afraid of the border effects of this solution.=20 The other would be to permit providing of additional headers needed for=20 the test. So i think i'll implement the second as sooon as possible. In the general case it's better to check for a function in the lib as=20 the same in the header is somewhat a trick. BTW i'm surprised it doesn't work under freebsd as the author of=20 libmemcache is a committer. Damien |