Closed monviso closed 1 year ago
@monviso Two questions to get things started. What's the version of the other Cmake on your machine? Can you post the results of the pre-compilation tests here (essentially everything before the lines with a percent progress start being displayed)? I want to make sure that it's using the correct Cmake. In the meantime, I'll try to get a hold of a Windows 10 machine to see if the recommended toolchain has changed.
My apologies, here the right version of the console output
Selection: yes OpenCV will be installed in C:\Users\Matteo\AppData\Local\R\win-library\4.3\ROpenCV Clearing install path. trying URL 'https://github.com/opencv/opencv/archive/4.8.0.tar.gz' downloaded 87.7 MB
trying URL 'https://github.com/opencv/opencv_contrib/archive/4.8.0.tar.gz' downloaded 56.5 MB
-- The CXX compiler identification is GNU 12.3.0 -- The C compiler identification is GNU 12.3.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/rtools43/x86_64-w64-mingw32.static.posix/bin/g++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/rtools43/x86_64-w64-mingw32.static.posix/bin/gcc.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- ocv_init_download: OpenCV source tree is not fetched as git repository. 3rdparty resources will be downloaded from github.com by default. -- Detected processor: AMD64 -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7") -- Found PythonInterp: D:/miniconda3/python.exe (found suitable version "3.10.9", minimum required is "3.2") -- Found PythonLibs: D:/miniconda3/libs/python310.lib (found suitable exact version "3.10.9")
@monviso It says that the Cmake version used for compiling OpenCV is 3.24.3, not 3.27.7. This older version is probably the one that you installed for your Python installation. You can either uninstall the old version to avoid conflicts or change the PATH system variable to prioritize the new version. Once this is done (this may require a reboot, at least of R/RStudio), try installing OpenCV again.
BTW, what's VisualR? All I can find online is an old deprecated package that doesn't depend on ROpenCVLite.
Thanks for this. the only reason I would keep the 3.24.3 is that a python module work at the moment only with that one. So I should change the path system variable. But (sorry if this is going to be a naïve questions), I get lost on how to do that. I do not have any path in my "Environment Variables" setting pointing to cmake; if I run system.PATH from installr I find "C:\Program Files\CMake\bin" that actually point to the 3.27 version. So I am not sure how to proceed.
I know that is is a bit out of ROpenCVLite, but will I really appreciate any help.
Yes, sorry, I am trying to run Rvision.
Thanks
Thanks Matteo
@monviso During the installation of Cmake, did you select "Add CMake to the system PATH for all users"?
@monviso Also, what's the content of the "path" variable in your system variables?
@monviso Here is a short tutorial to access/change your system variables: https://www.imatest.com/support/docs/23-1/editing-system-environment-variables/#Windows
Many thanks for all this info, I really appreciate. Yes, I added the PATH for all users during installation. I checked again and I have the Cmake path along with others in the system variables in "C:\Program Files\CMake\bin" (that is the 3.27) and Rtools in "C:\rtools42\bin". I see from older issue that the space in folder name such as in my "Program Files" folder can cause problem. Is it the case then? SO, I have tried to install Cmake simply in C:/ and ensure that in the system variables the Path was pointing to "C:\CMake\bin", but when I do that R I get the same installation output.
Just for info all the system path content is: C:\VulkanSDK\1.3.261.1\Bin; C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin; C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\libnvvp; C:\Program Files (x86)\Common Files\Oracle\Java\javapath; C:\Users\Matteo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts; C:\Program Files\Common Files\Pleora; C:\Program Files\Common Files\Pleora\eBUS SDK; C:\Program Files (x86)\Common Files\Pleora; C:\Program Files (x86)\Common Files\Pleora\eBUS SDK; C:\Program Files\ImageMagick-7.0.10-Q16; C:\Program Files\Microsoft MPI\Bin\; C:\Program Files (x86)\Intel\iCLS Client\; C:\Program Files\Intel\iCLS Client\; C:\Windows\system32; C:\Windows;C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\; C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL; C:\Program Files\Intel\Intel(R) Management Engine Components\DAL; C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT; C:\Program Files\Intel\Intel(R) Management Engine Components\IPT; C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common; C:\WINDOWS\system32; C:\WINDOWS; C:\WINDOWS\System32\Wbem; C:\WINDOWS\System32\WindowsPowerShell\v1.0\; C:\Program Files (x86)\Windows Live\Shared; C:\Program Files\dotnet\; C:\Program Files\Microsoft SQL Server\130\Tools\Binn\; C:\Program Files\Intel\WiFi\bin\; C:\Program Files\Common Files\Intel\WirelessCommon\; C:\Program Files (x86)\Common Files\FLIR Systems\Intel 1.0\; C:\Program Files\Git\cmd; C:\Program Files\PuTTY\ C:\Program Files\MATLAB\R2021b\runtime\win64; C:\Program Files\MATLAB\R2021b\bin; C:\Program Files\NVIDIA Corporation\Nsight Compute 2022.1.0\; D:\tutorial\COLMAP-3.7-windows-cuda; C:\rtools42\bin; C:\CMake\bin;
Thanks
@monviso Thanks. Please, uninstall RTools 4.2 and install 4.3 instead since you're using R 4.3.
Yes done, but still crashing In the same issue. Thanks
@monviso I can't reproduce the problem here on a Windows 10 machine. Do you happen to have another one you can test the installation process with?
@monviso Ignore my last message, I managed to reproduce the bug after updating RTools 4.3 to its very last version. I will need to explore this further to see if there is an easy fix or not.
Ok many thanks! Feel free to get in touch if you need to run any test
Fixed in b6e4f7227daf16432e3310ede1440dcb1ffd20c5. It may take a few days before it hits CRAN but you can install it from this repo with:
remotes::install_github("swarm-lab/ROpenCVLite")
Hi,
I am trying to install ROpenCVLite to install VisualR. Nonetheless, the installation process crash when I reach the 46% every time. I am working on Windows 10, R version4.3, installr 0.23.4., CMake 3.27.7, RTools4.3.
I followed several times all the procedure suggested: install Cmake, install R tools, then proceed with
install.packages("ROpenCVLite")
thenROpenCVLite::installOpenCV()
.Once running the last command I see during the process some initial test failing but all proceed up to 46%, where I get: [46%] Linking CXX shared library ../../bin/libopencv_core480.dll C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(allocator.cpp.obj):allocator.cpp:(.text+0x18b): undefined reference to
__stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(allocator.cpp.obj):allocator.cpp:(.text+0x2eb): undefined reference to
stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(allocator.cpp.obj):allocator.cpp:(.text+0x343): undefined reference to `stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(allocator.cpp.obj):allocator.cpp:(.text+0x3c0): undefined reference to__stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(allocator.cpp.obj):allocator.cpp:(.text$_ZSt9call_onceIPFvvEJEEvRSt9once_flagOT_DpOT0_[_ZSt9call_onceIPFvvEJEEvRSt9once_flagOT_DpOT0_]+0x8f): undefined reference to
stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(allocator.cpp.obj):allocator.cpp:(.rdata$.refptr.stack_chk_guard[.refptr.stack_chk_guard]+0x0): undefined reference to `stack_chk_guard' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(arena.cpp.obj):arena.cpp:(.text+0x371): undefined reference to__stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(arena.cpp.obj):arena.cpp:(.text+0x110f): undefined reference to
stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(arena.cpp.obj):arena.cpp:(.text+0x1327): undefined reference to `stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(arena.cpp.obj):arena.cpp:(.text+0x1519): undefined reference to__stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(arena.cpp.obj):arena.cpp:(.text+0x166d): undefined reference to
stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(arena.cpp.obj):arena.cpp:(.text+0x1969): more undefined references to `stack_chk_fail' follow C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(exception.cpp.obj):exception.cpp:(.text+0x2e8): undefined reference to__strncat_chk' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(exception.cpp.obj):exception.cpp:(.text+0x336): undefined reference to
strncat_chk' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(exception.cpp.obj):exception.cpp:(.text+0x35f): undefined reference to__strncat_chk' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(governor.cpp.obj):governor.cpp:(.text+0x288): undefined reference to
stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(governor.cpp.obj):governor.cpp:(.text+0x61c): undefined reference to__stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(governor.cpp.obj):governor.cpp:(.text+0x1194): undefined reference to
stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(global_control.cpp.obj):global_control:(.text$_ZN3tbb6detail2r116lifetime_control12apply_activeEy[_ZN3tbb6detail2r116lifetime_control12apply_activeEy]+0x24a): undefined reference to `stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(itt_notify.cpp.obj):itt_notify.cpp:(.text+0x473e): undefined reference to__stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(itt_notify.cpp.obj):itt_notify.cpp:(.text+0x6552): more undefined references to
stack_chk_fail' follow collect2.exe: error: ld returned 1 exit status make[2]: [modules/core/CMakeFiles/opencv_core.dir/build.make:1960: bin/libopencv_core480.dll] Error 1 make[1]: [CMakeFiles/Makefile2:2723: modules/core/CMakeFiles/opencv_core.dir/all] Error 2 make: *** [Makefile:166: all] Error 2 make: Leaving directory '/c/Users/Matteo/AppData/Local/Temp/RtmpQbwFVv/opencv-4.8.0/build64' make: Entering directory '/c/Users/Matteo/AppData/Local/Temp/RtmpQbwFVv/opencv-4.8.0/build64' [ 0%] Built target opencv_dnn_plugins [ 0%] Built target opencv_highgui_plugins Consolidate compiler generated dependencies of target jsimd [ 3%] Built target jsimd Consolidate compiler generated dependencies of target libopenjp2 [ 5%] Built target libopenjp2 [ 5%] Built target opencv_videoio_plugins Consolidate compiler generated dependencies of target zlib [ 7%] Built target zlib Consolidate compiler generated dependencies of target opencv_core [ 7%] Linking CXX shared library ../../bin/libopencv_core480.dll C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(allocator.cpp.obj):allocator.cpp:(.text+0x18b): undefined reference to__stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(allocator.cpp.obj):allocator.cpp:(.text+0x2eb): undefined reference to
stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(allocator.cpp.obj):allocator.cpp:(.text+0x343): undefined reference to `stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(allocator.cpp.obj):allocator.cpp:(.text+0x3c0): undefined reference to__stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(allocator.cpp.obj):allocator.cpp:(.text$_ZSt9call_onceIPFvvEJEEvRSt9once_flagOT_DpOT0_[_ZSt9call_onceIPFvvEJEEvRSt9once_flagOT_DpOT0_]+0x8f): undefined reference to
stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(allocator.cpp.obj):allocator.cpp:(.rdata$.refptr.stack_chk_guard[.refptr.stack_chk_guard]+0x0): undefined reference to `stack_chk_guard' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(arena.cpp.obj):arena.cpp:(.text+0x371): undefined reference to__stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(arena.cpp.obj):arena.cpp:(.text+0x110f): undefined reference to
stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(arena.cpp.obj):arena.cpp:(.text+0x1327): undefined reference to `stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(arena.cpp.obj):arena.cpp:(.text+0x1519): undefined reference to__stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(arena.cpp.obj):arena.cpp:(.text+0x166d): undefined reference to
stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(arena.cpp.obj):arena.cpp:(.text+0x1969): more undefined references to `stack_chk_fail' follow C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(exception.cpp.obj):exception.cpp:(.text+0x2e8): undefined reference to__strncat_chk' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(exception.cpp.obj):exception.cpp:(.text+0x336): undefined reference to
strncat_chk' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(exception.cpp.obj):exception.cpp:(.text+0x35f): undefined reference to__strncat_chk' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(governor.cpp.obj):governor.cpp:(.text+0x288): undefined reference to
stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(governor.cpp.obj):governor.cpp:(.text+0x61c): undefined reference to `stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(governor.cpp.obj):governor.cpp:(.text+0x1194): undefined reference to__stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(global_control.cpp.obj):global_control:(.text$_ZN3tbb6detail2r116lifetime_control12apply_activeEy[_ZN3tbb6detail2r116lifetime_control12apply_activeEy]+0x24a): undefined reference to
stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(itt_notify.cpp.obj):itt_notify.cpp:(.text+0x473e): undefined reference to `stack_chk_fail' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x86_64-w64-mingw32.static.posix/lib/libtbb12.a(itt_notify.cpp.obj):itt_notify.cpp:(.text+0x6552): more undefined references to `__stack_chk_fail' follow collect2.exe: error: ld returned 1 exit status make[2]: [modules/core/CMakeFiles/opencv_core.dir/build.make:1960: bin/libopencv_core480.dll] Error 1 make[1]: [CMakeFiles/Makefile2:2723: modules/core/CMakeFiles/opencv_core.dir/all] Error 2 make: *** [Makefile:166: all] Error 2 make: Leaving directory '/c/Users/Matteo/AppData/Local/Temp/RtmpQbwFVv/opencv-4.8.0/build64' [1] FALSEI am not sure what's going on, I tried checking older issues but none of them seems relevant to my case (apologies if not!). I need to say that I have already installed another version of Cmake in another directory (D:/.... ) that I use to rune some code in Python. I am not sure if this can cause some issues? All this is a bit new for me so I hope to have given all the relevant info.
Thanks