前提・実現したいこと
Ubuntu16 に、OpenCVをインストールしたいのですが、cmake コマンドで、
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- Could NOT find ・・・・・以下省略
などのエラーです。
発生している問題・エラーメッセージ
CMakeError.log
Compilation failed: source file: '/home/user/opencv/opencv-3.3.0/cmake/checks/cxx11.cpp' check option: '' ===== BUILD LOG ===== Change Dir: /home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make" "cmTC_039b6/fast" /usr/bin/make -f CMakeFiles/cmTC_039b6.dir/build.make CMakeFiles/cmTC_039b6.dir/build make[1]: ディレクトリ '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp' に入ります Building CXX object CMakeFiles/cmTC_039b6.dir/cxx11.cpp.o /usr/bin/c++ -o CMakeFiles/cmTC_039b6.dir/cxx11.cpp.o -c /home/user/opencv/opencv-3.3.0/cmake/checks/cxx11.cpp /home/user/opencv/opencv-3.3.0/cmake/checks/cxx11.cpp:4:2: error: #error "C++11 is not supported" #error "C++11 is not supported" ^ /home/user/opencv/opencv-3.3.0/cmake/checks/cxx11.cpp: In function ‘int main()’: /home/user/opencv/opencv-3.3.0/cmake/checks/cxx11.cpp:11:10: error: ‘res’ does not name a type auto res = test(); ^ /home/user/opencv/opencv-3.3.0/cmake/checks/cxx11.cpp:12:12: error: ‘res’ was not declared in this scope return res; ^ CMakeFiles/cmTC_039b6.dir/build.make:65: ターゲット 'CMakeFiles/cmTC_039b6.dir/cxx11.cpp.o' のレシピで失敗しました make[1]: *** [CMakeFiles/cmTC_039b6.dir/cxx11.cpp.o] エラー 1 make[1]: ディレクトリ '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp' から出ます Makefile:126: ターゲット 'cmTC_039b6/fast' のレシピで失敗しました make: *** [cmTC_039b6/fast] エラー 2 ===== END ===== Build output check failed: Regex: 'command line option .* is valid for .* but not for C++' Output line: 'cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++' Compilation failed: source file: '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp/src.cxx' check option: ' -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes' ===== BUILD LOG ===== Change Dir: /home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make" "cmTC_036b0/fast" /usr/bin/make -f CMakeFiles/cmTC_036b0.dir/build.make CMakeFiles/cmTC_036b0.dir/build make[1]: ディレクトリ '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp' に入ります Building CXX object CMakeFiles/cmTC_036b0.dir/src.cxx.o /usr/bin/c++ -O3 -DNDEBUG -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -o CMakeFiles/cmTC_036b0.dir/src.cxx.o -c /home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp/src.cxx cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++ /home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma [-Wunknown-pragmas] #pragma ^ Linking CXX executable cmTC_036b0 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_036b0.dir/link.txt --verbose=1 /usr/bin/c++ -O3 -DNDEBUG CMakeFiles/cmTC_036b0.dir/src.cxx.o -o cmTC_036b0 -rdynamic make[1]: ディレクトリ '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp' から出ます ===== END ===== Build output check failed: Regex: 'command line option .* is valid for .* but not for C++' Output line: 'cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++' Compilation failed: source file: '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp/src.cxx' check option: ' -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wstrict-prototypes' ===== BUILD LOG ===== Change Dir: /home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make" "cmTC_c5c3e/fast" /usr/bin/make -f CMakeFiles/cmTC_c5c3e.dir/build.make CMakeFiles/cmTC_c5c3e.dir/build make[1]: ディレクトリ '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp' に入ります Building CXX object CMakeFiles/cmTC_c5c3e.dir/src.cxx.o /usr/bin/c++ -O3 -DNDEBUG -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wstrict-prototypes -o CMakeFiles/cmTC_c5c3e.dir/src.cxx.o -c /home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp/src.cxx cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ /home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma [-Wunknown-pragmas] #pragma ^ Linking CXX executable cmTC_c5c3e /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c5c3e.dir/link.txt --verbose=1 /usr/bin/c++ -O3 -DNDEBUG CMakeFiles/cmTC_c5c3e.dir/src.cxx.o -o cmTC_c5c3e -rdynamic make[1]: ディレクトリ '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp' から出ます ===== END ===== Build output check failed: Regex: 'command line option .* is valid for .* but not for C' Output line: 'cc1: warning: command line option ‘-Wsign-promo’ is valid for C++/ObjC++ but not for C' Compilation failed: source file: '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp/src.c' check option: ' -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 -Wsign-promo' ===== BUILD LOG ===== Change Dir: /home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make" "cmTC_cbc5d/fast" /usr/bin/make -f CMakeFiles/cmTC_cbc5d.dir/build.make CMakeFiles/cmTC_cbc5d.dir/build make[1]: ディレクトリ '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp' に入ります Building C object CMakeFiles/cmTC_cbc5d.dir/src.c.o /usr/bin/cc -O3 -DNDEBUG -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 -Wsign-promo -o CMakeFiles/cmTC_cbc5d.dir/src.c.o -c /home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp/src.c cc1: warning: command line option ‘-Wsign-promo’ is valid for C++/ObjC++ but not for C /home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp/src.c:1:0: warning: ignoring #pragma [-Wunknown-pragmas] #pragma ^ Linking C executable cmTC_cbc5d /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_cbc5d.dir/link.txt --verbose=1 /usr/bin/cc -O3 -DNDEBUG CMakeFiles/cmTC_cbc5d.dir/src.c.o -o cmTC_cbc5d -rdynamic make[1]: ディレクトリ '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp' から出ます ===== END ===== Build output check failed: Regex: 'command line option .* is valid for .* but not for C' Output line: 'cc1: warning: command line option ‘-Wno-delete-non-virtual-dtor’ is valid for C++/ObjC++ but not for C' Compilation failed: source file: '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp/src.c' check option: ' -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-delete-non-virtual-dtor' ===== BUILD LOG ===== Change Dir: /home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make" "cmTC_6fd79/fast" /usr/bin/make -f CMakeFiles/cmTC_6fd79.dir/build.make CMakeFiles/cmTC_6fd79.dir/build make[1]: ディレクトリ '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp' に入ります Building C object CMakeFiles/cmTC_6fd79.dir/src.c.o /usr/bin/cc -O3 -DNDEBUG -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-delete-non-virtual-dtor -o CMakeFiles/cmTC_6fd79.dir/src.c.o -c /home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp/src.c cc1: warning: command line option ‘-Wno-delete-non-virtual-dtor’ is valid for C++/ObjC++ but not for C /home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp/src.c:1:0: warning: ignoring #pragma [-Wunknown-pragmas] #pragma ^ Linking C executable cmTC_6fd79 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6fd79.dir/link.txt --verbose=1 /usr/bin/cc -O3 -DNDEBUG CMakeFiles/cmTC_6fd79.dir/src.c.o -o cmTC_6fd79 -rdynamic make[1]: ディレクトリ '/home/user/opencv/opencv-3.3.0/build/CMakeFiles/CMakeTmp' から出ます 文字数制限のため以下省略
該当のソースコード
文字数制限のため、URLを記載します。
https://qiita.com/nakasuke_/items/51664807bdd7794db0da
のページの「CMakeの実行」です
試したこと
opencv 3.1.0でも同様でした。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/07/13 05:36