Hey folks,
First post here for me. Thank you for all the hard work making this possible.
Apologies if this is not the proper channel, but I did not want to create a github issue.
-----
I am building a gem and cross compiling using rake-compiler / mingw. I
hit an error (terminal video showing problem) using "rake-compiler cross-ruby VERSION=2.2.1" related to win32ole.
My thoughts then were to just download the i386-mingw32 build from RubyInstaller and configure it within ~/.rake-compiler/config.yml:
~/rake-compiler/config.yml
---
rbconfig-i386-mingw32-2.2.1: "/home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/lib/ruby/2.2.0/i386-mingw32/rbconfig.rb"
rbconfig-x64-mingw32-2.2.1: "/home/tony/.rake-compiler/ruby/x64-mingw32/ruby-2.2.1-x64-mingw32/lib/ruby/2.2.0/x64-mingw32/rbconfig.rb"
I updated the CONFIG["prefix"] within rbconfig.rb to reflect the ruby prefix (i.e. /home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32). Then I ran "rake cross compile" and received the following errors when including ruby.h:
video showing this error-----
In file included from /home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby/ruby.h:24:0,
from /home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby.h:33,
from ../../../../ext/mri/libbel.c:1:
/home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/i386-mingw32/ruby/config.h:161:15: error: two or more data types in declaration specifiers
#define gid_t int
^
/home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/i386-mingw32/ruby/config.h:160:15: error: two or more data types in declaration specifiers
#define uid_t int
^
In file included from /home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby.h:33:0,
from ../../../../ext/mri/libbel.c:1:
/home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby/ruby.h:107:14: error: size of array ‘ruby_check_sizeof_long’ is negative
typedef char ruby_check_sizeof_long[SIZEOF_LONG == sizeof(long) ? 1 : -1];
^
/home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby/ruby.h:111:14: 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 /home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby.h:33:0,
from ../../../../ext/mri/libbel.c:1:
/home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby/ruby.h: In function ‘rb_int2num_inline’:
/home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby/ruby.h:1303:5: warning: comparison is always true due to limited range of data type [-Wtype-limits]
if (FIXABLE(v))
^
/home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby/ruby.h:1303:5: warning: comparison is always true due to limited range of data type [-Wtype-limits]
/home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby/ruby.h: In function ‘rb_uint2num_inline’:
/home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby/ruby.h:1313:5: warning: comparison is always true due to limited range of data type [-Wtype-limits]
if (POSFIXABLE(v))
^
In file included from /home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby/intern.h:35:0,
from /home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby/ruby.h:1710,
from /home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby.h:33,
from ../../../../ext/mri/libbel.c:1:
/home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby/st.h: At top level:
/home/tony/.rake-compiler/ruby/i386-mingw32/ruby-2.2.1-i386-mingw32/include/ruby-2.2.0/ruby/st.h:52:14: 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];
^
-----
Does anyone successfully cross compiled ruby 2.2.1 to MinGW using 64-bit linux? I'm using Ubuntu 14.04 64 bit.
Or maybe pointers on how to use the cross compiled RubyInstaller builds in rake-compiler?
Thanks! Great work!
Anthony Bargnesi