I have embarked on creating a package of Ruby 2.2 with Event Machine for OpenWRT Barrier Breaker. The makefile for the eventmachine package can be seen here: https://github.com/DaKaZ/ruby-openwrt/blob/master/packages/ruby-eventmachine/Makefile
I was able to successfully use the Ruby 2.2 implementation from the trunk of feeds/packages and am running OpenWRT Barrier Breaker with Ruby 2.2 on my router, but... eventmachine is throwing the following error when it builds:
In file included from /Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby.h:33:0,
from rubymain.cpp:26:
/Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby/ruby.h:107:73: error: size of array 'ruby_check_sizeof_long' is negative
typedef char ruby_check_sizeof_long[SIZEOF_LONG == sizeof(long) ? 1 : -1];
^
/Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby/ruby.h:111:76: error: size of array 'ruby_check_sizeof_voidp' is negative
typedef char ruby_check_sizeof_voidp[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1];
^
In file included from /Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby/intern.h:35:0,
from /Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby/ruby.h:1710,
from /Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby.h:33,
from rubymain.cpp:26:
/Volumes/OpenWrt/barrier_breaker/staging_dir/host/include/ruby-2.2.0/ruby/st.h:52:93: error: size of array 'st_check_for_sizeof_st_index_t' is negative
typedef char st_check_for_sizeof_st_index_t[SIZEOF_VOIDP == (int)sizeof(st_index_t) ? 1 : -1];
^
make[4]: *** [rubymain.o] Error 1
make[3]: *** [/Volumes/OpenWrt/barrier_breaker/build_dir/target-mipsel_74kc+dsp2_uClibc-0.9.33.2/linux-brcm47xx_mips74k/ruby-eventmachine-1.0.7/.built] Error 2
make[3]: Leaving directory `/Volumes/OpenWrt/barrier_breaker/feeds/rubyopenwrt/packages/ruby-eventmachine'
make[2]: *** [package/feeds/rubyopenwrt/ruby-eventmachine/compile] Error 2
make[2]: Leaving directory `/Volumes/OpenWrt/barrier_breaker'
make[1]: *** [/Volumes/OpenWrt/barrier_breaker/staging_dir/target-mipsel_74kc+dsp2_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/Volumes/OpenWrt/barrier_breaker'
make: *** [world] Error 2
This appears to be an error in the HOST version of ruby but I can't figure out how to correctly use the cross compiled version to build eventmachine. Please help!