Peter Langfelder
2018-Feb-13 18:58 UTC
[Rd] Setting the path to Rtools for package compilation on Windows
On Tue, Feb 13, 2018 at 2:20 AM, Jeroen Ooms <jeroenooms at gmail.com> wrote:> 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.Thanks, that indeed did the trick. May I suggest that this hint be also included in "REMAINING TASKS" section of the file Rtools.txt that is part of the Rtools distribution? The R installation manual does mention BINPREF and BINPREF64 but I missed that part... Peter
Jeroen Ooms
2018-Feb-14 12:32 UTC
[Rd] Setting the path to Rtools for package compilation on Windows
On Tue, Feb 13, 2018 at 7:58 PM, Peter Langfelder <peter.langfelder at gmail.com> wrote:> On Tue, Feb 13, 2018 at 2:20 AM, Jeroen Ooms <jeroenooms at gmail.com> wrote: > >> 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. > > Thanks, that indeed did the trick. May I suggest that this hint be > also included in "REMAINING TASKS" section of the file Rtools.txt that > is part of the Rtools distribution? The R installation manual does > mention BINPREF and BINPREF64 but I missed that part...Glad it worked. Actually BINPREF64 only exists when building R itself. For the R user there is no BINPREF64. There is only BINPREF which has to point to a 32bit gcc when R runs in 32bit, and a 64bit compiler when R runs in 64bit. But if you compile R packages you need both at the same time. Hence the "$(WIN)" variable in the BINPREF above. Yes the rtools setup is a bit convoluted, and we're currently discussing ways to improve this. Thanks for your suggestion.
Gabor Grothendieck
2018-Feb-15 00:12 UTC
[Rd] Setting the path to Rtools for package compilation on Windows
If there is work going on to improve Rtools 1. one of the most annoying aspects of it is that it does not play nice with builtin Windows commands. In particular, it defines a command called find which works like UNIX find but it masks Windows find if you add the Rtools folders to your PATH making it quite dangerous to do so. 2. Another annoyance is that what to put on the PATH can change from one Rtools version to another and it is not straight forward to discover that automatically. One can extract it from the unins000.dat (and I have done that) but it is not straight forward. 3. Ideally it would be nice if it were as easy to install Rtools as installing an R package. In fact, maybe Rtools could be an R package or maybe it could be part of the R installation process itself. On Wed, Feb 14, 2018 at 7:32 AM, Jeroen Ooms <jeroenooms at gmail.com> wrote:> On Tue, Feb 13, 2018 at 7:58 PM, Peter Langfelder > <peter.langfelder at gmail.com> wrote: >> On Tue, Feb 13, 2018 at 2:20 AM, Jeroen Ooms <jeroenooms at gmail.com> wrote: >> >>> 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. >> >> Thanks, that indeed did the trick. May I suggest that this hint be >> also included in "REMAINING TASKS" section of the file Rtools.txt that >> is part of the Rtools distribution? The R installation manual does >> mention BINPREF and BINPREF64 but I missed that part... > > Glad it worked. Actually BINPREF64 only exists when building R itself. > For the R user there is no BINPREF64. There is only BINPREF which has > to point to a 32bit gcc when R runs in 32bit, and a 64bit compiler > when R runs in 64bit. But if you compile R packages you need both at > the same time. Hence the "$(WIN)" variable in the BINPREF above. > > Yes the rtools setup is a bit convoluted, and we're currently > discussing ways to improve this. Thanks for your suggestion. > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel-- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
Maybe Matching Threads
- Setting the path to Rtools for package compilation on Windows
- Setting the path to Rtools for package compilation on Windows
- Setting the path to Rtools for package compilation on Windows
- Notes on building a gcc toolchain for Rtools (but not multilib)
- R Compilation gets stuck on Windows 64