Skip to content

[R-pkg-devel] Possible Rtools path problem

5 messages · Horia Yeb, Dirk Eddelbuettel, Duncan Murdoch +1 more

#
*Hi there, I am creating a R (using R3.5.2)package with Rcpp through R
studio(1.1.456) and using RTools35.*
*I've replaced my name in the paths with " USER "*

*On build I get no error messages or warnings, but on R CMD check I get :*

$ R CMD check DataViz_1.0.tar.gz
* using log directory 'C:/Users/ USER/Documents/RThrowChart/DataViz.Rcheck'
* using R version 3.5.2 (2018-12-20)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: ISO8859-1
*[....]*
* checking whether package 'DataViz' can be installed ... ERROR
Installation failed.
See 'C:/Users/ USER/Documents/RThrowChart/DataViz.Rcheck/00install.out' for
details.
* DONE

Status: 1 ERROR
See
'C:/Users/USER/Documents/RThrowChart/DataViz.Rcheck/00check.log'
for details.



___
*My 00check file : *


* checking whether package 'DataViz' can be installed ... ERROR
Installation failed.
See 'C:/Users/USER/Documents/RThrowChart/DataViz.Rcheck/00install.out' for
details.
* DONE
Status: 1 ERROR



___
*My 00install file :*

* installing *source* package 'DataViz' ...
** libs
C:/Users/ USER  /DOCUME~1/R/R-35~1.2/etc/i386/Makeconf:230: warning:
overriding commands for target `.m.o'
C:/Users/ USER  /DOCUME~1/R/R-35~1.2/etc/i386/Makeconf:223: warning:
ignoring old commands for target `.m.o'
c:/Rtools/mingw_32/bin/g++  -I"C:/Users/ USER
/DOCUME~1/R/R-35~1.2/include" -DNDEBUG  -I"C:/Users/ USER
/Documents/R/win-library/3.5/Rcpp/include"        -O2 -Wall  -mtune=generic
-c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_32/bin/g++  -I"C:/Users/ USER
/DOCUME~1/R/R-35~1.2/include" -DNDEBUG  -I"C:/Users/ USER
/Documents/R/win-library/3.5/Rcpp/include"        -O2 -Wall  -mtune=generic
-c rcpp_ThrowChart.cpp -o rcpp_ThrowChart.o
c:/Rtools/mingw_32/bin/g++  -shared -s -static-libgcc -o DataViz.dll
tmp.def RcppExports.o rcpp_ThrowChart.o -LC:/Users/ USER
/DOCUME~1/R/R-35~1.2/bin/i386 -lR
/Rtools/bin/sh: line 8: c:/Rtools/mingw_32/bin/g++ : No such file or
directory
C:/Users/ USER  /DOCUME~1/R/R-35~1.2/etc/i386/Makeconf:230: warning:
overriding commands for target `.m.o'
C:/Users/ USER  /DOCUME~1/R/R-35~1.2/etc/i386/Makeconf:223: warning:
ignoring old commands for target `.m.o'
Warning messages:
1: In FUN(X[[i]], ...) : this requires 'nm' to be on the PATH
2: In FUN(X[[i]], ...) : this requires 'nm' to be on the PATH
no DLL was created
ERROR: compilation failed for package 'DataViz'
* removing 'C:/Users/ USER  /Documents/RThrowChart/DataViz.Rcheck/DataViz'
In R CMD INSTALL

__________________
*My path.getenv is : *


 [1] "C:\\Users\\ USER    \\Documents\\R\\R-3.5.2\\bin\\i386"

 [2] "C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine
Components\\iCLS\\"
 [3] "C:\\Program Files\\Intel\\Intel(R) Management Engine
Components\\iCLS\\"
 [4] "C:\\WINDOWS\\system32"

 [5] "C:\\WINDOWS"

 [6] "C:\\WINDOWS\\System32\\Wbem"

 [7] "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\"

 [8] "C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine
Components\\DAL"
 [9] "C:\\Program Files\\Intel\\Intel(R) Management Engine
Components\\DAL"
[10] "C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine
Components\\IPT"
[11] "C:\\Program Files\\Intel\\Intel(R) Management Engine
Components\\IPT"
[12] "C:\\Program Files\\CMake\\bin"

[13] "C:\\Program Files\\R\\R-3.5.0\\bin"

[14] "C:\\WINDOWS\\System32\\OpenSSH\\"

[15] "C:\\HashiCorp\\Vagrant\\bin"

[16] "C:\\ProgramData\\chocolatey\\bin"

[17] "C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\"

[18] "C:\\Program Files\\Java\\jdk1.8.0_181\\bin"

[19] "C:\\Qt\\Tools\\QtCreator\\bin"

[20] "C:\\Qt\\5.11.1\\msvc2017_64\\bin"

[21] "C:\\Windows\\System32"

[22] "C:\\Program Files (x86)\\GnuWin32\\bin"

[23] "C:\\Program Files\\Git\\cmd"

[24] "C:\\Rtools\\bin"

[25] "C:\\Rtools\\MinGW\\bin"

[26] "C:\\Users\\ USER    \\AppData\\Local\\Microsoft\\WindowsApps"

[27] "C:\\Users\\ USER    \\AppData\\Local\\atom\\bin"

[28] "C:\\Users\\ USER    \\AppData\\Local\\Programs\\MiKTeX
2.9\\miktex\\bin\\x64\\"

_________________________

*The error seems to come from "/Rtools/bin/sh: line 8:
c:/Rtools/mingw_32/bin/g++ : No such file or directory" but it clearly
exists and the path has the speicific path to mingw. Does anyone have an
idea or can redirect me to a relevant thread? I might be completely wrong
as to where the error actually is maybe someone recognizes the problem
better?*
#
The R-on-Windows FAQ has recommends to NOT install in a path with spaces.

The R Installer on Windows defaults to a path with spaces.

I cannot reconcile it either. Such is life, sometimes.

But when I had to work on that platform in the past I put my open source
stuff into c:/opt/ -- so maybe try reinstalling?

Rtools also had (has ?) a gotcha requiring c:/ placement.

Dirk
#
On 25/02/2019 11:01 a.m., Dirk Eddelbuettel wrote:
Those might be the problem, but to me it looks more like a path order 
problem:
The OP has 23 directories in the path ahead of the Rtools directories; 
I'd guess one of them contains a like-named command that is messing 
things up.  From the message
my guess would be that there's a bad 'nm.exe' somewhere in there.  The 
real one is likely in directory 25 (I haven't got current Rtools 
installed, so can't tell), but if there's another one earlier, things 
won't work.

I'd recommend putting the Rtools directories first.  That might mess up 
one of the other programs that also wants to be first, so I wouldn't do 
it globally, just set up a batch or cmd file to modify the path when you 
want to use Rtools.

Duncan Murdoch
#
One of the programs that don't work is find from R tools if it is behind 
C:\Windows\system32 where the ompletely different windows find is found.

Best,
Uwe Ligges
On 25.02.2019 19:06, Duncan Murdoch wrote:
#
Hey all and thank you for helping me,
In the end, I re-installed R, and R tools and the check gives me no error
?on this computer. I tried all of the above, didn't solve the problem.

Thanks again anyway!
Horia.

On Mon, 25 Feb 2019 at 19:09, Uwe Ligges <ligges at statistik.tu-dortmund.de>
wrote: