Bug #2464
cross-compile Ruby patchlevel 376 fails
| Status: | Rejected | Start date: | 12/09/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | build | |||
| Target version: | - | |||
| ruby -v: | ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0] |
Description
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: <pre><code> 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 </code></pre> Thank you.
History
Updated by naruse (Yui NARUSE) over 2 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) over 2 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) over 2 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 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.
Updated by naruse (Yui NARUSE) over 2 years ago
> 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.
Updated by rogerdpack (Roger Pack) over 2 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.