Re: Compiling Ruby 1.9.2 on OpenBSD 5.1

2012-07-05 Thread David Coppa
On Thu, Jul 5, 2012 at 4:48 PM, ML mail  wrote:

> option.c: In function 'inspect_peercred':
> option.c:407: error: 'struct ucred'
> has no member named 'pid'
> option.c:407: error: 'struct ucred' has no member
> named 'uid'
> option.c:407: error: 'struct ucred' has no member named 'gid'
> gmake[1]: *** [option.o] Error 1
> gmake[1]: Leaving directory
> `/usr/src/ruby-1.9.2-p320/ext/socket'
> gmake: *** [mkmain.sh] Error 1
>
>
>
> Does
> anyone have a clue what could be going wrong here?

This is because we use "struct sockpeercred" instead of "struct
ucred": you need to patch option.c

> Many thanks in advance.
> Best,
> M.L.

Ciao,
David



Compiling Ruby 1.9.2 on OpenBSD 5.1

2012-07-05 Thread ML mail
Hello,

I need to use the exact version 1.9.2 of Ruby and therefore trying to
compile Ruby on OpenBSD 5.1. My configure command is the following:
./configure --prefix=/usr/local/ruby --with-baseruby=/usr/local/bin/ruby19
Unfortunately the make fails with the following errors:

compiling socket
gmake[1]: Entering directory `/usr/src/ruby-1.9.2-p320/ext/socket'
generating
constant definitions
gcc -I. -I../../.ext/include/x86_64-openbsd5.1
-I../.././include -I../.././ext/socket -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC
-O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith
-Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -o init.o -c
init.c
gcc -I. -I../../.ext/include/x86_64-openbsd5.1 -I../.././include
-I../.././ext/socket -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -g -Wextra
-Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializers -Wno-long-long  -o constants.o -c constants.c
gcc -I. -I../../.ext/include/x86_64-openbsd5.1 -I../.././include
-I../.././ext/socket -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -g -Wextra
-Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializers -Wno-long-long  -o basicsocket.o -c
basicsocket.c
gcc -I. -I../../.ext/include/x86_64-openbsd5.1 -I../.././include
-I../.././ext/socket -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -g -Wextra
-Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializers -Wno-long-long  -o socket.o -c socket.c
gcc
-I. -I../../.ext/include/x86_64-openbsd5.1 -I../.././include
-I../.././ext/socket -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -g -Wextra
-Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializers -Wno-long-long  -o ipsocket.o -c ipsocket.c
gcc -I. -I../../.ext/include/x86_64-openbsd5.1 -I../.././include
-I../.././ext/socket -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -g -Wextra
-Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializers -Wno-long-long  -o tcpsocket.o -c tcpsocket.c
gcc -I. -I../../.ext/include/x86_64-openbsd5.1 -I../.././include
-I../.././ext/socket -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -g -Wextra
-Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializers -Wno-long-long  -o tcpserver.o -c tcpserver.c
gcc -I. -I../../.ext/include/x86_64-openbsd5.1 -I../.././include
-I../.././ext/socket -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -g -Wextra
-Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializers -Wno-long-long  -o sockssocket.o -c
sockssocket.c
gcc -I. -I../../.ext/include/x86_64-openbsd5.1 -I../.././include
-I../.././ext/socket -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -g -Wextra
-Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializers -Wno-long-long  -o udpsocket.o -c udpsocket.c
gcc -I. -I../../.ext/include/x86_64-openbsd5.1 -I../.././include
-I../.././ext/socket -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -g -Wextra
-Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializers -Wno-long-long  -o unixsocket.o -c
unixsocket.c
gcc -I. -I../../.ext/include/x86_64-openbsd5.1 -I../.././include
-I../.././ext/socket -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -g -Wextra
-Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializers -Wno-long-long  -o unixserver.o -c
unixserver.c
gcc -I. -I../../.ext/include/x86_64-openbsd5.1 -I../.././include
-I../.././ext/socket -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -g -Wextra
-Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializers -Wno-long-long  -o option.o -c option.c
option.c: In function 'inspect_peercred':
option.c:407: error: 'struct ucred'
has no member named 'pid'
option.c:407: error: 'struct ucred' has no member
named 'uid'
option.c:407: error: 'struct ucred' has no member named 'gid'
gmake[1]: *** [option.o] Error 1
gmake[1]: Leaving directory
`/usr/src/ruby-1.9.2-p320/ext/socket'
gmake: *** [mkmain.sh] Error 1



Does
anyone have a clue what could be going wrong here? 

Many thanks in advance.
Best,
M.L.