[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby socket support

Mike Rosset

4/6/2008 2:30:00 AM

Hello all,

I'm getting this error trying to use use gems

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- socket (LoadError)

ruby and ruby gems is built against uclibc . I'm trying to figure out
why ruby is not being built with socket support.

any ideas would be helpful

Thanks

zio
--
Posted via http://www.ruby-....

4 Answers

Joel VanderWerf

4/6/2008 4:36:00 AM

0

Mike Rosset wrote:
> Hello all,
>
> I'm getting this error trying to use use gems
>
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require': no such file to load -- socket (LoadError)
>
> ruby and ruby gems is built against uclibc . I'm trying to figure out
> why ruby is not being built with socket support.
>
> any ideas would be helpful

A few years ago, I did some network programming on gumstix (uclibc) with
ruby, and they did work well. One thing is to make sure to build socket
statically (uncomment the line in ext/Setup before building ruby):

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-t...
http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/227140?226...

Just uncomment all the extensions you think you'll need.

I had this configure option, too: --disable-ipv6. Not sure if that's
still needed.

I also had to hack configure.in a little (maybe it was for cross
compiling?). My notes are below, but this was for a very early version
of ruby 1.9, so YMMV. With any luck, just the static link change will
get it working for you.

# configure.in:
# add these lines after AC_FUNC_GETPGRP, in place of AC_FUNC_SETPGRP:

dnl AC_FUNC_SETPGRP does not work if cross compiling
dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
if test "$cross_compiling" = no; then
AC_FUNC_SETPGRP
else
AC_CACHE_CHECK([whether setpgrp takes no argument],
ac_cv_func_setpgrp_void,
[AC_TRY_COMPILE([
#include <unistd.h>
], [
if (setpgrp(1,1) == -1)
exit (0);
else
exit (1);
], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes)])
if test $ac_cv_func_setpgrp_void = yes; then
AC_DEFINE(SETPGRP_VOID, 1)
fi
fi

# after patching:
autoreconf

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Mike Rosset

4/6/2008 5:27:00 AM

0

> With any luck, just the static link change will
> get it working for you.

Joel,

You were right on the money. thank you for your comprehensive reply.

regards,

Mike
--
Posted via http://www.ruby-....

Joel VanderWerf

4/6/2008 6:49:00 AM

0

Mike Rosset wrote:
>> With any luck, just the static link change will
>> get it working for you.
>
> Joel,
>
> You were right on the money. thank you for your comprehensive reply.
>
> regards,
>
> Mike

Great! Mind if I ask which platform...?

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Mike Rosset

4/6/2008 8:36:00 AM

0

Joel VanderWerf wrote:
> Mike Rosset wrote:
>>> With any luck, just the static link change will
>>> get it working for you.
>>
>> Joel,
>>
>> You were right on the money. thank you for your comprehensive reply.
>>
>> regards,
>>
>> Mike
>
> Great! Mind if I ask which platform...?

Oddly enough right now i386. you can find the project here
http://code.google.co... . hopefully I can find some arm hardware
so I can start porting to arm.

Mike
--
Posted via http://www.ruby-....