Backport #2531
closedRuby 1.8.7-p248 fails to cross-compile same version
Description
=begin
Hello,
I was informed before in #2485 (backport) that same version and patchlevel is required to perform a cross-compilation targeting MinGW.
Using latest 1.8.7 as base, tried to cross-compile same patchlevel version, but it failed due missing ruby.h file:
compiling dl
make[1]: Entering directory `/home/luis/.rake-compiler/builds/ruby-1.8.7-p248/ext/dl'
Generating callback.func
mkmf.rb can't find header files for ruby at /home/luis/.rvm/ruby-1.8.7-p248/lib/ruby/ruby.h
make[1]: *** [callback.func] Error 1
make[1]: Leaving directory `/home/luis/.rake-compiler/builds/ruby-1.8.7-p248/ext/dl'
make: *** [all] Error 1
From what I see, seems mkmf is expecting the headers files in the wrong directory, as it needs to append the version (1.8) and the platform (i686-linux) to properly find them.
Find attached the config.status, config.log and rbconfig.rb generated.
My interest in the success of the cross compilation process is associated with rake-compiler project to allow Linux/OSX developers build and ship functional gems and projects for Windows users.
Thank you.
=end
Files
Updated by luislavena (Luis Lavena) almost 15 years ago
=begin
A small correction that I just noticed.
Shouldn't the extension compilation process (mkmf) use the generated headers for the cross target instead of the system ones?
=end
Updated by luislavena (Luis Lavena) almost 15 years ago
=begin
Additional information.
1.8.7-p249 fails when compiling DL
Please find attached the mkmf.log and the generated Makefile of DL extconf.
=end
Updated by nobu (Nobuyoshi Nakada) almost 15 years ago
- Status changed from Open to Assigned
- Assignee set to shyouhei (Shyouhei Urabe)
=begin
r26205
=end
Updated by shyouhei (Shyouhei Urabe) over 14 years ago
- Assignee changed from shyouhei (Shyouhei Urabe) to nobu (Nobuyoshi Nakada)
=begin
Can't merge that rev's too big. Can you elaborate nobu? Please break down a bit.
=end
Updated by luislavena (Luis Lavena) over 14 years ago
=begin
1.8.7-p299 still fails to cross-compile:
compiling dl
make[1]: Entering directory /home/luis/.rake-compiler/builds/ruby-1.8.7-p299/ext/dl' Generating callback.func mkmf.rb can't find header files for ruby at /home/luis/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/ruby.h make[1]: *** [callback.func] Error 1 make[1]: Leaving directory
/home/luis/.rake-compiler/builds/ruby-1.8.7-p299/ext/dl'
make: *** [all] Error 1
Without 1.8.7, developers releasing gems for Windows users using Linux or OSX are stuck at 1.8.6
I've collected a list of versions and patchlevels that works (or not) here:
Still I cannot include 1.8.7 in it and cannot encourage Windows users to use 1.8.7 since most of the gems are cross compiled against 1.8.6.
I'm aware that 1.8.6 and 1.8.7 are binary and API compatible, but sometimes reality differs from theory.
Thank you.
=end
Updated by luislavena (Luis Lavena) over 14 years ago
- File 0002-Fix-2531-by-backporting-changes-to-fake.rb-required-.patch 0002-Fix-2531-by-backporting-changes-to-fake.rb-required-.patch added
=begin
Hello,
Since r26205 is too big to backport, I decided to recreate fake.rb using the template/fake.rb.in found in trunk. Find attached the proposed patch.
This change indeed solved the dl cross-compilation issue I was having.
Please consider it for inclusion.
Thank you.
=end
Updated by luislavena (Luis Lavena) over 14 years ago
- File 0004-Remove-RUBY_DESCRIPTION-from-fake.rb.in-is-not-expos.patch 0004-Remove-RUBY_DESCRIPTION-from-fake.rb.in-is-not-expos.patch added
=begin
Hello,
Find attached a second patch that corrects the undefined RUBY_DESCRIPTION and the RUBY_VERSION definition using MAJOR MINOR and TEENY.
It was an overlook from my part. Apologies.
Please let me know if prefer a unified patch of both changes.
Thank you,
=end
Updated by drbrain (Eric Hodel) over 14 years ago
- Status changed from Assigned to Closed
=begin
=end
Updated by naruse (Yui NARUSE) over 14 years ago
- Status changed from Closed to Assigned
- Assignee changed from nobu (Nobuyoshi Nakada) to shyouhei (Shyouhei Urabe)
=begin
=end
Updated by shyouhei (Shyouhei Urabe) about 14 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r29866.
Luis, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end