From murdoch at stats.uwo.ca  Wed Aug 15 16:53:11 2007
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Wed, 15 Aug 2007 10:53:11 -0400
Subject: [Rd] Change of compiler for Windows build of R
In-Reply-To: <Pine.LNX.4.64.0708140719200.31255@gannet.stats.ox.ac.uk>
References: <Pine.LNX.4.64.0708140719200.31255@gannet.stats.ox.ac.uk>
Message-ID: <46C31357.5010209@stats.uwo.ca>

On 8/14/2007 2:52 AM, Prof Brian Ripley wrote:
> The MinGW people have finally released a couple of builds of gcc 4.2.1 
> (and finally moved the build of 3.4.5 to release status after 19 months as 
> 'candidate').
> 
> We intend to use gcc 4.2.1 for the binary distribution of R 2.6.0, and 
> builds of R-devel are being made with it from now on.  The R-admin manual 
> now contains details of the pieces you need, and in due course there will 
> be an updated Rtools.exe containing this version.  I've successfully built 
> cross-compilers although am unlikely to distribute one for a while.

Rtools.exe has now been updated on www.murdoch-sutherland.com/Rtools. 
Please let me know of any problems.

It currently includes both gcc 4.2.1 and 3.4.5; I expect to drop 3.4.5 
sometime after the release of R 2.6.0.  It also includes Vanilla Perl, 
so finally Rtools.exe is all you need to build packages on Windows. 
(You probably want to get the Microsoft help compiler and some LaTeX, 
but these are not strictly necessary.)

Duncan Murdoch

> 
> gcc 4.2.1 is a better check of standards conformance, and you may see 
> warnings in packages not present with gcc 3.4.5.  All the CRAN packages 
> have been checked, and this showed up some issues with packages which 
> deviated markedly from the documented procedures. E.g.
> 
> - the C++ compiler is $(CXX), not g++, and $(CXX) is defined in MkRules.
> 
> - there is a quirk with dlltool both on Vista and with gcc 4.2.1 on XP
>    that needs '--as' included amongst the flags.  The rule in MkRules
>    works: several user-written rules do not.
> 
> So far we have seen no issues with mixing code compiled with gcc 3.4.5 and 
> 4.2.1.  There would almost certainly be issues with third-party C++ 
> libraries, and might be some with Fortran libraries that use complex 
> numbers.
> 
> The advantages of using this port include:
> 
> - Vista compatibility out of the box.
> 
> - ongoing support.  The main MinGW developer is really targetting gcc
>    4.3.0, and these compilers are interim releases with patches backported
>    from the gcc trunk.
> 
> - More complete C99 features: for example C99 inlining will be supported
>    in gcc 4.3.0 (and has already been tested using snapshots).
> 
> - integrated F9x support.  F9x is supported 'out of the box', and can now
>    consider using F9x code in R.
> 
> - OMP and threading support.
> 
> 
> R 2.5.1 will not build out of the box with these compilers, but R-patched 
> will (for suitable settings in MkRules).
>



[Rd] Change of compiler for Windows build of R
Duncan Murdoch