Cmake fails while configuring OpenCV
5,233
I solved it by removing the build folder in which I had previously started cmake but cancelled it during installation. Now it works.
Related videos on Youtube
Author by
Ilia
Updated on September 18, 2022Comments
-
Ilia over 1 year
I'm trying to buid OpenCV and use it in Qt. I have installed all required packages for OpenCV and Qt, after that I tried too run
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local /media/d/Install/opencv-2.4.8
but I got errors:CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:189 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:56 (project) -- The CXX compiler identification is GNU 4.8.2 CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:185 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:56 (project) -- The C compiler identification is GNU 4.8.2 CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:186 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:56 (project) -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:71 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:56 (project) -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:78 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:56 (project) CMake Error at CMakeLists.txt:70 (message): CMake fails to deterimine the bitness of target platform. Please check your CMake and compiler installation. If you are crosscompiling then ensure that your CMake toolchain file correctly sets the compiler details. -- Configuring incomplete, errors occurred!
CMakeLists.txt:56 :
project(OpenCV CXX C)
/usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:189 :
configure_file(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in ${CMAKE_PLATFORM_INFO_DIR}/CMakeSystem.cmake IMMEDIATE @ONLY)
-
steeldriver almost 10 yearsAre you executing
cmake
from a build directory also on/media
? If so, I suspect the problem is that it is on a filesystem such as NTFS that doesn't support Unix-style permission bits (or is mountednoexec
). The compiler/ABI tests are likely trying to create and test minimal executables e.g../CMakeFiles/CompilerIdCXX/a.out
or./CMakeFiles/CMakeDetermineCompilerABI_C.bin
and are failing if those don't execute. -
Carlosin over 4 yearsI have the same problem in WSL, moving source files from NTFS to ext4 solved the problem!
-