Re: [Rd] Windows MinGW compiler clarification, consequences

From: Prof Brian Ripley <>
Date: Wed 26 Apr 2006 - 00:07:49 GMT

On Tue, 25 Apr 2006, Martin Morgan wrote:

> The information at

The R 2.3.0 manual is current.

> and
> is slightly inconsistent about the compiler used to build Windows
> binary packages available through cran.
> The 'candidate' package of the recommended MinGW-5.0.0.exe installs
> g++/g77 3.4.4 (as does the updated installer MinGW-5.0.2.exe). "An
> alternative..." described on the cran page lists g++/g77 3.4.5.

Please just use 3.4.5: MinGW keep on making errors in their beta installers ... so it is hard to keep up (I believe 5.0.1 installed 3.4.5). 3.4.4 does not even appear on the download lists.

> The murdoch-sutherland site says "The release version of gcc-3.4.2
> included in MinGW-3.2.0-rc-3 is used by the core developers" and
> mentions that patches to g77 and to ld are used.

There is a change entry above that that says 3.4.4 was used for 2.2.1.

> My questions are:
> 1) which compiler is actually used for creating windows binary
> packages available on cran?

3.4.5, I believe, and that's what I use.

> 2) Are the patches to g77 and ld still relevant?

To g77 only for 3.4.2, to ld yes.

> 3) what issues are we likely to encounter -- code incompatibility, ???
> -- changing from 3.4.2 to the current compiler tools?

You should not use unpatched 3.4.2 for Fortran. And without the ld patch, the internal DLL name is likely to lose its extension and so not work when linked to on some versions of Windows.

> As a more specific example, a particular Bioconductor package depends
> on the cran package odesolve; odesolve has Fortan source
> files. Example R code in the Bioconductor package evaluates without
> issues when the .zip file from cran is used, but generates warnings
> (originating from the Fortran code of odesolve) when compiled locally:
> Warning: intdy-- t (=r1) illegal
> Warning: t not in interval tcur - hu (= r1) to tcur (=r2)
> Warning: intdy-- t (=r1) illegal
> Warning: t not in interval tcur - hu (= r1) to tcur (=r2)
> Warning: lsoda-- trouble from intdy. itask = i1, tout = r1
> Error in lsoda(y = y0, times = times, fderiv, parms = c(mod = mod), rtol = 1e-04, :
> Illegal input to lsoda

This looks like the 3.4.2 Fortran bug.

> R version: 2.3.0 (2006-04-24)
>> gcc --version
> gcc (GCC) 3.4.2 (mingw-special)
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> Thanks for any guidance,

I generally find that using the latest MinGW candidates is the best policy, but it is frustrating that they never seem to release anything these days.

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
Received on Wed Apr 26 10:11:08 2006

This archive was generated by hypermail 2.1.8 : Wed 26 Apr 2006 - 08:17:49 GMT