Bug #2464
closedcross-compile Ruby patchlevel 376 fails
Description
=begin
Hello,
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 `rm_f'
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 `each'
from /Users/luis/.rake-compiler/sources/ruby-1.9.1-p376/ext/extmk.rb:436
make: *** [mkmain.sh] Error 1
Thank you.
=end
Files
Updated by naruse (Yui NARUSE) almost 15 years ago
- Status changed from Open to Rejected
=begin
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.
=end
Updated by luislavena (Luis Lavena) almost 15 years ago
=begin
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.
=end
Updated by naruse (Yui NARUSE) almost 15 years ago
=begin
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 http://redmine.ruby-lang.org/wiki/ruby/DeveloperHowto
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.
=end
Updated by naruse (Yui NARUSE) almost 15 years ago
=begin
Isn't this something of a chicken and egg syndrome? just wondering :)
On native building, BASERUBY is only used for generating insns.inc 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.
=end
Updated by rogerdpack (Roger Pack) almost 15 years ago
=begin
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.
=end