Describe the bug
Sorry to bother your team, after I follow the steps of https://swarm-lab.github.io/Rvision/articles/z1_install.html, I still can't install Rvision. I have already go through the all steps of installing installr, cmake, devtools, rtools, opencvlite in Rstudio. At the last step, devtools::install_github("swarm-lab/Rvision"), it goes wrong as follow:
devtools::install_github("swarm-lab/Rvision")
Downloading GitHub repo swarm-lab/Rvision@HEAD
-- R CMD build ------------------------------------------------------------------------------------
v checking for file 'C:\Users\Shanshan\AppData\Local\Temp\RtmpATbkCC\remotes2c74f01970\swarm-lab-Rvision-1ad0f19/DESCRIPTION' (379ms)
- preparing 'Rvision': (885ms)
v checking DESCRIPTION meta-information ...
- cleaning src
- checking for LF line-endings in source and make files and shell scripts (1.7s)
- checking for empty or unneeded directories
Removed empty directory 'Rvision/man/figures'
- building 'Rvision_0.7.0.tar.gz'
Warning: file 'Rvision/configure' did not have execute permissions: corrected
- installing source package 'Rvision' ...
** using non-staged installation via StagedInstall field
-
set -e
-
C:/D/Apps/R/R-41~1.2/bin/x64/Rscript.exe -e 'if (nzchar(Sys.getenv('''CI''')) & !ROpenCVLite::isOpenCVInstalled()) ROpenCVLite::installOpenCV(batch = TRUE)'
-
C:/D/Apps/R/R-41~1.2/bin/x64/Rscript.exe -e 'if (nzchar(Sys.getenv('''CI''')) & ROpenCVLite::isOpenCVInstalled() & unlist(strsplit(as.character(utils::packageVersion('''ROpenCVLite''')), '''[.]'''))[3] != gsub('''[^0-9]''', '''''', ROpenCVLite::opencvVersion())) ROpenCVLite::installOpenCV(batch = TRUE)'
-
C:/D/Apps/R/R-41~1.2/bin/x64/Rscript.exe -e 'if (!ROpenCVLite::isOpenCVInstalled()) { cat('''------------------ OPENCV NOT FOUND --------------------\n''') ; cat('''\n''') ; cat('''OpenCV was not found in your library. Please install OpenCV as follows:''') ; cat('''\n''') ; cat('''\n''') ; cat('''ROpenCVLite::installOpenCV(batch = TRUE)\n''') ; cat('''\n''') ; cat('''--------------------------------------------------------\n''') ; cat('''\n''') ; stop('''OpenCV not found.''') }'
-
C:/D/Apps/R/R-41~1.2/bin/x64/Rscript.exe -e '
r_arch <- list.dirs(paste0(R.home(), '''/bin'''), FALSE, FALSE)
opencv_arch <- ifelse(r_arch == '''i386''', '''x86''', '''x64''')
for (i in 1:length(opencv_arch)) {
dest <- file.path('''C:/D/Apps/R/R-4.1.2/library/Rvision''', paste0('''libs/''', r_arch[i]))
dir.create(dest, recursive = TRUE, showWarnings = FALSE)
opencv_DLLs <- list.files(paste0(ROpenCVLite::OpenCVPath(), '''/''', opencv_arch[i], '''/mingw/bin'''), '''.dll''', full.names = TRUE)
void <- lapply(opencv_DLLs, function(x) {
file.copy(x, dest)
})
}
'
** libs
*** arch - i386
"C:/D/Apps/R/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/D/Apps/R/R-411.2/include" -DNDEBUG -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include\opencv2" -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include" -I"C:\D\Apps\R\R-411.2\library\ROpenCV\x86\mingw\bin" -I'C:/D/Apps/R/R-4.1.2/library/Rcpp/include' -I'C:/D/Apps/R/R-4.1.2/library/RcppArmadillo/include' -I"C:/D/Apps/R/R-4.1.2/library/Rcpp/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o
"C:/D/Apps/R/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/D/Apps/R/R-411.2/include" -DNDEBUG -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include\opencv2" -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include" -I"C:\D\Apps\R\R-411.2\library\ROpenCV\x86\mingw\bin" -I'C:/D/Apps/R/R-4.1.2/library/Rcpp/include' -I'C:/D/Apps/R/R-4.1.2/library/RcppArmadillo/include' -I"C:/D/Apps/R/R-4.1.2/library/Rcpp/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c visionModule.cpp -o visionModule.o
In file included from visionModule.cpp:14:
Image.h: In function 'bool _writeMulti(std::__cxx11::string, Rcpp::List)':
Image.h:625:30: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'R_xlen_t' {aka 'int'} [-Wsign-compare]
for (unsigned int i = 0; i < imgList.size(); i++) {
~~^~~~~~~~~~~~~~~~
In file included from visionModule.cpp:332:
shape.h: In function 'double _contourArea(Rcpp::NumericVector, Rcpp::NumericVector, bool)':
shape.h:44:22: warning: comparison of integer expressions of different signedness: 'uint' {aka 'unsigned int'} and 'R_xlen_t' {aka 'int'} [-Wsign-compare]
for (uint i = 0; i < x.size(); i++) {
~~^~~~~~~~~~
C:/D/Apps/R/rtools40/mingw32/bin/g++ -shared -s -static-libgcc -o Rvision.dll tmp.def RcppExports.o visionModule.o -LC:\D\Apps\R\R-411.2\library\ROpenCV\x86\mingw\lib -lopencv_calib3d470 -lopencv_core470 -lopencv_features2d470 -lopencv_flann470 -lopencv_gapi470 -lopencv_highgui470 -lopencv_imgcodecs470 -lopencv_imgproc470 -lopencv_ml470 -lopencv_objdetect470 -lopencv_photo470 -lopencv_stitching470 -lopencv_video470 -lopencv_videoio470 -lopencv_ximgproc470 -LC:/D/Apps/R/R-411.2/bin/i386 -lR
installing to C:/D/Apps/R/R-4.1.2/library/Rvision/libs/i386
*** arch - x64
"C:/D/Apps/R/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/D/Apps/R/R-411.2/include" -DNDEBUG -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include\opencv2" -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include" -I"C:\D\Apps\R\R-4.1.2\library\ROpenCV\x64\mingw\bin" -I'C:/D/Apps/R/R-4.1.2/library/Rcpp/include' -I'C:/D/Apps/R/R-4.1.2/library/RcppArmadillo/include' -I"C:/D/Apps/R/R-4.1.2/library/Rcpp/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o
"C:/D/Apps/R/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/D/Apps/R/R-411.2/include" -DNDEBUG -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include\opencv2" -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include" -I"C:\D\Apps\R\R-4.1.2\library\ROpenCV\x64\mingw\bin" -I'C:/D/Apps/R/R-4.1.2/library/Rcpp/include' -I'C:/D/Apps/R/R-4.1.2/library/RcppArmadillo/include' -I"C:/D/Apps/R/R-4.1.2/library/Rcpp/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c visionModule.cpp -o visionModule.o
C:/D/Apps/R/rtools40/mingw64/bin/g++ -shared -s -static-libgcc -o Rvision.dll tmp.def RcppExports.o visionModule.o -LC:\D\Apps\R\R-4.1.2\library\ROpenCV\x64\mingw\lib -l -LC:/D/Apps/R/R-411.2/bin/x64 -lR
C:/D/Apps/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -l-LC:/D/Apps/R/R-411.2/bin/x64
C:/D/Apps/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../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 'Rvision'
- removing 'C:/D/Apps/R/R-4.1.2/library/Rvision'
Warning message:
In i.p(...) :
installation of package ‘C:/Users/Shanshan/AppData/Local/Temp/RtmpATbkCC/file2c7417673f71/Rvision_0.7.0.tar.gz’ had non-zero exit status
Besides, I have also tried to library() (or not library()) of all the opencvlite or installr stuff, or restart rstudio, restart system, or runing the last line in RGui rather than Rstudio, or use proxy to crossing the Great Fire Wall (I'm in China) or not, it always failed as same as above. Seems it lack some file called "ld.exe: cannot find -l-LC:/D/Apps/R/R-41~1.2/bin/x64". There is no other people arond me used this package.
To Reproduce
I'm not sure if anyone can reproduce this error. So how may I solve the problem? Or how may I install Rvision by other alternative ways? I didn't find Rvision package from CRAN archive website which I can do manual installation. Really hope for your reply.
Best wishes!
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Computer (please complete the following information):
- Operating system: [Windows 10]
- Processor: [Intel(R) Core(TM) i5-8300H CPU @ 230GHZ 2.30 GHZ]
version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 4
minor 1.2
year 2021
month 11
day 01
svn rev 81115
language R
version.string R version 4.1.2 (2021-11-01)
nickname Bird Hippie
Sys.info() sysname release version nodename machine login user effective_user "Windows" "10 x64" "build 19044" "SHAN" "x86-64" "Shanshan" "Shanshan" "Shanshan"
--
**R (please complete the following information):**
- R version: [R version 4.1.2 (2021-11-01)]
- installr version: [0.23.4]
- ROpenCVLite version: [4.70.0]
Additional context
Add any other context about the problem here.
Describe the bug
Sorry to bother your team, after I follow the steps of https://swarm-lab.github.io/Rvision/articles/z1_install.html, I still can't install Rvision. I have already go through the all steps of installing installr, cmake, devtools, rtools, opencvlite in Rstudio. At the last step, devtools::install_github("swarm-lab/Rvision"), it goes wrong as follow:
v checking DESCRIPTION meta-information ...
Removed empty directory 'Rvision/man/figures'
Warning: file 'Rvision/configure' did not have execute permissions: corrected
** using non-staged installation via StagedInstall field
set -e
C:/D/Apps/R/R-41~1.2/bin/x64/Rscript.exe -e 'if (nzchar(Sys.getenv('''CI''')) & !ROpenCVLite::isOpenCVInstalled()) ROpenCVLite::installOpenCV(batch = TRUE)'
C:/D/Apps/R/R-41~1.2/bin/x64/Rscript.exe -e 'if (nzchar(Sys.getenv('''CI''')) & ROpenCVLite::isOpenCVInstalled() & unlist(strsplit(as.character(utils::packageVersion('''ROpenCVLite''')), '''[.]'''))[3] != gsub('''[^0-9]''', '''''', ROpenCVLite::opencvVersion())) ROpenCVLite::installOpenCV(batch = TRUE)'
C:/D/Apps/R/R-41~1.2/bin/x64/Rscript.exe -e 'if (!ROpenCVLite::isOpenCVInstalled()) { cat('''------------------ OPENCV NOT FOUND --------------------\n''') ; cat('''\n''') ; cat('''OpenCV was not found in your library. Please install OpenCV as follows:''') ; cat('''\n''') ; cat('''\n''') ; cat('''ROpenCVLite::installOpenCV(batch = TRUE)\n''') ; cat('''\n''') ; cat('''--------------------------------------------------------\n''') ; cat('''\n''') ; stop('''OpenCV not found.''') }'
C:/D/Apps/R/R-41~1.2/bin/x64/Rscript.exe -e '
r_arch <- list.dirs(paste0(R.home(), '''/bin'''), FALSE, FALSE)
opencv_arch <- ifelse(r_arch == '''i386''', '''x86''', '''x64''')
for (i in 1:length(opencv_arch)) {
dest <- file.path('''C:/D/Apps/R/R-4.1.2/library/Rvision''', paste0('''libs/''', r_arch[i]))
dir.create(dest, recursive = TRUE, showWarnings = FALSE)
opencv_DLLs <- list.files(paste0(ROpenCVLite::OpenCVPath(), '''/''', opencv_arch[i], '''/mingw/bin'''), '''.dll''', full.names = TRUE)
void <- lapply(opencv_DLLs, function(x) {
file.copy(x, dest)
})
}
'
** libs
*** arch - i386
"C:/D/Apps/R/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/D/Apps/R/R-41
1.2/include" -DNDEBUG -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include\opencv2" -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include" -I"C:\D\Apps\R\R-411.2\library\ROpenCV\x86\mingw\bin" -I'C:/D/Apps/R/R-4.1.2/library/Rcpp/include' -I'C:/D/Apps/R/R-4.1.2/library/RcppArmadillo/include' -I"C:/D/Apps/R/R-4.1.2/library/Rcpp/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o"C:/D/Apps/R/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/D/Apps/R/R-41
1.2/include" -DNDEBUG -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include\opencv2" -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include" -I"C:\D\Apps\R\R-411.2\library\ROpenCV\x86\mingw\bin" -I'C:/D/Apps/R/R-4.1.2/library/Rcpp/include' -I'C:/D/Apps/R/R-4.1.2/library/RcppArmadillo/include' -I"C:/D/Apps/R/R-4.1.2/library/Rcpp/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c visionModule.cpp -o visionModule.oIn file included from visionModule.cpp:14:
Image.h: In function 'bool _writeMulti(std::__cxx11::string, Rcpp::List)':
Image.h:625:30: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'R_xlen_t' {aka 'int'} [-Wsign-compare]
for (unsigned int i = 0; i < imgList.size(); i++) {
~~^~~~~~~~~~~~~~~~
In file included from visionModule.cpp:332:
shape.h: In function 'double _contourArea(Rcpp::NumericVector, Rcpp::NumericVector, bool)':
shape.h:44:22: warning: comparison of integer expressions of different signedness: 'uint' {aka 'unsigned int'} and 'R_xlen_t' {aka 'int'} [-Wsign-compare]
for (uint i = 0; i < x.size(); i++) {
~~^~~~~~~~~~
C:/D/Apps/R/rtools40/mingw32/bin/g++ -shared -s -static-libgcc -o Rvision.dll tmp.def RcppExports.o visionModule.o -LC:\D\Apps\R\R-41
1.2\library\ROpenCV\x86\mingw\lib -lopencv_calib3d470 -lopencv_core470 -lopencv_features2d470 -lopencv_flann470 -lopencv_gapi470 -lopencv_highgui470 -lopencv_imgcodecs470 -lopencv_imgproc470 -lopencv_ml470 -lopencv_objdetect470 -lopencv_photo470 -lopencv_stitching470 -lopencv_video470 -lopencv_videoio470 -lopencv_ximgproc470 -LC:/D/Apps/R/R-411.2/bin/i386 -lRinstalling to C:/D/Apps/R/R-4.1.2/library/Rvision/libs/i386
*** arch - x64
"C:/D/Apps/R/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/D/Apps/R/R-41
1.2/include" -DNDEBUG -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include\opencv2" -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include" -I"C:\D\Apps\R\R-4.1.2\library\ROpenCV\x64\mingw\bin" -I'C:/D/Apps/R/R-4.1.2/library/Rcpp/include' -I'C:/D/Apps/R/R-4.1.2/library/RcppArmadillo/include' -I"C:/D/Apps/R/R-4.1.2/library/Rcpp/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o1.2/include" -DNDEBUG -I"C:\D\Apps\R\R-41"C:/D/Apps/R/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/D/Apps/R/R-41
1.2\library\ROpenCV\include\opencv2" -I"C:\D\Apps\R\R-411.2\library\ROpenCV\include" -I"C:\D\Apps\R\R-4.1.2\library\ROpenCV\x64\mingw\bin" -I'C:/D/Apps/R/R-4.1.2/library/Rcpp/include' -I'C:/D/Apps/R/R-4.1.2/library/RcppArmadillo/include' -I"C:/D/Apps/R/R-4.1.2/library/Rcpp/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c visionModule.cpp -o visionModule.oC:/D/Apps/R/rtools40/mingw64/bin/g++ -shared -s -static-libgcc -o Rvision.dll tmp.def RcppExports.o visionModule.o -LC:\D\Apps\R\R-4.1.2\library\ROpenCV\x64\mingw\lib -l -LC:/D/Apps/R/R-41
1.2/bin/x64 -lR1.2/bin/x64C:/D/Apps/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -l-LC:/D/Apps/R/R-41
C:/D/Apps/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../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 'Rvision'
Warning message:
In i.p(...) :
installation of package ‘C:/Users/Shanshan/AppData/Local/Temp/RtmpATbkCC/file2c7417673f71/Rvision_0.7.0.tar.gz’ had non-zero exit status
Besides, I have also tried to library() (or not library()) of all the opencvlite or installr stuff, or restart rstudio, restart system, or runing the last line in RGui rather than Rstudio, or use proxy to crossing the Great Fire Wall (I'm in China) or not, it always failed as same as above. Seems it lack some file called "ld.exe: cannot find -l-LC:/D/Apps/R/R-41~1.2/bin/x64". There is no other people arond me used this package.
To Reproduce
I'm not sure if anyone can reproduce this error. So how may I solve the problem? Or how may I install Rvision by other alternative ways? I didn't find Rvision package from CRAN archive website which I can do manual installation. Really hope for your reply.
Best wishes!
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Computer (please complete the following information):
- Operating system: [Windows 10]
- Processor: [Intel(R) Core(TM) i5-8300H CPU @ 230GHZ 2.30 GHZ]
**R (please complete the following information):** - R version: [R version 4.1.2 (2021-11-01)] - installr version: [0.23.4] - ROpenCVLite version: [4.70.0]Additional context
Add any other context about the problem here.