From jeroenooms at gmail.com  Tue Feb 13 11:20:58 2018
From: jeroenooms at gmail.com (Jeroen Ooms)
Date: Tue, 13 Feb 2018 11:20:58 +0100
Subject: [Rd] 
 Setting the path to Rtools for package compilation on Windows
In-Reply-To: <CA+hbrhVN1ngZiyVH2q2Z+rOMeLhGZ88eQu4c04unkVDo7zkugw@mail.gmail.com>
References: <CA+hbrhVN1ngZiyVH2q2Z+rOMeLhGZ88eQu4c04unkVDo7zkugw@mail.gmail.com>
Message-ID: <CABFfbXv17xKpr84ifZfbuga9xdQ1rPG5BVBQmjRFk3JcBifYUA@mail.gmail.com>

On Tue, Feb 13, 2018 at 7:45 AM, Peter Langfelder
<peter.langfelder at gmail.com> wrote:
> Hi all,
>
> I'm trying to set up the Windows Rtools toolset for building packages
> with compiled code. I installed for Windows R-3.4.3 from CRAN and
> installed Rtools-3.4 in a custom location M:\R\R-3.4.3 and
> M:\R\Rtools-3.4
>
> Following the instructions, in shell, I set
> Path=M:\R\Rtools-3.4\bin;M:\R\Rtools-3.4\gcc-4.6.3\bin;M:\R\R-3.4.3\bin;...
> (the ... are other paths irrelevant for R/Rtools).

Thanks for your question. Your logs show that 'gcc' is not found. As
of R 3.3 you need to set the path to the compiler using the BINPREF
variable. This is because we ship two separate versions of gcc, one
targeting win32 and one targeting win64. I am not sure what your
rtools installation looks like, but could you try setting this
environment variable:

  BINPREF="M:/R/Rtools-3.4/mingw_$(WIN)/bin/"

I think this will do the job.

On Tue, Feb 13, 2018 at 10:21 AM, Tomas Kalibera
<tomas.kalibera at gmail.com> wrote:
> Thanks for the report - this has been already reported as bug 17376, it is
> caused by scripts that build the Windows binaries and by now has been fixed
> in R-patched and R-devel snapshot builds. So as a solution that works now I
> would recommend using R-patched.

This issue is unrelated, I doubt your advice will solve anything. The
only thing that 17376 does is add c:/rtools/bin to the default path.
But this dir does not exist for this user, so it is ignored by windows
when searching the PATH.



[Rd] Setting the path to Rtools for package compilation on Windows
Jeroen Ooms