Skip to content

Windows MinGW compiler clarification, consequences

2 messages · Martin Morgan, Brian Ripley

#
The information at

http://cran.r-project.org/doc/manuals/R-admin.html#The-MinGW-compilers

and

http://www.murdoch-sutherland.com/Rtools/

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. 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.

My questions are:

1) which compiler is actually used for creating windows binary
   packages available on cran?

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

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

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


R version: 2.3.0 (2006-04-24)
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
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Thanks for any guidance,

Martin Morgan
Bioconductor
#
On Tue, 25 Apr 2006, Martin Morgan wrote:

            
The R 2.3.0 manual is current.
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.
There is a change entry above that that says 3.4.4 was used for 2.2.1.
3.4.5, I believe, and that's what I use.
To g77 only for 3.4.2, to ld yes.
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.
This looks like the 3.4.2 Fortran bug.
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.