Project

General

Profile

Actions

Backport #2531

closed

Ruby 1.8.7-p248 fails to cross-compile same version

Added by luislavena (Luis Lavena) almost 15 years ago. Updated over 13 years ago.


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

config.log (394 KB) config.log luislavena (Luis Lavena), 12/26/2009 03:54 AM
config.status (25.4 KB) config.status luislavena (Luis Lavena), 12/26/2009 03:54 AM
rbconfig.rb (6.7 KB) rbconfig.rb luislavena (Luis Lavena), 12/26/2009 03:54 AM
Makefile (6.45 KB) Makefile luislavena (Luis Lavena), 01/15/2010 08:12 AM
mkmf.log (4.99 KB) mkmf.log luislavena (Luis Lavena), 01/15/2010 08:12 AM
0002-Fix-2531-by-backporting-changes-to-fake.rb-required-.patch (2.97 KB) 0002-Fix-2531-by-backporting-changes-to-fake.rb-required-.patch luislavena (Luis Lavena), 09/13/2010 05:43 AM
0004-Remove-RUBY_DESCRIPTION-from-fake.rb.in-is-not-expos.patch (935 Bytes) 0004-Remove-RUBY_DESCRIPTION-from-fake.rb.in-is-not-expos.patch luislavena (Luis Lavena), 09/13/2010 06:58 AM

Related issues 3 (0 open3 closed)

Has duplicate Backport187 - Bug #2765: unable to cross compile 1.8.7p249Closed02/20/2010Actions
Has duplicate Backport187 - Bug #3218: Cannot cross-compile Ruby 1.8.7 (svn) using Ruby 1.8.7Closed04/29/2010Actions
Is duplicate of Ruby 1.8 - Bug #4094: cross-compilation from Linux to Windows fails DL compilationClosed11/28/2010Actions
Actions #1

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

Actions #3

Updated by nobu (Nobuyoshi Nakada) almost 15 years ago

  • Status changed from Open to Assigned
  • Assignee set to shyouhei (Shyouhei Urabe)

=begin
r26205
=end

Actions #4

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

Actions #5

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:

http://blog.mmediasys.com/2009/12/16/rake-compiler-safe-list-of-ruby-versions-that-can-be-cross-compiled/

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

Actions #6

Updated by luislavena (Luis Lavena) about 14 years ago

=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

Actions #7

Updated by luislavena (Luis Lavena) about 14 years ago

=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

Actions #8

Updated by drbrain (Eric Hodel) about 14 years ago

  • Status changed from Assigned to Closed

=begin

=end

Actions #9

Updated by naruse (Yui NARUSE) about 14 years ago

  • Status changed from Closed to Assigned
  • Assignee changed from nobu (Nobuyoshi Nakada) to shyouhei (Shyouhei Urabe)

=begin

=end

Actions #10

Updated by shyouhei (Shyouhei Urabe) almost 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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0