linux - CMake fails when building OpenCV (Ubuntu) -
i'm trying build opencv cmake when build it, stuff goes wrong , have no idea fix it.
so question is: how fix it?
user@bel-pc:~/opencv/build$ cmake -dbuild_shared_libs=off .. -- cxx compiler identification unknown -- c compiler identification gnu -- check working c compiler: /usr/bin/gcc -- check working c compiler: /usr/bin/gcc -- works -- detecting c compiler abi info -- detecting c compiler abi info - done cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. -- performing test have_cxx_fsigned_char cmake error @ /usr/share/cmake-2.8/modules/cmakecxxinformation.cmake:37 (get_filename_component): get_filename_component called incorrect number of arguments call stack (most recent call first): cmakelists.txt:2 (project) cmake error: cmake_cxx_compiler not set, after enablelanguage cmake error: internal cmake error, trycompile configure of cmake failed -- performing test have_cxx_fsigned_char - failed -- performing test have_c_fsigned_char -- performing test have_c_fsigned_char - success -- looking pthread.h -- looking pthread.h - found -- not find zlib (missing: zlib_library zlib_include_dir) -- looking fseeko -- looking fseeko - found -- looking unistd.h -- looking unistd.h - found -- looking sys/types.h -- looking sys/types.h - found -- looking stdint.h -- looking stdint.h - found -- looking stddef.h -- looking stddef.h - found -- check size of off64_t -- check size of off64_t - failed -- not find tiff (missing: tiff_library tiff_include_dir) cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. -- looking assert.h -- looking assert.h - found -- looking fcntl.h -- looking fcntl.h - found -- looking io.h -- looking io.h - not found -- looking jbg_newlen -- looking jbg_newlen - not found -- looking mmap -- looking mmap - found -- looking search.h -- looking search.h - found -- looking string.h -- looking string.h - found -- looking unistd.h -- looking unistd.h - found -- not find jpeg (missing: jpeg_library jpeg_include_dir) cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. -- found jpeg: libjpeg -- not find jasper (missing: jasper_library jasper_include_dir) cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. -- found zlib: zlib (found version "1.2.7") -- not find png (missing: png_library png_png_include_dir) cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. -- looking semaphore.h -- looking semaphore.h - found -- checking module 'gtk+-2.0' -- package 'gtk+-2.0' not found -- checking module 'gthread-2.0' -- package 'gthread-2.0' not found -- checking module 'gstreamer-base-0.10' -- package 'gstreamer-base-0.10' not found -- checking module 'libdc1394-2' -- package 'libdc1394-2' not found -- checking module 'libdc1394' -- package 'libdc1394' not found -- checking module 'libv4l1' -- package 'libv4l1' not found -- looking linux/videodev.h -- looking linux/videodev.h - not found -- looking linux/videodev2.h -- looking linux/videodev2.h - found -- looking sys/videoio.h -- looking sys/videoio.h - not found -- checking module 'libavcodec' -- package 'libavcodec' not found -- checking module 'libavformat' -- package 'libavformat' not found -- checking module 'libavutil' -- package 'libavutil' not found -- checking module 'libswscale' -- package 'libswscale' not found -- looking libavformat/avformat.h -- looking libavformat/avformat.h - not found -- looking ffmpeg/avformat.h -- looking ffmpeg/avformat.h - not found cmake error @ /usr/share/cmake-2.8/modules/cmakecxxinformation.cmake:37 (get_filename_component): get_filename_component called incorrect number of arguments call stack (most recent call first): cmakelists.txt:2 (project) cmake error: cmake_cxx_compiler not set, after enablelanguage cmake error: internal cmake error, trycompile configure of cmake failed -- found pythoninterp: /usr/bin/python (found suitable version "2.7.3", required "2.0") -- not find pythonlibs (missing: python_include_dirs) (required @ least version "2.7.3") traceback (most recent call last): file "<string>", line 1, in <module> importerror: no module named numpy.distutils -- found apache ant 1.8.2: /usr/bin/ant -- found jni: /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libjawt.so -- not find opencl (missing: opencl_library opencl_include_dir) cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. cmake error: cxx compiler: "cmake_cxx_compiler-notfound" not found. please set cmake_cxx_compiler valid compiler path or name. -- -- general configuration opencv 2.4.6.1 ===================================== -- version control: 2.4.6.1-176-g1c55096 -- -- platform: -- host: linux 3.5.0-37-generic x86_64 -- cmake: 2.8.7 -- cmake generator: unix makefiles -- cmake build tool: /usr/bin/make -- configuration: release -- -- c/c++: -- built dynamic libs?: no -- c++ compiler: cmake_cxx_compiler-notfound -- c++ flags (release): -- c++ flags (debug): -- c compiler: /usr/bin/gcc -- c flags (release): -fsigned-char -o3 -dndebug -- c flags (debug): -fsigned-char -g -- linker flags (release): -- linker flags (debug): -- precompiled headers: no -- -- opencv modules: -- built: core imgproc flann highgui features2d calib3d ml video objdetect contrib photo legacy gpu nonfree java stitching superres ts videostab -- disabled: world -- disabled dependency: - -- unavailable: androidcamera ocl python -- -- gui: -- qt: no -- gtk+ 2.x: no -- gthread : no -- gtkglext: no -- opengl support: no -- -- media i/o: -- zlib: zlib (ver 1.2.7) -- jpeg: libjpeg (ver 62) -- png: build (ver 1.5.12) -- tiff: build (ver 42 - 4.0.2) -- jpeg 2000: build (ver 1.900.1) -- openexr: build (ver 1.7.1) -- -- video i/o: -- dc1394 1.x: no -- dc1394 2.x: no -- ffmpeg: no -- codec: no -- format: no -- util: no -- swscale: no -- gentoo-style: no -- gstreamer: no -- openni: no -- openni primesensor modules: no -- pvapi: no -- gigevisionsdk: no -- unicap: no -- unicap ucil: no -- v4l/v4l2: no/yes -- ximea: no -- xine: no -- -- other third-party libraries: -- use ipp: no -- use eigen: no -- use tbb: no -- use openmp: no -- use gcd no -- use concurrency no -- use c=: no -- use cuda: no -- use opencl: no -- -- python: -- interpreter: /usr/bin/python (ver 2.7.3) -- -- java: -- ant: /usr/bin/ant (ver 1.8.2) -- jni: /usr/lib/jvm/jdk1.7.0_21/include /usr/lib/jvm/jdk1.7.0_21/include/linux /usr/lib/jvm/jdk1.7.0_21/include -- java tests: yes -- -- documentation: -- build documentation: no -- sphinx: no -- pdflatex compiler: no -- -- tests , samples: -- tests: yes -- performance tests: yes -- c/c++ examples: no -- -- install path: /usr/local -- -- cvconfig.h in: /home/user/opencv/build -- ----------------------------------------------------------------- -- -- configuring incomplete, errors occurred!
thanks hetepeperfan able fix problem. turns out missing c++ compiler.
after running sudo apt-get install build-essential , cleaning build folder , rerunning cmake problem fixed.
Comments
Post a Comment