From: Ray Capozzi Date: 2004-03-14T01:09:37+09:00 Subject: HP-UX Socket Build sa_len error I cannot get ruby 1.8 to build its socket thingy on an HP-UX superdome. The socket's make complains of no 'sa_len'. It seems that ruby's socket.c doesn't like the machine's socket.h. I get the same outcome with both cc and gcc (v2.96). I've googled this to no end, and yet I cannot find a solution. The errors point to a bad/old socket header. While I suspected the 2.9 gcc was a problem, gcc 3.x does not deliver any socket.h so I don't think gcc's version is the problem. Can't ruby run on hp-ux and hp superdome? What am I missing? % gcc -v Reading specs from /usr/cygnus/bin/../lib/gcc-lib/hppa1.1-hp-hpux11.00/2.96-hppa-010528/specs gcc version 2.96-hppa-010528 % model 9000/800/SD32000 % uname -a HP-UX hostname B.11.11 U 9000/800 2750633204 unlimited-user license % ./configure --prefix=$HOME/local -C --disable-ipv6 snip % make snip compiling socket make[1]: Entering directory `${HOME}/src/ruby-1.8.1/ext/socket' /usr/cygnus/bin/gcc -I. -DHAVE_ADDR8 -DHAVE_SA_LEN -DHAVE_SOCKADDR_STORAGE - DHAVE_SIN_LEN -g -O2 -I. -I${HOME}/src/ruby-1.8.1 -I${HOME}/src/ruby-1.8.1 -I${HOME}/src/ruby-1.8.1/ext/socket -DHAVE_NETINET_TCP_H -DHAVE_NETINET_UDP_ H -DHAVE_SENDMSG -DHAVE_RECVMSG -DHAVE_ST_MSG_ACCRIGHTS -DHAVE_INET_NTOP -DH AVE_INET_PTON -DHAVE_GETSERVBYPORT -DHAVE_ARPA_INET_H -DHAVE_ARPA_NAMESER_H -DHAVE_RESOLV_H -DHAVE_SYS_UN_H -DHAVE_SYS_UIO_H -DHAVE_SOCKET -DHAVE_HSTERR OR -DHAVE_GETIPNODEBYNAME -DHAVE_GETHOSTNAME -c socket.c In file included from socket.c:32: /usr/include/sys/socket.h:504: warning: static declaration for `sendfile' follows non-static /usr/include/sys/socket.h:505: warning: static declaration for `sendpath' follows non-static socket.c: In function `bsock_getsockopt': socket.c:320: warning: passing arg 5 of `getsockopt' from incompatible pointer type socket.c: In function `bsock_getsockname': socket.c:338: warning: passing arg 3 of `getsockname' from incompatible pointer type socket.c: In function `bsock_getpeername': socket.c:352: warning: passing arg 3 of `getpeername' from incompatible pointer type socket.c: In function `s_recvfrom': socket.c:439: warning: passing arg 6 of `recvfrom' from incompatible pointer type socket.c: In function `make_ipaddr0': socket.c:506: structure has no member named `sa_len' socket.c: In function `make_inetaddr': socket.c:532: structure has no member named `sin_len' socket.c: In function `ipaddr': socket.c:692: structure has no member named `sa_len' socket.c:699: structure has no member named `sa_len' socket.c: In function `s_accept': socket.c:1121: warning: passing arg 3 of `accept' from incompatible pointer type socket.c: In function `ip_addr': socket.c:1245: warning: passing arg 3 of `getsockname' from incompatible pointer type socket.c: In function `ip_peeraddr': socket.c:1260: warning: passing arg 3 of `getpeername' from incompatible pointer type socket.c: In function `unix_path': socket.c:1428: warning: passing arg 3 of `getsockname' from incompatible pointer type socket.c: In function `unix_addr': socket.c:1666: warning: passing arg 3 of `getsockname' from incompatible pointer type socket.c: In function `unix_peeraddr': socket.c:1683: warning: passing arg 3 of `getpeername' from incompatible pointer type socket.c: In function `sock_s_getnameinfo': socket.c:2182: structure has no member named `sa_len' socket.c:2262: structure has no member named `sa_len' socket.c:2270: structure has no member named `sa_len' make[1]: *** [socket.o] Error 1 make[1]: Leaving directory `${HOME}/src/ruby-1.8.1/ext/socket' make: *** [all] Error 1