Hi,

At Sun, 18 Jun 2006 04:25:49 +0900,
Lanny Rosicky wrote in [ruby-talk:197853]:
> Here is the output
> ARCHFILE      = ruby.imp
> $(LIBRUBY_SO):  $(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(ARCHFILE)
>         @$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(ARCHFILE)
> 
> However, it did not seem to do it. I entered
> make ruby.imp and got past the error message.

Sorry, I added $(ARCHFILE) to the rule for all, but forgot to
commit it.

> Now I am struggling with
> ./ext/extmk.rb:168: warning: Insecure world writable dir /tmp, mode 
> 0241777
>         /usr/ccs/bin/ld -brtl -eInit_socket -bI:../../ruby.imp -bM:SRE 
> -T512 -H512   -L"../.." -o ../../.ext/powerpc-aix4.3.3.0/socket.so 
> socket.o  -ldl -lcrypt -lm   -lc
> ld: 0711-317 ERROR: Undefined symbol: .CMSG_SPACE
> ld: 0711-317 ERROR: Undefined symbol: .CMSG_LEN
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more 
> information.
> make: 1254-004 The error code from the last command is 8.

Does this patch work?


Index: common.mk =================================================================== RCS file: /cvs/ruby/src/ruby/common.mk,v retrieving revision 1.13.2.6 diff -p -U2 -r1.13.2.6 common.mk --- common.mk 13 Feb 2006 14:22:56 -0000 1.13.2.6 +++ common.mk 18 Jun 2006 05:35:05 -0000 @@ -59,5 +59,5 @@ SCRIPT_ARGS = --dest-dir="$(DESTDIR)" EXTMK_ARGS = $(SCRIPT_ARGS) --extout="$(EXTOUT)" --extension $(EXTS) --extstatic $(EXTSTATIC) -- -all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY) +all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY) $(ARCHFILE) @$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS) prog: $(PROGRAM) $(WPROGRAM) Index: ext/socket/socket.c =================================================================== RCS file: /cvs/ruby/src/ruby/ext/socket/socket.c,v retrieving revision 1.108.2.51 diff -p -U2 -r1.108.2.51 socket.c --- ext/socket/socket.c 17 Jun 2006 15:53:27 -0000 1.108.2.51 +++ ext/socket/socket.c 18 Jun 2006 05:37:35 -0000 @@ -1897,4 +1897,14 @@ unix_recvfrom(argc, argv, sock) #endif +#if FD_PASSING_BY_MSG_CONTROL +/* AIX 4.3 lacks these macros */ +# ifndef CMSG_SPACE +# define CMSG_SPACE(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + _CMSG_ALIGN(len)) +# endif +# ifndef CMSG_LEN +# define CMSG_LEN(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) +# endif +#endif + static VALUE unix_send_io(sock, val)
-- Nobu Nakada