Cmake falha ao configurar o OpenCV

1

Estou tentando construir o OpenCV e usá-lo no Qt. Eu instalei todos os pacotes necessários para o OpenCV e Qt, depois disso eu tentei executar também cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local /media/d/Install/opencv-2.4.8 , mas recebi erros:

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)
    
por Ilia 01.06.2014 / 11:49

1 resposta

0

Eu resolvi isso removendo a pasta de compilação na qual eu havia iniciado o cmake, mas cancelei-o durante a instalação. Agora funciona.

    
por Louis M 26.10.2016 / 12:28