1

Yet another question on rtools installation...

RStudio: 2022.07.2 Build 576
R: 4.2.1
OS: Windows 10 Enterprise v 21H2
rtools: C:\rtools42

When I look for rtools, I get:

R> Sys.which("make")
make
  "" 
Sys.getenv("PATH")
[1] "C:\\rtools42;\\usr\\bin;C:\\Program Files\\R\\R-4.2.1\\bin\\x64;C:\\Program Files\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files\\ImageMagick-7.1.0-Q16-HDRI;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\OpenText\\Viewer\\bin;C:\\Program Files (x86)\\Plantronics\\Spokes3G\\;C:\\Program Files (x86)\\PIPC\\bin\\;C:\\Program Files\\PIPC\\bin\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\Git\\cmd;C:\\rtools42;C:\\Program Files\\R\\R-4.2.1\\bin\\x64;C:\\Program Files\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files\\ImageMagick-7.1.0-Q16-HDRI;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\OpenText\\Viewer\\bin;C:\\Program Files (x86)\\Plantronics\\Spokes3G\\;C:\\Program Files (x86)\\PIPC\\bin\\;C:\\Program Files\\PIPC\\bin\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\Git\\cmd;C:\\Users\\tspeidel\\AppData\\Local\\Programs\\Python\\Python310\\Scripts\\;C:\\Users\\tspeidel\\AppData\\Local\\Programs\\Python\\Python310\\;C:\\texlive\\2021\\bin\\win32;C:\\Users\\tspeidel\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\tspeidel\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files\\Inkscape\\bin;C:\\Users\\tspeidel\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\tspeidel\\AppData\\Local\\Pandoc\\;C:/Program Files/RStudio/resources/app/bin/quarto/bin;C:/Program Files/RS;C:/Program Files/RStudio/bin/quarto/bin"

I did not have this issue with rtools40. It has happened after installing rtools42 (and the old one removed).

I have added an environment variable pointing to C:\\rtools42 even though the instructions for rtools42 did not say to do so. I also noticed rtools 42 does not contain a bin folder.

Update (partially solved)

I added the following paths to my environment after searching for gcc inside the rtools42 folder:

"C:\\rtools42\\mingw32\\bin", "C:\\rtools42\\usr\\bin", "C:\\rtools42\\x86_64-w64-mingw32.static.posix\\bin"

and then:

Sys.which("make")
                              make 
"C:\\rtools42\\usr\\bin\\make.exe"

Which I verified by installing a package that requires compilation. All worked! I could not find documentation on rtools website as to the paths needed for rtools42 (whereas previous versions make it clear). I wonder if the installer is suppsoed to take care of it and for some reason id didn't on my system. I'm going to call it partially solved because I don't know if there are other paths i need to manually specify.

Thomas Speidel
  • 1,369
  • 1
  • 14
  • 26

0 Answers0