首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >安装opencv失败-粘贴CMakeError.log内容

安装opencv失败-粘贴CMakeError.log内容
EN

Stack Overflow用户
提问于 2020-07-08 08:16:58
回答 2查看 1.6K关注 0票数 0

我尝试了以下方法

代码语言:javascript
运行
复制
sudo apt-get update  
sudo apt-get upgrade  
sudo apt-get install build-essential cmake unzip pkg-config  
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev  
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev  
sudo apt-get install libxvidcore-dev libx264-dev  
sudo apt-get install libgtk-3-dev  
sudo apt-get install libatlas-base-dev gfortran  
sudo apt-get install python3-dev    
cd ~  
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.0.0.zip  
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.0.0.zip  
unzip opencv.zip  
unzip opencv_contrib.zip  
mv opencv-4.0.0 opencv  
mv opencv_contrib-4.0.0 opencv_contrib  
wget https://bootstrap.pypa.io/get-pip.py  
sudo python3 get-pip.py  
sudo pip install virtualenv virtualenvwrapper  
sudo rm -rf ~/get-pip.py ~/.cache/pip  
export WORKON_HOME=$HOME/.virtualenvs  
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3  
source /usr/local/bin/virtualenvwrapper.sh  
echo -e "\n# virtualenv and virtualenvwrapper" >> ~/.bashrc  
echo "export WORKON_HOME=$HOME/.virtualenvs" >> ~/.bashrc  
echo "export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3" >> ~/.bashrc  
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc  
source ~/.bashrc  
mkvirtualenv cv -p python3  
workon cv  
pip install numpy  
cd ~/opencv  
mkdir build  
cd build  

然后,我尝试用命令编译opencv。

OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules _ -D _ -D =/usr/ -D INSTALL_PYTHON_EXAMPLES=ON -D INSTALL_C_EXAMPLES=OFF -D INSTALL_C_EXAMPLES=OFF -D OPENCV_ENABLE_NONFREE=ON -D -D -D BUILD_EXAMPLES=ON .我又下载了,它正在编译。早些时候,我下载到下载文件夹。现在我下载到主文件夹。现在编译的很好。下面的错误不存在。但我错了 -配置不完整,出现错误! 另见"/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeOutput.log". 另见"/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeError.log".

一些文本被删除

CMakeError.log含量

代码语言:javascript
运行
复制
Build output check failed:
    Regex: 'unrecognized .*option'
    Output line: 'cc1plus: warning: unrecognized command line option ‘-Wno-shorten-64-to-32’'
Compilation failed:
    source file: '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx'
    check option: ' -Wno-shorten-64-to-32'
===== BUILD LOG =====
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_838ea/fast"
/usr/bin/make -f CMakeFiles/cmTC_838ea.dir/build.make CMakeFiles/cmTC_838ea.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_838ea.dir/src.cxx.o
/usr/bin/c++     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function  -O3 -DNDEBUG -fPIE   -Wno-shorten-64-to-32 -o CMakeFiles/cmTC_838ea.dir/src.cxx.o -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma   [-Wunknown-pragmas]
 #pragma
 ^
cc1plus: warning: unrecognized command line option ‘-Wno-shorten-64-to-32’
Linking CXX executable cmTC_838ea
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_838ea.dir/link.txt --verbose=1
/usr/bin/c++      -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_838ea.dir/src.cxx.o  -o cmTC_838ea 
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'

===== END =====

Build output check failed:
    Regex: 'unrecognized .*option'
    Output line: 'cc1plus: warning: unrecognized command line option ‘-Wno-enum-compare-switch’'
Compilation failed:
    source file: '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx'
    check option: ' -Wno-enum-compare-switch'
===== BUILD LOG =====
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_668b1/fast"
/usr/bin/make -f CMakeFiles/cmTC_668b1.dir/build.make CMakeFiles/cmTC_668b1.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_668b1.dir/src.cxx.o
/usr/bin/c++     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-invalid-offsetof  -O3 -DNDEBUG -fPIE   -Wno-enum-compare-switch -o CMakeFiles/cmTC_668b1.dir/src.cxx.o -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma   [-Wunknown-pragmas]
 #pragma
 ^
cc1plus: warning: unrecognized command line option ‘-Wno-enum-compare-switch’
Linking CXX executable cmTC_668b1
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_668b1.dir/link.txt --verbose=1
/usr/bin/c++      -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-invalid-offsetof  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_668b1.dir/src.cxx.o  -o cmTC_668b1 
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'

===== END =====

Build output check failed:
    Regex: 'unrecognized .*option'
    Output line: 'cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’'
Compilation failed:
    source file: '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx'
    check option: ' -Wno-inconsistent-missing-override'
===== BUILD LOG =====
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_cbd2d/fast"
/usr/bin/make -f CMakeFiles/cmTC_cbd2d.dir/build.make CMakeFiles/cmTC_cbd2d.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_cbd2d.dir/src.cxx.o
/usr/bin/c++     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-invalid-offsetof -Wno-suggest-override  -O3 -DNDEBUG -fPIE   -Wno-inconsistent-missing-override -o CMakeFiles/cmTC_cbd2d.dir/src.cxx.o -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma   [-Wunknown-pragmas]
 #pragma
 ^
cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’
Linking CXX executable cmTC_cbd2d
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_cbd2d.dir/link.txt --verbose=1
/usr/bin/c++      -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-invalid-offsetof -Wno-suggest-override  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_cbd2d.dir/src.cxx.o  -o cmTC_cbd2d 
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'

===== END =====

Build output check failed:
    Regex: 'unrecognized .*option'
    Output line: 'cc1plus: warning: unrecognized command line option ‘-Wno-implicit-fallthrough’'
Compilation failed:
    source file: '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx'
    check option: ' -Wno-implicit-fallthrough'
===== BUILD LOG =====
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_c8e77/fast"
/usr/bin/make -f CMakeFiles/cmTC_c8e77.dir/build.make CMakeFiles/cmTC_c8e77.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_c8e77.dir/src.cxx.o
/usr/bin/c++     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-invalid-offsetof -Wno-suggest-override  -O3 -DNDEBUG -fPIE   -Wno-implicit-fallthrough -o CMakeFiles/cmTC_c8e77.dir/src.cxx.o -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma   [-Wunknown-pragmas]
 #pragma
 ^
cc1plus: warning: unrecognized command line option ‘-Wno-implicit-fallthrough’
Linking CXX executable cmTC_c8e77
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c8e77.dir/link.txt --verbose=1
/usr/bin/c++      -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-invalid-offsetof -Wno-suggest-override  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_c8e77.dir/src.cxx.o  -o cmTC_c8e77 
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'

===== END =====

Build output check failed:
    Regex: 'unrecognized .*option'
    Output line: 'cc1: warning: unrecognized command line option ‘-Wno-implicit-fallthrough’'
Compilation failed:
    source file: '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.c'
    check option: ' -Wno-implicit-fallthrough'
===== BUILD LOG =====
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_0ad64/fast"
/usr/bin/make -f CMakeFiles/cmTC_0ad64.dir/build.make CMakeFiles/cmTC_0ad64.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_0ad64.dir/src.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG -fPIE   -Wno-implicit-fallthrough -o CMakeFiles/cmTC_0ad64.dir/src.c.o   -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.c
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.c:1:0: warning: ignoring #pragma   [-Wunknown-pragmas]
 #pragma
 ^
cc1: warning: unrecognized command line option ‘-Wno-implicit-fallthrough’
Linking C executable cmTC_0ad64
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0ad64.dir/link.txt --verbose=1
/usr/bin/cc     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_0ad64.dir/src.c.o  -o cmTC_0ad64 
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'

===== END =====

Build output check failed:
    Regex: 'unrecognized .*option'
    Output line: 'cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’'
Compilation failed:
    source file: '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx'
    check option: ' -Wno-unused-private-field'
===== BUILD LOG =====
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_84ab8/fast"
/usr/bin/make -f CMakeFiles/cmTC_84ab8.dir/build.make CMakeFiles/cmTC_84ab8.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_84ab8.dir/src.cxx.o
/usr/bin/c++     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-unused-function -Wno-deprecated-declarations -Wno-overloaded-virtual  -O3 -DNDEBUG -fPIE   -Wno-unused-private-field -o CMakeFiles/cmTC_84ab8.dir/src.cxx.o -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma   [-Wunknown-pragmas]
 #pragma
 ^
cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’
Linking CXX executable cmTC_84ab8
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_84ab8.dir/link.txt --verbose=1
/usr/bin/c++      -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-unused-function -Wno-deprecated-declarations -Wno-overloaded-virtual  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_84ab8.dir/src.cxx.o  -o cmTC_84ab8 
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'

===== END =====

Determining if the CL_VERSION_2_0 exist failed with the following output:
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_6a76e/fast"
/usr/bin/make -f CMakeFiles/cmTC_6a76e.dir/build.make CMakeFiles/cmTC_6a76e.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_6a76e.dir/CheckSymbolExists.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG -fPIE   -o CMakeFiles/cmTC_6a76e.dir/CheckSymbolExists.c.o   -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:47: fatal error: OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h: No such file or directory
compilation terminated.
CMakeFiles/cmTC_6a76e.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_6a76e.dir/CheckSymbolExists.c.o' failed
make[1]: *** [CMakeFiles/cmTC_6a76e.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_6a76e/fast' failed
make: *** [cmTC_6a76e/fast] Error 2

File /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef CL_VERSION_2_0
  return ((int*)(&CL_VERSION_2_0))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the CL_VERSION_1_2 exist failed with the following output:
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_9c7fc/fast"
/usr/bin/make -f CMakeFiles/cmTC_9c7fc.dir/build.make CMakeFiles/cmTC_9c7fc.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_9c7fc.dir/CheckSymbolExists.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG -fPIE   -o CMakeFiles/cmTC_9c7fc.dir/CheckSymbolExists.c.o   -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:47: fatal error: OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h: No such file or directory
compilation terminated.
CMakeFiles/cmTC_9c7fc.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_9c7fc.dir/CheckSymbolExists.c.o' failed
make[1]: *** [CMakeFiles/cmTC_9c7fc.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_9c7fc/fast' failed
make: *** [cmTC_9c7fc/fast] Error 2

File /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef CL_VERSION_1_2
  return ((int*)(&CL_VERSION_1_2))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the CL_VERSION_1_1 exist failed with the following output:
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_83bb4/fast"
/usr/bin/make -f CMakeFiles/cmTC_83bb4.dir/build.make CMakeFiles/cmTC_83bb4.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_83bb4.dir/CheckSymbolExists.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG -fPIE   -o CMakeFiles/cmTC_83bb4.dir/CheckSymbolExists.c.o   -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:47: fatal error: OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h: No such file or directory
compilation terminated.
CMakeFiles/cmTC_83bb4.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_83bb4.dir/CheckSymbolExists.c.o' failed
make[1]: *** [CMakeFiles/cmTC_83bb4.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_83bb4/fast' failed
make: *** [cmTC_83bb4/fast] Error 2

File /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef CL_VERSION_1_1
  return ((int*)(&CL_VERSION_1_1))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the CL_VERSION_1_0 exist failed with the following output:
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_8c594/fast"
/usr/bin/make -f CMakeFiles/cmTC_8c594.dir/build.make CMakeFiles/cmTC_8c594.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_8c594.dir/CheckSymbolExists.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG -fPIE   -o CMakeFiles/cmTC_8c594.dir/CheckSymbolExists.c.o   -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:47: fatal error: OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h: No such file or directory
compilation terminated.
CMakeFiles/cmTC_8c594.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_8c594.dir/CheckSymbolExists.c.o' failed
make[1]: *** [CMakeFiles/cmTC_8c594.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_8c594/fast' failed
make: *** [cmTC_8c594/fast] Error 2

File /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <OpenCL_INCLUDE_DIR-NOTFOUND/CL/cl.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef CL_VERSION_1_0
  return ((int*)(&CL_VERSION_1_0))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the include file sys/videoio.h exists failed with the following output:
Change Dir: /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_369b8/fast"
/usr/bin/make -f CMakeFiles/cmTC_369b8.dir/build.make CMakeFiles/cmTC_369b8.dir/build
make[1]: Entering directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_369b8.dir/CheckIncludeFile.c.o
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG -fPIE   -o CMakeFiles/cmTC_369b8.dir/CheckIncludeFile.c.o   -c /home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:25: fatal error: sys/videoio.h: No such file or directory
compilation terminated.
CMakeFiles/cmTC_369b8.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_369b8.dir/CheckIncludeFile.c.o' failed
make[1]: *** [CMakeFiles/cmTC_369b8.dir/CheckIncludeFile.c.o] Error 1
make[1]: Leaving directory '/home/sandeep/Downloads/opencv/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_369b8/fast' failed
make: *** [cmTC_369b8/fast] Error 2
EN

回答 2

Stack Overflow用户

发布于 2021-06-09 09:40:28

您可以使用pip安装打开的cv。

代码语言:javascript
运行
复制
pip install opencv-python

还可以使用pip安装opencv-contrib。

代码语言:javascript
运行
复制
pip install opencv-contrib-python
票数 0
EN

Stack Overflow用户

发布于 2021-06-09 07:37:08

面对类似的错误,并通过修正这条路径来解决

代码语言:javascript
运行
复制
OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules

注意:如果你没有opencv_contrib文件夹,你可以得到它

代码语言:javascript
运行
复制
git clone https://github.com/opencv/opencv_contrib.git
票数 -2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62790409

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档