Issue #7921 has been updated by luislavena (Luis Lavena).


ko1 (Koichi Sasada) wrote:
> 2.0.0 was released.

Thank you Koichi for letting me now that 2.0.0-p0 is out and that will break gem compilers expectations.

2.0.0 introduces a new ABI version (2.0.0) that differs from 1.9.3 (1.9.1), this means that Windows users will not be able to install existing pre-compiled binaries.

These Windows users will now depend on OSX/Linux gem authors and other developers to compile those binary gems for them.

Problem is the current cross-compiler they have installed and worked great for 1.8.7, 1.9.2 and 1.9.3 is now useless, since 2.0.0 cannot be compiled with it.

They will need a new cross-compiler that most likely is going to require them recompile all the existing versions of Ruby they target for their gems.

So, by saying "newer mingw64 package is desired", you just broke the developers environment and force them solve that in order to provide a solution to a platform they don't care.

The work done with rake-compiler made it easy for those developers provide those gems; now with broken 2.0.0 they might simply decide is too much work to keep doing it (lot of developers don't care about Windows at all)

I offered myself to be mingw/mingw-w64 platform maintainer, but was unable to commit the changes yesterday since I was away of my development machine.

Explained the reasoning on why this workaround was required and it got simply ignored. It would have only taken 2 minutes to commit and we could have discussed better solutions for next patchlevel.

Now, gem authors will have to wait for next patchlevel (whenever it comes) to actually provide binaries.

Isn't my opinion worth it? The outcome of not committing that single workaround line will have a huge ramification, which now I will have to deal with.

----------------------------------------
Bug #7921: Cross-compiling ruby_2_0_0 to Windows is failing (rb_w32_pow)
https://bugs.ruby-lang.org/issues/7921#change-36918

Author: luislavena (Luis Lavena)
Status: Assigned
Priority: Urgent
Assignee: nobu (Nobuyoshi Nakada)
Category: build
Target version: 2.1.0
ruby -v: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]


=begin
Hello,

Cross-compilation of Ruby targeting Windows (using MinGW) is an important tool for Linux/OSX developers to provide pre-compiled binary gems for Windows users. Having cross-compilation failing for Ruby 2.0 will complicate the installation of gems for the new version, as developers will not be able to provide these binaries for suers.

The error that is being triggered is coming from undefined elements:

 compiling ../dln.c
 In file included from ../include/ruby/defines.h:153:0,
                  from ../include/ruby/ruby.h:70,
                  from ../dln.c:13:
 ../include/ruby/win32.h: In function ???rb_w32_pow???:
 ../include/ruby/win32.h:787:5: error: implicit declaration of function ???_controlfp???
 ../include/ruby/win32.h:788:16: error: ???_PC_64??? undeclared (first use in this function)
 ../include/ruby/win32.h:788:16: note: each undeclared identifier is reported only once for each function it appears in
 ../include/ruby/win32.h:788:24: error: ???_MCW_PC??? undeclared (first use in this function)
 make: *** [dln.o] Error 1

This is easily fixed by including MinGW private header _mingw_float.h:

 diff --git a/include/ruby/win32.h b/include/ruby/win32.h
 index a2eec0c..494b522 100644
 --- a/include/ruby/win32.h
 +++ b/include/ruby/win32.h
 @@ -776,6 +776,7 @@ rb_w32_pow(double x, double y)
      return powl(x, y);
  }
  #elif defined(__MINGW64_VERSION_MAJOR)
 +#include <_mingw_float.h>
  /*
   * Set floating point precision for pow() of mingw-w64 x86.
   * With default precision the result is not proper on WinXP.

I want to test this further with other cross-compiler and native compiler combinations before commit, but wanted to open this up before official 2.0 release.

Thank you.
=end



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