Project

General

Profile

Actions

Backport #3666

closed

Backport of r26311 (Bug #2587)

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


Description

=begin
Hello,

Working on getting Ruby 1.8.7, using branch ruby_1_8_7 at revision 28669 is not possible to cross-compile it.

Configure process completes perfectly, but compilation fails:

$ make
rbconfig.rb updated
i686-w64-mingw32-windres --include-dir . --include-dir . --include-dir ../win32 msvcrt-ruby18.rc msvcrt-ruby18.res.o
i686-w64-mingw32-gcc -g -O2 -DRUBY_EXPORT -I. -I.. -c ../array.c
In file included from ../defines.h:186:0,
from ../ruby.h:37,
from ../array.c:15:
../win32/win32.h:154:8: error: redefinition of ‘struct timezone’
/home/luis/mingw/w32/bin/../lib/gcc/i686-w64-mingw32/4.5.2/../../../../i686-w64-mingw32/include/time.h:260:8: note: originally defined here
make: *** [array.o] Error 1

compiler used: i686-w64-mingw32 (32bits mingw-w64 project) OS: Ubuntu.
i686-w64-mingw32-gcc (GCC) 4.5.2 20100802 (prerelease)

There should be a backport of the changes reported in bug #2587.

Cross-compilation of Ruby using MinGW is important for OSX/Linux developers to provide native gems for Windows.

Thank you.
=end


Files


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #2587: Forced definition of struct timezone under MinGWClosed01/10/2010Actions
Actions #1

Updated by shyouhei (Shyouhei Urabe) over 14 years ago

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

=begin
I'll take care of it.
=end

Actions #2

Updated by luislavena (Luis Lavena) about 14 years ago

=begin
Hello Mr. Urabe, any progress on this backport?

I'm working now in updating all cross compilation options for rake-compiler, and 1.8.7 remains the red indicator so far:


 [ruby-1.8.7-p302] luis@seyori:~/projects/oss/ruby/xbuild187$ makei686-w64-mingw32-gcc -g -O2     -DRUBY_EXPORT  -I. -I..    -c ../array.c
 In file included from ../defines.h:186:0,
                  from ../ruby.h:37,
                  from ../array.c:15:
 ../win32/win32.h:154:8: error: redefinition of ‘struct timezone’
 /Users/luis/mingw/w32/bin/../lib/gcc/i686-w64-mingw32/4.6.0/../../../../i686-w64-mingw32/include/time.h:260:8: note: originally defined here
 make: *** [array.o] Error 1
 

This is still true at revision 29006.

Thank you.
=end

Actions #3

Updated by luislavena (Luis Lavena) about 14 years ago

=begin
Hello,

Find attached a patch with the direct backport of r26311 into ruby_1_8_7 branch.

Thank you.

=end

Actions #4

Updated by nobu (Nobuyoshi Nakada) about 14 years ago

  • Status changed from Assigned to Rejected

=begin
1.8 doesn't support win64.
=end

Actions #5

Updated by luislavena (Luis Lavena) about 14 years ago

=begin
Mr. Makada,

Don't confuse 'w64' with 64bits. GNU triplets are architecture-vendor-os where i686 (x86) is the architecture that represents w64 (mingw-w64) project.

i386-mingw32 and i586-pc-mingw32 are the identificators of mingw32 packages for OSX and Debian respectively.

i686-w64-mingw32 identifies mingw-w64 platform and packages for 32bits while x86_64-w64-mingw32 identifies 64bits compiler target.

Also, the patch is about an already defined structure, which was never backported to 1.8 branches and is blocking Ruby 1.8 to be cross compiled for 32bits.

Please reevaluate this rejection.

Thank you.

=end

Actions #6

Updated by nobu (Nobuyoshi Nakada) about 14 years ago

  • Status changed from Rejected to Assigned

=begin
I'm getting confused more.
Anyway, reopened.
=end

Actions #7

Updated by luislavena (Luis Lavena) about 14 years ago

=begin
Apologies for the confusion, but more clarification here:

http://sourceforge.net/apps/trac/mingw-w64/wiki/MSYS

mingw-w64, a fork/variation of original mingw project provides toolchains that target both 32 and 64bits.

i686-w64-mingw32 is the platform identifier for 32bits GCC of mingw-w64 project.

The patch supplied here is required since mingw-w64 headers are more accurate/up-to-date than mingw ones.

This was fixed in trunk and ruby_1_9_2 branch but never reached any of ruby_1_8_x branches.

I'm switching rake-compiler cross-compilation process to prioritize this compiler instead of GCC 3.4.5 to be in sync with native builds of RubyInstaller (GCC 4.5.0 based).

Hope this clarifies a little bit the purpose and the platform. Again, w64 is not 64bits but is the vendor identifier of mingw-w64 project in the GNU platform triplet.

Thank you.
=end

Actions #8

Updated by luislavena (Luis Lavena) about 14 years ago

=begin
Hello,

Mr. Nobuyoshi Nakada and Shyouhei Urabe,

Can you check the patch contents and see if they could be applied. Again, this is not a 64bits patch, is just an update definition of MinGW headers manually backported from r26311

Thank you.
=end

Actions #9

Updated by shyouhei (Shyouhei Urabe) about 14 years ago

=begin
I now feel I should apply this.
=end

Actions #10

Updated by nazy (Hiroki Najima) about 14 years ago

=begin
Hello,

I'm also perplexed with this problem.
http://github.com/nazy/ruby-ldap/wiki/How-to-compile-ruby-ldap-on-Windows.

I hope you'll accept this patch.

Regards,
=end

Actions #11

Updated by luislavena (Luis Lavena) about 14 years ago

=begin
Hello Hiroki,

After reading that post, it is clear something has not been correctly communicated to the developers:

  1. Ruby 1.9.2-p0 has been compiled with GCC 4.5.0 and needs GCC 4.5.0, from their instructions it is clear they are using the old DevKit (this affects ruby.h, rbconfig.rb and win32.h listed as patches

  2. It is clear the dependency on MSVC tools (lib.exe) by extconf even when lib is not available by GCC.

I believe a better patch needs to be provided to these developers that solves their specific build problems.
=end

Actions #12

Updated by shyouhei (Shyouhei Urabe) almost 14 years ago

  • Status changed from Assigned to Closed

=begin
fixed at r29853.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0