From Rubyforge bugtracker: > ruby doesn't work properly under uClibc without a patch. This is because > uClibc uses __bufpos and __bufread (rather than bufpos and bufread), which > configure.in isn't currently detecting. The most immediate symptom is that an > exception is raised if you try to read from a UDP socket: > > root@OpenWrt:~# irb > irb(main):001:0> require 'socket' > => true > irb(main):002:0> s = UDPSocket.new > => #<UDPSocket:0x444000> > irb(main):003:0> s.bind("0.0.0.0",1234) > => 0 > irb(main):004:0> d = s.recvfrom(512) > IOError: recv for buffered IO > from (irb):4:in `recvfrom' > from (irb):4 > irb(main):005:0> This bug is apparently fixed in the latest Ruby, but the fix hasn't filtered down to Portage yet. I can confirm the bug, and I can confirm that the patch supplied at the URL provided works for dev-lang/ruby-1.8.6_p287-r5. I haven't tested other versions. Can we incorporate that patch into the ebuilds for non-fixed packages, please?
From a quick glance everything >= 1.8.7 has this fix applied. We might add this in one of the next 1.8.6 revbumps.
It might be a better idea to fix this by unmasking ruby 1.8.7, even though that may cause additional bugs due to incompatibilities between 1.8.6 and 1.8.7.
I'm sure I tried unmasking 1.8.7 and saw the same bug. Unfortunately I can't verify this at the moment, (I dropped back to 1.8.6 afterwards) - a uClibc update has kind of broken my toolchain and I can't compile Ruby 'til I sort it out...
I applied the patch to ruby-1.8.6_p287-r13. This should be fixed then, if not, reopen the bug. Thanks!
I'm using 1.8.7_p249 now, and the bug's come back :s I'll try applying the patch against it when I have a moment and see if it still works with the new version.
Yup, patch still works against new version but vanilla ebuild is still broken.
It looks like this is not fixed yet in ruby-1.8.7_p299. Anyone from the ruby team know why we dropped this patch?
I can no longer reproduce this with dev-lang/ruby-1.8.7_p334-r1, so I'm going to close this. Feel free to reopen if there are still problems.