前提
OS: Windows10
CMake: 3.25.0
Visual Studio: VS2022 17.3.6
OpenCV: 4.6.0をgithubからダウンロード
実現したいこと
OpenCV+OpenCV contrib4.6.0を使うためにビルドしようとしているのですが、CMakeでOpenCVのソースからConfigureしようとした段階でエラーを吐かれてしまっています。
試しに無視してビルドしてみようとしましたが失敗しました。
手順は下記サイトに従って行っています。
https://swallow-incubate.com/archives/blog/20200508/
発生している問題・エラーメッセージ
赤字部分を抜粋
CMake Warning at cmake/OpenCVDetectPython.cmake:81 (message): CMake's 'find_host_package(PythonInterp 2.7)' found wrong Python version: PYTHON_EXECUTABLE=C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python36_64/python.exe PYTHON_VERSION_STRING=3.6.6 Consider providing the 'PYTHON2_EXECUTABLE' variable via CMake command line or environment variables Call Stack (most recent call first): cmake/OpenCVDetectPython.cmake:271 (find_python) CMakeLists.txt:628 (include)
CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:147 (try_compile): Cannot copy output executable '' to destination specified by COPY_FILE: 'D:/source/opencv-4.6.0/build/CMakeFiles/CheckTypeSize/SIZEOF_SIZE_T.bin' Recorded try_compile output location doesn't exist: D:/source/opencv-4.6.0/build/CMakeFiles/CMakeScratch/TryCompile-3y1slf/Debug/cmTC_1555a.exe Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:277 (__check_type_size_impl) 3rdparty/libjpeg-turbo/CMakeLists.txt:25 (check_type_size) Check size of unsigned long CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:147 (try_compile): Cannot copy output executable '' to destination specified by COPY_FILE: 'D:/source/opencv-4.6.0/build/CMakeFiles/CheckTypeSize/SIZEOF_UNSIGNED_LONG.bin' Recorded try_compile output location doesn't exist: D:/source/opencv-4.6.0/build/CMakeFiles/CMakeScratch/TryCompile-6ypp64/Debug/cmTC_725b5.exe Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:277 (__check_type_size_impl) 3rdparty/libjpeg-turbo/CMakeLists.txt:26 (check_type_size)
CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:147 (try_compile): Cannot copy output executable '' to destination specified by COPY_FILE: 'D:/source/opencv-4.6.0/build/CMakeFiles/CheckTypeSize/SIZEOF_SIGNED_SHORT.bin' Recorded try_compile output location doesn't exist: D:/source/opencv-4.6.0/build/CMakeFiles/CMakeScratch/TryCompile-1obyr6/Debug/cmTC_6cdc3.exe Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:277 (__check_type_size_impl) 3rdparty/libtiff/CMakeLists.txt:64 (check_type_size) Check size of unsigned short CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:147 (try_compile): Cannot copy output executable '' to destination specified by COPY_FILE: 'D:/source/opencv-4.6.0/build/CMakeFiles/CheckTypeSize/SIZEOF_UNSIGNED_SHORT.bin' Recorded try_compile output location doesn't exist: D:/source/opencv-4.6.0/build/CMakeFiles/CMakeScratch/TryCompile-y2c7ru/Debug/cmTC_15d3d.exe Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:277 (__check_type_size_impl) 3rdparty/libtiff/CMakeLists.txt:65 (check_type_size) Check size of signed int CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:147 (try_compile): Cannot copy output executable '' to destination specified by COPY_FILE: 'D:/source/opencv-4.6.0/build/CMakeFiles/CheckTypeSize/SIZEOF_SIGNED_INT.bin' Recorded try_compile output location doesn't exist: D:/source/opencv-4.6.0/build/CMakeFiles/CMakeScratch/TryCompile-poowga/Debug/cmTC_072a9.exe Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:277 (__check_type_size_impl) 3rdparty/libtiff/CMakeLists.txt:66 (check_type_size) Check size of unsigned int CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:147 (try_compile): Cannot copy output executable '' to destination specified by COPY_FILE: 'D:/source/opencv-4.6.0/build/CMakeFiles/CheckTypeSize/SIZEOF_UNSIGNED_INT.bin' Recorded try_compile output location doesn't exist: D:/source/opencv-4.6.0/build/CMakeFiles/CMakeScratch/TryCompile-qz38r9/Debug/cmTC_767f4.exe Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:277 (__check_type_size_impl) 3rdparty/libtiff/CMakeLists.txt:67 (check_type_size) Check size of signed long CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:147 (try_compile): Cannot copy output executable '' to destination specified by COPY_FILE: 'D:/source/opencv-4.6.0/build/CMakeFiles/CheckTypeSize/SIZEOF_SIGNED_LONG.bin' Recorded try_compile output location doesn't exist: D:/source/opencv-4.6.0/build/CMakeFiles/CMakeScratch/TryCompile-dgxtdh/Debug/cmTC_93b24.exe Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:277 (__check_type_size_impl) 3rdparty/libtiff/CMakeLists.txt:68 (check_type_size) Check size of signed long long CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:147 (try_compile): Cannot copy output executable '' to destination specified by COPY_FILE: 'D:/source/opencv-4.6.0/build/CMakeFiles/CheckTypeSize/SIZEOF_SIGNED_LONG_LONG.bin' Recorded try_compile output location doesn't exist: D:/source/opencv-4.6.0/build/CMakeFiles/CMakeScratch/TryCompile-uv78e1/Debug/cmTC_392a7.exe Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:277 (__check_type_size_impl) 3rdparty/libtiff/CMakeLists.txt:70 (check_type_size) Check size of unsigned long long CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:147 (try_compile): Cannot copy output executable '' to destination specified by COPY_FILE: 'D:/source/opencv-4.6.0/build/CMakeFiles/CheckTypeSize/SIZEOF_UNSIGNED_LONG_LONG.bin' Recorded try_compile output location doesn't exist: D:/source/opencv-4.6.0/build/CMakeFiles/CMakeScratch/TryCompile-5u3zyt/Debug/cmTC_161d3.exe Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:277 (__check_type_size_impl) 3rdparty/libtiff/CMakeLists.txt:71 (check_type_size) Check size of unsigned char * CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:147 (try_compile): Cannot copy output executable '' to destination specified by COPY_FILE: 'D:/source/opencv-4.6.0/build/CMakeFiles/CheckTypeSize/SIZEOF_UNSIGNED_CHAR_P.bin' Recorded try_compile output location doesn't exist: D:/source/opencv-4.6.0/build/CMakeFiles/CMakeScratch/TryCompile-3c3ti9/Debug/cmTC_17c5f.exe Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:277 (__check_type_size_impl) 3rdparty/libtiff/CMakeLists.txt:72 (check_type_size) Check size of ptrdiff_t CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:147 (try_compile): Cannot copy output executable '' to destination specified by COPY_FILE: 'D:/source/opencv-4.6.0/build/CMakeFiles/CheckTypeSize/SIZEOF_PTRDIFF_T.bin' Recorded try_compile output location doesn't exist: D:/source/opencv-4.6.0/build/CMakeFiles/CMakeScratch/TryCompile-nqfqw3/Debug/cmTC_82f6f.exe Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.25/Modules/CheckTypeSize.cmake:277 (__check_type_size_impl) 3rdparty/libtiff/CMakeLists.txt:77 (check_type_size)
CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/FindOpenMP.cmake:420 (try_compile): Cannot copy output executable '' to destination specified by COPY_FILE: 'D:/source/opencv-4.6.0/build/CMakeFiles/FindOpenMP/ompver_C.bin' Recorded try_compile output location doesn't exist: D:/source/opencv-4.6.0/build/CMakeFiles/CMakeScratch/TryCompile-qgdw3w/Debug/cmTC_f90ba.exe Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.25/Modules/FindOpenMP.cmake:560 (_OPENMP_GET_SPEC_DATE) C:/Program Files/CMake/share/cmake-3.25/Modules/FindBLAS.cmake:768 (find_package) C:/Program Files/CMake/share/cmake-3.25/Modules/FindLAPACK.cmake:247 (find_package) C:/Program Files/CMake/share/cmake-3.25/Modules/FindLAPACK.cmake:283 (_lapack_find_dependency) cmake/OpenCVFindLAPACK.cmake:176 (find_package) CMakeLists.txt:734 (include)
小一時間調べてみましたが解決せず。なにか分かりましたら教えていただきたいです。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。