Posted on Dec 16, 2009

rake-compiler: safe list of Ruby versions that can be cross-compiled

Seems that I’m going to suffer a series of bug reports in the upcoming weeks due continious changes between patchlevels of Ruby.

To give some background, for the fresh ones just arriving to the blog. rake-compiler provides, besides C/Java extension standardization structure, the ability to cross-compile versions of Ruby to allow developers on Linux/OSX build and release gems for users running Windows.

Seems that latest patchlevels of Ruby 1.8.7 (172) and 1.9.1 (376) cannot be cross compiled.

I’ve reported that to Ruby’s bug tracker under issues #2464 and #2484

From what you can read there, there is a clear change in the rules about what is the minimum Ruby version that can be used to cross compile (known as BASERUBY)

Now, being pointed to the Developer’s Howto page, and checking the history and time, it is clear the note about the limitation is really fresh

The funny thing is that I still can cross compile 1.9.2dev using 1.8.6! Which is contrary to what the recently edited howto states!

Don’t get me wrong, I have no personal issue besides being annoyed, and that will require put some lock in cross-ruby compilation to avoid bug reports about something that is beyond my control.

So, with the goal of making this public and have a link to include in my canned response to people reporting bugs about it, the following is the list of versions and patchlevels of Ruby that I know works and aim to support in relation to bug fixes of rake-compiler itself:

Version Patchlevel supported? Command
1.8.6 287 Yes rake-compiler cross-ruby
1.8.6 383 Yes rake-compiler cross-ruby VERSION=1.8.6-p383
1.8.6 398 Yes rake-compiler cross-ruby VERSION=1.8.6-p398
1.8.7 72 NO
1.8.7 173 NO
1.8.7 249 NO
1.8.7 299 NO
1.9.1 243 Yes rake-compiler cross-ruby VERSION=1.9.1-p243
1.9.1 376 NO
1.9.1 378 NO
1.9.2 trunk Yes (that is true up to revision 26108)

Tricky list, even switching the version of Ruby to match the one desired to be installed, it doesn’t work (reported as #2485, I’m very persistent).

So, apologies to anyone having issues with this: I’m having the same ones here.

Update: Added 1.8.7-p299 to the list of no compatible

Update 2: Added 1.8.6-p398 to the list of compatibles and 1.8.7 still is not cross-compilable, sorry. 1.9.1-p378 is not cross-compilable either.