R CMD check not looking for gcc in Rtools directory

前端 未结 1 1788
天命终不由人
天命终不由人 2020-12-12 04:57

R has been installing packages just fine, but suddenly – I can\'t think of anything relevant that I modified or uninstalled – it can\'t find gcc when I run R CMD chec

相关标签:
1条回答
  • 2020-12-12 05:48

    R uses a BINPREF variable to locate executables: the location of the gcc executable is given by CC = $(BINPREF)gcc $(M_ARCH)

    In my case, BINPREF was being set by C:/Users/MYUSERNAME/Documents/.R/Makevars. Deleting the contents of this file removed the incorrect location.

    It is also worth checking the file $RPATH/etc/i386/Makeconf, which will be re-created with each new installation of R. Note the line BINPREF ?= c:/Rtools/mingw_32/bin/, which (via the ?= operator) will set the value of BINPREF if it is not already set, as it was in the Makevars file mentioned above.

    0 讨论(0)
提交回复
热议问题