Bug #2464

cross-compile Ruby patchlevel 376 fails

Added by luislavena (Luis Lavena) about 10 years ago. Updated almost 9 years ago.

ruby -v:
ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]



While cross compiling (platform OSX, target mingw32) latest release, it failed in several places.

Attached is the complete log file of the build process, automated by rake-compiler gem (gem install rake-compiler; rake-compiler cross-ruby VERSION=1.9.1-p376)

The one that triggers the failure is the following:

compiling bigdecimal
/Users/luis/.rake-compiler/sources/ruby-1.9.1-p376/lib/mkmf.rb:195:in flatten': wrong number of arguments (1 for 0) (ArgumentError)
from /Users/luis/.rake-compiler/sources/ruby-1.9.1-p376/lib/mkmf.rb:195:in
from /Users/luis/.rake-compiler/sources/ruby-1.9.1-p376/ext/extmk.rb:161:in extmake'
from /Users/luis/.rake-compiler/sources/ruby-1.9.1-p376/ext/extmk.rb:440
from /Users/luis/.rake-compiler/sources/ruby-1.9.1-p376/ext/extmk.rb:436:in
from /Users/luis/.rake-compiler/sources/ruby-1.9.1-p376/ext/extmk.rb:436
make: *** [] Error 1

Thank you.


cross-ruby-1.9.1-p376.log (55.8 KB) cross-ruby-1.9.1-p376.log cross compilation build failures luislavena (Luis Lavena), 12/09/2009 12:38 AM

Updated by naruse (Yui NARUSE) about 10 years ago

  • Status changed from Open to Rejected

You seem to use Ruby 1.8.6 for bulding Ruby 1.9.1.
But Ruby 1.9's lib/mkmf.rb can't run with Ruby 1.8.6.


Updated by luislavena (Luis Lavena) about 10 years ago

Yui, thank you for your answer, but I have to disagree.

Prior patchlevels of 1.9.1 (243) were compilable with 1.8.6

Even 1.9.2 can be cross-compiled with Ruby 1.8.6.

There is also no mention of that requirement in the docs or by configure that generates a failure due lower version of baseruby.

I consider the rejection of this issue incorrect.

If you still think you're correct, please update the documentation to indicate such requirement or a proper validation in the configure process.

Thank you.


Updated by naruse (Yui NARUSE) about 10 years ago

Your point is true when and only when you build a native ruby.
Cross compiling needs the same version of the target ruby.

I add following document to
Note that on cross compiling BASERUBY should be the same version of the building ruby.
Even if BASERUBY is the same version but can't build because of platform dependency, it is a bug and please report it.


Updated by naruse (Yui NARUSE) about 10 years ago


Isn't this something of a chicken and egg syndrome? just wondering :)

On native building, BASERUBY is only used for generating and id.h and some core files.
For other libraries, miniruby is used.
Note that these files are bundled in a tarball.

But on cross compiling, target's miniruby cannot run.
So BASERUBY is also used for building libraries.


Updated by rogerdpack (Roger Pack) almost 10 years ago

For followers, the way around this is to set it so that a version of ruby-1.9.1 is the first "ruby" in the path.

Also available in: Atom PDF