Mike said:
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-talk/227140
http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/227140?226556-227545
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