On Wed, Jul 19, 2006 at 12:22:16AM +0900, Curt Hibbs wrote:
> The One-Click Ruby Installer for Windows is at a cross-roads. The C++
> compiler situation on Windows has become a complete mess because of subtle
> incompatibilities and has, consequently, become a big headache for me and
> extension writers.
>
> I need to decide whether future versions of the One-Click Installer are
> built with MinGW or MS VC2005 Express (both compilers are free). My bias has
> been to go with VC2005 on the theory that the MS compiler will always be the
> most compatible with Windows, itself.

Given that the current situation can be to a large extent attributed to the
perverted mind of somebody at Microsoft who has consistently decided to break
binary compatibility in (nearly all?) new releases of their compilers, doesn't
the burden of proof fall on VC2005? It seems to me that very heavy evidence
would be needed to justify that choice, since it appears very likely to lead to
problems like those we're experiencing now, if any conclusion is to be drawn
from recent history.

So far, we've seen the following arguments for MS VC2005 and MinGW,
respectively:
(1) VC 2005 should be more compatible with Windows
(2) MinGW (plus MSYS) provides an adequate environment to compile the 
    third-party libraries against which you want to link your Ruby extension.

While (1) is likely, we can't know the extent of any future incompatibilities,
and it is indeed possible that the people behind MinGW keep them under
control. To my eyes, (1) is easily counter-balanced by the almost certain
incompatibilities "with themselves" MS' compilers seem bound to suffer from,
given their track record. How long will VC 2005 live before it's removed from
MS' sites?

However, the argument deserves careful consideration, so I'd ask for reports
of _current_ problems caused by MinGW.  In other words, I'd like to see actual
reasons why MinGW would *not* be a good choice right now: specific problems
that can only be solved by switching to MS' compiler of the day.

Here are a few other minor arguments for MinGW:
* availability: MinGW will not disappear the way VC6 did
* redistribution: is it allowed to redistribute VC 2005 at all? And to bundle
  it with other software? A "Ruby devel. kit" (in a similar spirit as Instant
  Rails) including MSYS+MinGW is at least conceivable -- would it be legally
  possible with VC?
* cross-compilation: one thing I like about MinGW is that it can be used to 
  cross-compile extensions under non-win32 platforms. It allows me to provide
  win32 binaries for my extensions without having to use win32 myself. A few
  other people might also appreciate that. It could also simplify the creation
  of a build farm as proposed by Francis Cianfrocca.

There's another probably more important reason to go MinGW: it offers an
easier migration path, as existing extensions compiled with VC6/MinGW (which
might well be the majority, since recent OCI distros used the mswin32 build,
and the installer was built with VC6 historically, IIRC) would probably still
work. However, I must admit I'm speculating since some people have claimed
that MinGW-compiled extensions were not always compatible with VC6 Ruby
builds, although the reports were often vague. And I certainly don't remember
nobu saying that MinGW is incompatible, but rather the opposite.
Now, I don't know if that "99% compatibility" is commutative or not, either,
but I'd like to believe it is. 

Again, I feel we'd have to be shown specific cases where MinGW was not good
enough -- there's already ample evidence showing that it does, more often than
not, work just fine. And at any rate, it's still most probably better, as far
as backwards compatibility goes, than VC 2005, which uses a different runtime.

-- 
Mauricio Fernandez  -   http://eigenclass.org   -  singular Ruby