From murdoch.duncan at gmail.com  Mon Apr  4 15:28:22 2011
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Mon, 4 Apr 2011 09:28:22 -0400
Subject: [Rd] Rtools and MinGW
In-Reply-To: <inc6r9$qnl$1@dough.gmane.org>
References: <4D98CC34.5080802@gmail.com>	<alpine.LFD.2.02.1104041002020.32350@gannet.stats.ox.ac.uk>
	<inc6r9$qnl$1@dough.gmane.org>
Message-ID: <4D99C776.1050300@gmail.com>

On 04/04/2011 6:34 AM, Thomas Mang wrote:
> On 04.04.2011 11:04, Prof Brian Ripley wrote:
> >  On Sun, 3 Apr 2011, Thomas Mang wrote:
> >
> >>  Hi,
> >>
> >>  I have R version 2.8.1 and Rtools 28 installed (as you might guess,
> >>  set up years ago). In Rtools the MinGW GCC 4.2 compiler toolset is
> >>  included.
> >>
> >>  For my regular C/C++ programs I have also installed, separately, the
> >>  full MinGW bundle with the latest GCC 4.5 compiler tools. So I have
> >>  two g++ variants on the same machine.
> >>
> >>  According to the Rtools documentation, the bin directory of it shall
> >>  be in the system PATH, and very early in the PATH (first elements).
> >>  Presently the bin directory of the Rtools-MinGW is front.
> >>  Fine but Ok for my daily C++ work I actually prefer that the regular
> >>  (non-Rtools) MinGW compiler is invoked, hence I would prefer putting
> >>  that in front. But then, of course, invoking g++ from R development
> >>  would refer to the regular MinGW compiler toolset. When I do R
> >>  development, would you expect it to cause problems if actually the
> >>  regular MinGW (gcc 4.5) is invoked, and not the version that came
> >>  bundled with Rtools (4.2) ? Or is this something I should better stay
> >>  away from ?
> >>  If not likely to work, what would you suggest to do instead ?
> >
> >  Follow the posting guide and update your R before posting ....
> >
> >  We do not support ancient versions of R, and it is very likely that R
> >  2.8.1 does not work correctly with gcc 4.5.2: there are
> >  incompatibilities in the argument passing.
>
> OK I can update but in general I think it's unlikely that the MinGW
> version bundled with Rtools will ever be the same as the regular MinGW
> version (even if just by update cycle delays).
> Is there any other way to tell Rtools where to search for MinGW-bin
> except of setting the globally applicable PATH variable ? Some
> configuration file or so ?

Why not just keep two PATH variables, and put one in place before R 
builds, the other in place the rest of the time?

Duncan Murdoch



[Rd] Rtools and MinGW
Duncan Murdoch