Issue #14213 has been reported by larskanis (Lars Kanis).

----------------------------------------
Bug #14213: cross build fails
https://bugs.ruby-lang.org/issues/14213

* Author: larskanis (Lars Kanis)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-12-20 trunk 61357) [i686-linux-gnu]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
For [rake-compiler-dock](https://github.com/rake-compiler/rake-compilder-dock) Ruby is built per cross compiler for Linux 32/64 and Windows 32/64. This fails for ruby-2.5.0-rc1.

~~~
$ ./configure --host=i686-linux-gnu --target=i686-linux-gnu --build=x86_64-pc-linux-gnu --enable-shared --enable-static --enable-install-static-library --disable-install-doc --with-ext= --prefix=/usr/local/rake-compiler/ruby/i686-linux-gnu/ruby-2.5.0-rc1
[...]
checking whether we are cross compiling... yes
[...]

$ make
[...]
generating enc.mk
/home/lars/comcard/ruby/rbconfig.rb:13:in `<module:RbConfig>': ruby lib version (2.5.0) doesn't match executable version (2.4.1) (RuntimeError)
        from /home/lars/comcard/ruby/rbconfig.rb:11:in `<top (required)>'
        from /home/lars/comcard/ruby/lib/mkmf.rb:6:in `require'
        from /home/lars/comcard/ruby/lib/mkmf.rb:6:in `<top (required)>'
        from ./enc/make_encmake.rb:8:in `load'
        from ./enc/make_encmake.rb:8:in `<main>'
uncommon.mk:752: die Regel fr Ziel enc.mk°» scheiterte
make: *** [enc.mk] Fehler 1
~~~

Cross build is broken since [this commit](https://github.com/ruby/ruby/commit/842a05d2f867624c9b35f3320942f2e16217c51d)

The same change was done in 2015 already [here](https://github.com/ruby/ruby/commit/95de0e6841262214f68c487d7ff317806eecb9e8), but was [reverted later](https://github.com/ruby/ruby/commit/62d8e6d1b12718b408e57b2b927c3b2931cad6d9).

For rake-compiler-dock I'm using a [patched version](https://github.com/rake-compiler/rake-compiler-dock/commit/937ddf98a807f27e5cdf79d6c65935d1303d1d25) currently.




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>