-
Notifications
You must be signed in to change notification settings - Fork 762
Is the following installation failure, as opposed to installing from CRAN, intentional? #908
Description
I apologize for the uninformative title, but I wasn't sure how to encapsulate the question in one line.
I am using an experimental GCC 4.9.2 toolchain for Windows, with EOPTS passing -mtune = ivybridge and CXXFLAGS in Makevars also passing -std=gnu++11.
After compiling R, I can install almost all packages I try, including devtools, from CRAN using install.packages with no issues.
However, installing packages using install_github or install_bitbucket, even on versions which should be identical to their CRAN components, I am getting errors that tge switches -std=gnu++11 and -mtune=ivybridge are unrecognized (example error pasted below), whereupon compilation fails. Some related discussions are tidyverse/dplyr#1368 and rwinlib/gcc-4.9.3#1.
Looking around through the issues here, I came across #678 which, if I understand it correctly, implies that there are settings that may deliberately limit some compilation options. Is that is what is happening with me as well? Thank you.
Sample error
install.packages('Delaporte', type = 'source', INSTALL_opts = '--byte-compile') works fine, but install_bitbucket('aadler/Deaporte') returns the following:
Downloading bitbucket repo aadler/Delaporte@master
Installing Delaporte
"C:/R/R-patched/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL "C:/R/temp/RtmpkXfPod/devtools2634605764c3/aadler-delaporte-7c8f9258c2dc" \
--library="C:/R/R-patched/library" --install-tests
* installing *source* package 'Delaporte' ...
** libs
g++ -m64 -I"C:/R/R-PATC~2/include" -DNDEBUG -I"C:/R/R-patched/library/Rcpp/include" -I"C:/R/RLocalSoft/extsoft/include" -std=gnu++11 -O2 -mtune=ivybridge -pipe -c Delaporte.cpp -o Delaporte.o
cc1plus.exe: error: unrecognized command line option '-std=gnu++11'
Delaporte.cpp:1:0: error: bad value (ivybridge) for -mtune= switch
make: *** [Delaporte.o] Error 1
Warning: running command 'make -f "C:/R/R-PATC~2/etc/x64/Makeconf" -f "C:/R/R-PATC~2/share/make/winshlib.mk" -f "[REDACTED]/.R/Makevars" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="Delaporte.dll" WIN=64 TCLBIN=64 OBJECTS="Delaporte.o RcppExports.o"' had status 2
ERROR: compilation failed for package 'Delaporte'
* removing 'C:/R/R-patched/library/Delaporte'
* restoring previous 'C:/R/R-patched/library/Delaporte'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
problem copying C:\R\R-patched\library\00LOCK-aadler-delaporte-7c8f9258c2dc\Delaporte\libs\x64\Delaporte.dll to C:\R\R-patched\library\Delaporte\libs\x64\Delaporte.dll: Permission denied
Error: Command failed (1)