Installation on Windows 10 fails
felipegerard opened this issue · 6 comments
Hi! I'm trying to install websocket 1.0.0 (I downloaded the latest master today) because shinyloadtest requires it, but compilation fails every time I attempt to install the package, whether I try it with install.packages()
or devtools::install_local()
. Any ideas of what could be the cause?
devtools::install_local('cloned-packages/websocket-master/')
Installing websocket
"C:/R-34~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/f0g00bq/AppData/Local/Temp/Rtmp4ygQkI/file33b0194650ba/websocket-master" \
--library="C:/R-3.4.1/library" --install-tests
* installing *source* package 'websocket' ...
**********************************************
WARNING: this package has a configure script
It probably needs manual configuration
**********************************************
Warning in as.POSIXlt.POSIXct(x, tz) : unknown timezone 'GMT'
** libs
Warning: R include directory is empty -- perhaps need to install R-devel.rpm or similar
*** arch - i386
"C:/R-34~1.1/bin/i386/Rscript.exe" "../tools/winlibs.R" 1.0.2o
C:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/R-34~1.1/include" -DNDEBUG -I./lib -I../windows/openssl-1.0.2o/include -D_WEBSOCKETPP_CPP11_THREAD_ -I"C:/R-3.4.1/library/Rcpp/include" -I"C:/R-3.4.1/library/BH/include" -I"C:/R-3.4.1/library/AsioHeaders/include" -I"d:/Compiler/gcc-4.9.3/local330/include" -O2 -Wall -mtune=core2 -c RcppExports.cpp -o RcppExports.o
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++/string:41,
from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/stdexcept:39,
from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/array:38,
from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/tuple:39,
from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/unordered_map:41,
from C:/R-3.4.1/library/Rcpp/include/Rcpp/platform/compiler.h:153,
from C:/R-3.4.1/library/Rcpp/include/Rcpp/r/headers.h:59,
from C:/R-3.4.1/library/Rcpp/include/RcppCommon.h:29,
from C:/R-3.4.1/library/Rcpp/include/Rcpp.h:27,
from RcppExports.cpp:4:
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: *** [RcppExports.o] Error 1
Warning: running command 'make -f "Makevars.win" -f "C:/R-34~1.1/etc/i386/Makeconf" -f "C:/R-34~1.1/share/make/winshlib.mk" CXX='$(CXX11) $(CXX11STD)' CXXFLAGS='$(CXX11FLAGS)' CXXPICFLAGS='$(CXX11PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX11LDFLAGS)' SHLIB_LD='$(SHLIB_CXX11LD)' SHLIB="websocket.dll" OBJECTS="RcppExports.o websocket.o"' had status 2
ERROR: compilation failed for package 'websocket'
* removing 'C:/R-3.4.1/library/websocket'
Installation failed: Command failed (1)
#> Error: <text>:2:12: unexpected symbol
#> 1: devtools::install_local('cloned-packages/websocket-master/')
#> 2: Installing websocket
#> ^
Created on 2019-04-23 by the reprex package (v0.2.0).
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 15063)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 rprojroot_1.3-2 digest_0.6.17 crayon_1.3.4 withr_2.1.2
[6] assertthat_0.2.0 R6_2.4.0 backports_1.1.2 magrittr_1.5 reprex_0.2.0
[11] git2r_0.23.0 evaluate_0.11 stringi_1.1.7 debugme_1.1.0 rlang_0.3.0.1
[16] rstudioapi_0.7 callr_2.0.4 whisker_0.3-2 rmarkdown_1.10 devtools_1.13.6
[21] tools_3.4.1 stringr_1.4.0 compiler_3.4.1 processx_3.1.0 clipr_0.4.1
[26] htmltools_0.3.6 memoise_1.1.0 knitr_1.20
Created on 2019-04-23 by the reprex package (v0.2.0).
Hi, thanks for the report. Can you please confirm your version of Rtools?
If you're able, upgrading to R 3.5.x and/or installing Rtools35.exe might resolve the problem.
Hi Alan, thank you for your quick response and sorry for taking so long. I'm in a corporate environment and trying to get approval to download R 3.5.... I'll get back to you as soon as I can.
I'm running R 3.5.3 with Rtools35 and am also having trouble compiling websocket.
> devtools::install_github('rstudio/websocket')
Downloading GitHub repo rstudio/websocket@master
Installing 1 packages: AsioHeaders
Installing package into ‘C:/Users/bvancil/git/boring/packrat/lib/x86_64-w64-mingw32/3.5.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/AsioHeaders_1.12.1-1.zip'
Content type 'application/zip' length 827410 bytes (808 KB)
downloaded 808 KB
package ‘AsioHeaders’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\bvancil\AppData\Local\Temp\RtmpyCG0ha\downloaded_packages
√ checking for file 'C:\Users\bvancil\AppData\Local\Temp\RtmpyCG0ha\remotes61f0488353a0\rstudio-websocket-df0260c/DESCRIPTION' (1.9s)
- preparing 'websocket': (854ms)
√ checking DESCRIPTION meta-information ...
- cleaning src
- checking for LF line-endings in source and make files and shell scripts (601ms)
- checking for empty or unneeded directories (741ms)
- building 'websocket_1.0.0.tar.gz'
Warning: file 'websocket/cleanup' did not have execute permissions: corrected
Warning: file 'websocket/configure' did not have execute permissions: corrected
Installing package into ‘C:/Users/bvancil/git/boring/packrat/lib/x86_64-w64-mingw32/3.5.3’
(as ‘lib’ is unspecified)
* installing *source* package 'websocket' ...
**********************************************
WARNING: this package has a configure script
It probably needs manual configuration
**********************************************
** libs
*** arch - i386
"C:/PROGRA~1/R/R-3.5.3/bin/i386/Rscript.exe" "../tools/winlibs.R" 1.0.2o
C:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-3.5.3/include" -DNDEBUG -I./lib -I../windows/openssl-1.0.2o/include -D_WEBSOCKETPP_CPP11_THREAD_ -I"C:/Users/bvancil/git/boring/packrat/lib/x86_64-w64-mingw32/3.5.3/Rcpp/include" -I"C:/Users/bvancil/git/boring/packrat/lib/x86_64-w64-mingw32/3.5.3/BH/include" -I"C:/Users/bvancil/git/boring/packrat/lib/x86_64-w64-mingw32/3.5.3/AsioHeaders/include" -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
C:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-3.5.3/include" -DNDEBUG -I./lib -I../windows/openssl-1.0.2o/include -D_WEBSOCKETPP_CPP11_THREAD_ -I"C:/Users/bvancil/git/boring/packrat/lib/x86_64-w64-mingw32/3.5.3/Rcpp/include" -I"C:/Users/bvancil/git/boring/packrat/lib/x86_64-w64-mingw32/3.5.3/BH/include" -I"C:/Users/bvancil/git/boring/packrat/lib/x86_64-w64-mingw32/3.5.3/AsioHeaders/include" -O2 -Wall -mtune=generic -c websocket.cpp -o websocket.o
Error in normalizePath(path.expand(path), winslash, mustWork) :
(converted from warning) path[89]="": The filename, directory name, or volume label syntax is incorrect
The build hangs at this point.
Sorry, the hang only occurs while using packrat. When installing globally, I see a different error:
> devtools::install_github('rstudio/websocket')
Downloading GitHub repo rstudio/websocket@master
√ checking for file 'C:\Users\bvancil\AppData\Local\Temp\RtmpQraw0U\remotes6dd818401ccb\rstudio-websocket-df0260c/DESCRIPTION' (678ms)
- preparing 'websocket': (685ms)
√ checking DESCRIPTION meta-information ...
- cleaning src
- checking for LF line-endings in source and make files and shell scripts (504ms)
- checking for empty or unneeded directories (546ms)
- building 'websocket_1.0.0.tar.gz'
Warning: file 'websocket/cleanup' did not have execute permissions: corrected
Warning: file 'websocket/configure' did not have execute permissions: corrected
Installing package into ‘C:/Users/bvancil/R/win-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package 'websocket' ...
**********************************************
WARNING: this package has a configure script
It probably needs manual configuration
**********************************************
** libs
*** arch - i386
"C:/PROGRA~1/R/R-3.5.3/bin/i386/Rscript.exe" "../tools/winlibs.R" 1.0.2o
C:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-3.5.3/include" -DNDEBUG -I./lib -I../windows/openssl-1.0.2o/include -D_WEBSOCKETPP_CPP11_THREAD_ -I"C:/Users/bvancil/R/win-library/3.5/Rcpp/include" -I"C:/Users/bvancil/R/win-library/3.5/BH/include" -I"C:/Users/bvancil/R/win-library/3.5/AsioHeaders/include" -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
C:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-3.5.3/include" -DNDEBUG -I./lib -I../windows/openssl-1.0.2o/include -D_WEBSOCKETPP_CPP11_THREAD_ -I"C:/Users/bvancil/R/win-library/3.5/Rcpp/include" -I"C:/Users/bvancil/R/win-library/3.5/BH/include" -I"C:/Users/bvancil/R/win-library/3.5/AsioHeaders/include" -O2 -Wall -mtune=generic -c websocket.cpp -o websocket.o
C:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o websocket.dll tmp.def RcppExports.o websocket.o -L../windows/openssl-1.0.2o/lib/i386 -lssl -lcrypto -lws2_32 -lgdi32 -LC:/PROGRA~1/R/R-3.5.3/bin/i386 -lR
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../windows/openssl-1.0.2o/lib/i386/libssl.a when searching for -lssl
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../windows/openssl-1.0.2o/lib/i386\libssl.a when searching for -lssl
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../windows/openssl-1.0.2o/lib/i386/libssl.a when searching for -lssl
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lssl
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../windows/openssl-1.0.2o/lib/i386/libcrypto.a when searching for -lcrypto
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../windows/openssl-1.0.2o/lib/i386\libcrypto.a when searching for -lcrypto
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../windows/openssl-1.0.2o/lib/i386/libcrypto.a when searching for -lcrypto
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lcrypto
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~1/R/R-3.5.3/bin/i386/R.dll when searching for -lR
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~1/R/R-3.5.3/bin/i386/R.dll when searching for -lR
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lR
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'websocket'
* removing 'C:/Users/bvancil/R/win-library/3.5/websocket'
In R CMD INSTALL
Error in i.p(...) :
(converted from warning) installation of package ‘C:/Users/bvancil/AppData/Local/Temp/RtmpQraw0U/file6dd85ad45d49/websocket_1.0.0.tar.gz’ had non-zero exit status
It appears not to find any of the relevant libraries.
Hi all! It worked for me when I upgraded to R 3.5.3 and RTools 35. I am using an internal company CRAN, though, so I can't be sure this will help everyone...
@felipegerard glad to hear it's working for you!
@bvancil thank you for your report, but your issue looks different from the one originally posted here. When you have a spare moment, would you please create a new issue? I'll be happy to take a look.