Closed JBlefebvre closed 5 years ago
@JBlefebvre At the moment, it is recommended to use the latest "frozen" version of RTools to install ROpenCVLite, which is currently v3.4 (see https://swarm-lab.github.io/ROpenCVLite/articles/install.html#windows). Last week, I reported the problem with Cmake and v3.5 to the RTools developers here: https://github.com/rwinlib/rtools35/issues/11. I suggest you add a comment there to make them aware that the issue is not isolated. Thanks.
Okay I installed Rtools3.4. Indeed, it functions correctly now. ROpenCVlite could be downloaded! I will make a comment on the link you sent me. Thank you very much!
@JBlefebvre 👍
Can you try to look at https://ci.appveyor.com/project/muschellij2/ropencvlite/build/job/791u6bmstvec9akf for any Warnings (maybe clean these up after running make install
) and
https://ci.appveyor.com/project/muschellij2/ropencvlite/build/job/cinkaohsvpr3jcun for Rtools 3.5 and especially the artifacts, which has the build zipped up: https://ci.appveyor.com/project/muschellij2/ropencvlite/build/job/cinkaohsvpr3jcun/artifacts
@muschellij2 I know about the warnings with Rtools 3.4. Since I'm not planning on submitting to CRAN now, I've ignored them so far.
The error with Rtools 3.5 is the same as the one reported by @JBlefebvre. Did I miss something?
No you didn't - I guess I was just saying you could use 3.5 on Appveyor as a test bed, but I don't know why the error occurred. Likely Rtools 3.5, but it could be how some variable gets set in 3.5 that coordinates with opencv make steps.
On Mon, Apr 8, 2019 at 2:02 PM Simon Garnier notifications@github.com wrote:
@muschellij2 https://github.com/muschellij2 I know about the warnings with Rtools 3.4. Since I'm not planning on submitting to CRAN now, I've ignored them so far.
The error with Rtools 3.5 is the same as the one reported by @JBlefebvre https://github.com/JBlefebvre. Did I miss something?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/swarm-lab/ROpenCVLite/issues/15#issuecomment-480940151, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBnrjWM2lkaMScxM0idCVZnvscX60C3ks5ve4QsgaJpZM4cXZV4 .
@muschellij2 Oh ok. I have set up a virtual Windows 10 machine at work to do my testing. It's faster than waiting for appveyor's results.
This is fixed in the latest release (87aea72). Closing this now.
Hi,
I am trying to install the ROpenCVLite on R in Windows 10 using the instructions: https://swarm-lab.github.io/ROpenCVLite/articles/install.html#installing-ropencvlite.
I succeeded to install latest version of Rtools (4.0) and done devtools::install_github("swarm-lab/ROpenCVLite", force=TRUE)
. However, when I execute library(ROpenCVLite)
I get the following error message:
library(ROpenCVLite)
OpenCV is not installed on this system. Would you like to install it now? This will take several minutes.
1: yes 2: no
Selection: yes cmake version 3.18.0-rc1
CMake suite maintained and supported by Kitware (kitware.com/cmake). OpenCV will be installed in C:/Users/user/Documents/R/win-library/3.5/opencv Removing old OpenCV installation. trying URL 'https://github.com/opencv/opencv/archive/4.3.0.tar.gz' Error: package or namespace load failed for ‘ROpenCVLite’: .onAttach failed in attachNamespace() for 'ROpenCVLite', details: call: utils::download.file("https://github.com/opencv/opencv/archive/4.3.0.tar.gz", error: cannot open URL 'https://github.com/opencv/opencv/archive/4.3.0.tar.gz' In addition: Warning message: In utils::download.file("https://github.com/opencv/opencv/archive/4.3.0.tar.gz", : InternetOpenUrl failed: ''
Paths have been registered in the system:
C:\Rtools\usr\bin C:\Rtools\CMake\bin
Can you please help me with this issue?
@max-poltora It looks like you had a temporary internet issue. R was not able to reach the website that distributes the sources of OpenCV. I just tested it and it seems to be working now.
@sjmgarnier, I tried it again, but the result is the same... However, my internet might be slow: 35 Mbps for download. May it be the reason?
@max-poltora No, it's probably not the reason. Can you run the following command in R and let me know what error message you get?
utils::download.file("https://github.com/opencv/opencv/archive/4.3.0.tar.gz", "~/Desktop/4.3.0.tar.gz")
@sjmgarnier, I get the following error message:
Error in utils::download.file("https://github.com/opencv/opencv/archive/4.3.0.tar.gz", : cannot open destfile '~/Desktop/4.3.0.tar.gz', reason 'No such file or directory'
@sjmgarnier, the issue of this step seems to be solved. I run the command options(download.file.method = "libcurl")
and then library(ROpenCVLite)
. However, now I receive another error message:
WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.3 was found. (Only the following incompatible version(s) of Rtools were found:4.0)
Please download and install Rtools custom from https://cran.r-project.org/bin/windows/Rtools/. Error: package or namespace load failed for ‘ROpenCVLite’: .onAttach failed in attachNamespace() for 'ROpenCVLite', details: call: NULL error: Rtools is not installed.
I think RStudio recommends using:curl::curl_download(url, destfile)
for downloads.
The new error now tells you what you need to do:
Please download and install Rtools custom from https://cran.r-project.org/bin/windows/Rtools/.
@sjmgarnier Yes, Rtools 4.0 is only compatible with R 4.0. You can either upgrade to R 4.0, or remove Rtools 4.0 and replace it with Rtools 3.5.
@sjmgarnier @muschellij2, now I reinstalled the Rtools 3.5, but I have another error:
cmake version 3.18.0-rc1
CMake suite maintained and supported by Kitware (kitware.com/cmake). OpenCV will be installed in C:/Users/user/Documents/R/win-library/3.5/opencv Removing old OpenCV installation. trying URL 'https://github.com/opencv/opencv/archive/4.3.0.tar.gz' Content length 120 bytes downloaded 83.9 MB
-- The CXX compiler identification is unknown -- The C compiler identification is unknown CMake Error at CMakeLists.txt:106 (enable_language): The CMAKE_CXX_COMPILER:
/mingw_64/bin/g++.exe
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:106 (enable_language): The CMAKE_C_COMPILER:
/mingw_64/bin/gcc.exe
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred! See also "C:/Users/user/AppData/Local/Temp/RtmpOURGZt/opencv-4.3.0/build64/CMakeFiles/CMakeOutput.log". See also "C:/Users/user/AppData/Local/Temp/RtmpOURGZt/opencv-4.3.0/build64/CMakeFiles/CMakeError.log". -- The CXX compiler identification is unknown -- The C compiler identification is unknown CMake Error at CMakeLists.txt:106 (enable_language): The CMAKE_CXX_COMPILER:
/mingw_32/bin/g++.exe
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:106 (enable_language): The CMAKE_C_COMPILER:
/mingw_32/bin/gcc.exe
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred! See also "C:/Users/user/AppData/Local/Temp/RtmpOURGZt/opencv-4.3.0/build32/CMakeFiles/CMakeOutput.log". See also "C:/Users/user/AppData/Local/Temp/RtmpOURGZt/opencv-4.3.0/build32/CMakeFiles/CMakeError.log". [1] FALSE
How can I set the path to the compiler? I added another line to PATH C:\Rtools\mingw_64\bin
, but error is still there...
@max-poltora I can't reproduce this error with R 3.5.3. So, in order:
Thanks.
@sjmgarnier, @muschellij2, I have solved the issue. In my case, as far as I understood, the problem was that earlier installed version of Rtools (4.0) has written its path to system variables. I removed it and reinstalled the latest frozen Rtools version 3.5 (I also checked all the checkboxes and allow installator to automatically create a PATH).
Thank you so much for your time and hints.
Hi,
I am working on Windows 10, RStudio 1.1.463, R3.5.3.
I am trying to install ROpenCVlite using this tutorial: https://swarm-lab.github.io/ROpenCVLite/articles/install.html
I have installed Cmake (3.14.1) and Rtools (3.5) . Normally, Paths have been registered in system variable "PATH", as you can see:
I have installed Devtools too on Rstudio, without any problem
When I want to install ROpenCVlite, I have an error message and I don't know why. Here it is:
...
cmake -G 'Unix Makefiles' -DCMAKE_C_COMPILER=C:/Rtools/mingw_64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/Rtools/mingw_64/bin/g++.exe -DCMAKE_RC_COMPILER=C:/Rtools/mingw_64/bin/windres.exe -DCMAKE_MAKE_PROGRAM=C:/Rtools/bin/make.exe -DENABLE_PRECOMPILED_HEADERS=OFF -DENABLE_CXX11=ON -DBUILD_ZLIB=ON -DBUILD_opencv_world=OFF -DBUILD_opencv_contrib_world=OFF -DBUILD_matlab=OFF -DBUILD_opencv_java=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DWITH_MSMF=OFF -DBUILD_PROTOBUF=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=../../../inst/opencv/ ../ -- The CXX compiler identification is GNU 4.9.3 -- The C compiler identification is GNU 4.9.3 -- Check for working CXX compiler: C:/Rtools/mingw_64/bin/g++.exe -- Check for working CXX compiler: C:/Rtools/mingw_64/bin/g++.exe -- broken CMake Error at C:/Rtools/CMake/share/cmake-3.14/Modules/CMakeTestCXXCompiler.cmake:53 (message): The C++ compiler
"C:/Rtools/mingw_64/bin/g++.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/TEMP/Rtmp6jLyuJ/R.INSTALL25dc75f43d6c/ROpenCVLite/src/opencv-4.0.1/build64/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Rtools/bin/make.exe cmTC_76f57/fast /Rtools/bin/make -f CMakeFiles/cmTC_76f57.dir/build.make CMakeFiles/cmTC_76f57.dir/build make: /bin/sh: Command not found make: *** [Makefile:121: cmTC_76f57/fast] Error 127
CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:131 (project)
-- Configuring incomplete, errors occurred! See also "C:/TEMP/Rtmp6jLyuJ/R.INSTALL25dc75f43d6c/ROpenCVLite/src/opencv-4.0.1/build64/CMakeFiles/CMakeOutput.log". See also "C:/TEMP/Rtmp6jLyuJ/R.INSTALL25dc75f43d6c/ROpenCVLite/src/opencv-4.0.1/build64/CMakeFiles/CMakeError.log". ERROR: configuration failed for package 'ROpenCVLite'
What should I do?
I haven't seen this kind of problem in the other posts.
Thank you very much and have a good day!
JB