Closed KaiserDominici closed 6 years ago
Can you remove C:\\Rtools\\mingw_32\\bin
from the PATH
? R should be able to find the compiler via BINPREF
. Setting the 32bit compiler on the path may cause conflicts with 64 builds.
Does it work via devtools::install_cran("Rcpp", force = TRUE)
?
Hi jeroen,
It does work via devtools
. I removed that path but I have the same issue. However, I did notice something odd:
> Sys.getenv("PATH")
[1] "C:\\Program Files\\R\\R-3.4.2\\bin\\x64;C:\\Rtools\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\"
> install.packages("~/Downloads/Rcpp_0.12.13.tar.gz", repos = NULL, type = "source")
Installing package into ‘C:/R/Library’
(as ‘lib’ is unspecified)
* installing *source* package 'Rcpp' ...
** package 'Rcpp' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
C:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-34~1.2/include" -DNDEBUG -I../inst/include/ -I"d:/Compiler/gcc-4.9.3/local330/include" -O3 -Wall -c Date.cpp -o Date.o
I do not have a d: drive... Could that be it?
Thanks
The d: path is hardwired into R, because that's the path R-core is using on their server.... No need to worry about it.
Then I have no clue...
This is the output I get if I use the -H option in CXXFLAGS:
> install.packages("~/Downloads/Rcpp_0.12.13.tar.gz", repos = NULL, type = "source")
Installing package into ‘C:/R/Library’
(as ‘lib’ is unspecified)
* installing *source* package 'Rcpp' ...
** package 'Rcpp' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
C:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-34~1.2/include" -DNDEBUG -I../inst/include/ -I"d:/Compiler/gcc-4.9.3/local330/include" -O3 -H -Wno-unused-variable -Wno-unused-function -c Date.cpp -o Date.o
. ../inst/include/Rcpp.h
.. ../inst/include/RcppCommon.h
... ../inst/include/Rcpp/r/headers.h
.... ../inst/include/Rcpp/platform/compiler.h
..... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cmath
...... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/i686-w64-mingw32/bits/c++config.h
....... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/i686-w64-mingw32/bits/os_defines.h
....... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/i686-w64-mingw32/bits/cpu_defines.h
...... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/cpp_type_traits.h
...... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/ext/type_traits.h
...... C:/Rtools/mingw_32/i686-w64-mingw32/include/math.h
....... C:/Rtools/mingw_32/i686-w64-mingw32/include/crtdefs.h
........ C:/Rtools/mingw_32/i686-w64-mingw32/include/_mingw.h
......... C:/Rtools/mingw_32/i686-w64-mingw32/include/_mingw_mac.h
......... C:/Rtools/mingw_32/i686-w64-mingw32/include/_mingw_secapi.h
......... C:/Rtools/mingw_32/i686-w64-mingw32/include/vadefs.h
.......... C:/Rtools/mingw_32/i686-w64-mingw32/include/_mingw.h
........... C:/Rtools/mingw_32/i686-w64-mingw32/include/sdks/_mingw_directx.h
........... C:/Rtools/mingw_32/i686-w64-mingw32/include/sdks/_mingw_ddk.h
..... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/tr1/unordered_map
...... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/utility
....... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/stl_relops.h
....... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/stl_pair.h
........ C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/move.h
......... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/concept_check.h
...... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/stl_algobase.h
....... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/functexcept.h
........ C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/exception_defines.h
....... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/ext/numeric_traits.h
....... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/stl_iterator_base_types.h
....... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h
........ C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/debug/debug.h
....... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/stl_iterator.h
........ C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/ptr_traits.h
....... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/predefined_ops.h
...... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/allocator.h
....... C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/i686-w64-mingw32/bits/c++allocator.h
........ C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/ext/new_allocator.h
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/i686-w64-mingw32/bits/c++allocator.h:33:0,
from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/allocator.h:46,
from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/tr1/unordered_map:36,
from ../inst/include/Rcpp/platform/compiler.h:172,
from ../inst/include/Rcpp/r/headers.h:48,
from ../inst/include/RcppCommon.h:29,
from ../inst/include/Rcpp.h:27,
from Date.cpp:31:
C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/ext/new_allocator.h:33:15: fatal error: new: No such file or directory
#include <new>
^
compilation terminated.
make: *** [Date.o] Error 1
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-34~1.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-34~1.2/share/make/winshlib.mk" -f "C:/Users/kaiser/.R/Makevars" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="Rcpp.dll" OBJECTS="Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o"' had status 2
ERROR: compilation failed for package 'Rcpp'
* removing 'C:/R/Library/Rcpp'
* restoring previous 'C:/R/Library/Rcpp'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
problem copying C:\R\Library\00LOCK-Rcpp\Rcpp\libs\x64\Rcpp.dll to C:\R\Library\Rcpp\libs\x64\Rcpp.dll: Permission denied
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l "C:\R\Library" "C:/Users/kaiser/Downloads/Rcpp_0.12.13.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/kaiser/Downloads/Rcpp_0.12.13.tar.gz’ had non-zero exit status
In the fifth to last line, where it says 'problem copying', it mentions a permission denied. Could that explain it? Is that what #include <new>
is looking for?
Thanks
Solved. It was an issue on our side with the installation of the rtools due to the way packaged is deployed to users. Thanks.
Can you be more specific what the issue was? It always seems to work fine for most users?
Rtools were packaged by our IT team, who then deployed it to my machine. The tool they use to capture legacy installations and convert to .MSI is InstallShield. The issue was that using the default “Installation Monitoring” method for some reason this did not capture all of the files in the installation. Hence the missing header files. By using the “Snapshot” application installation capture method the complete installation was captured.
Hope this helps if future enterprise users encounter the same issue.
I have been experiencing an issue installing packages from source, where Rtools 3.4.0.1964 seems unable to locate some file. For example, trying to install Rcpp:
I think my PATH is correct:
Also:
I am using R 3.4.2 and Rstudio 1.1.383 on Windows 7 Enterprise.
Thank you for any help,
k.