I am trying to get orb_slam2_ros to compile and it needed an OpenCV version higher than 2.3. I have 4.2.0 but it doesn't work but according to ROS, it has been tested to work on 2.4.11. Here is what I did:
Download the source zip file.
Extract it.
Go into the directory and create a build folder.
Go into the build folder and run cmake ...
There is gives me this:
CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:85 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:84 (include)
CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:86 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:84 (include)
CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:89 (math):
math cannot parse the expression: "*100 + ": syntax error, unexpected
exp_TIMES (1).
Call Stack (most recent call first):
CMakeLists.txt:84 (include)
-- Detected version of GNU GCC: (ERROR)
-- Found OpenEXR: /usr/lib/x86_64-linux-gnu/libIlmImf.so
-- checking for module 'gstreamer-video-1.0'
-- package 'gstreamer-video-1.0' not found
-- checking for module 'gstreamer-app-1.0'
-- package 'gstreamer-app-1.0' not found
-- checking for module 'gstreamer-riff-1.0'
-- package 'gstreamer-riff-1.0' not found
-- checking for module 'gstreamer-pbutils-1.0'
-- package 'gstreamer-pbutils-1.0' not found
-- checking for module 'gstreamer-base-0.10'
-- package 'gstreamer-base-0.10' not found
-- checking for module 'gstreamer-video-0.10'
-- package 'gstreamer-video-0.10' not found
-- checking for module 'gstreamer-app-0.10'
-- package 'gstreamer-app-0.10' not found
-- checking for module 'gstreamer-riff-0.10'
-- package 'gstreamer-riff-0.10' not found
-- checking for module 'gstreamer-pbutils-0.10'
-- package 'gstreamer-pbutils-0.10' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
--
-- General configuration for OpenCV 2.4.11 =====================================
-- Version control: unknown
--
-- Platform:
-- Host: Linux 5.8.0-41-generic x86_64
-- CMake: 3.16.3
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: Release
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: /usr/bin/c++ (ver 9.3.0)
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /usr/bin/cc
-- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release):
-- Linker flags (Debug):
-- Precompiled headers: YES
--
-- OpenCV modules:
-- To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib stitching superres ts videostab
-- Disabled: world
-- Disabled by dependency: -
-- Unavailable: androidcamera dynamicuda java python viz
--
-- GUI:
-- QT: NO
-- GTK+ 2.x: YES (ver 2.24.32)
-- GThread : YES (ver 2.64.6)
-- GtkGlExt: NO
-- OpenGL support: NO
-- VTK support: NO
--
-- Media I/O:
-- ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)
-- JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )
-- PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.37)
-- TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 4.1.0)
-- JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
-- OpenEXR: /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 2.3.0)
--
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: YES (ver 2.2.5)
-- FFMPEG: YES
-- codec: YES (ver 58.54.100)
-- format: YES (ver 58.29.100)
-- util: YES (ver 56.31.100)
-- swscale: YES (ver 5.5.100)
-- gentoo-style: YES
-- GStreamer: NO
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: Using libv4l1 (ver 1.18.0) / libv4l2 (ver 1.18.0)
-- XIMEA: NO
-- Xine: NO
--
-- Other third-party libraries:
-- Use IPP: NO
-- Use Eigen: YES (ver 3.3.7)
-- Use TBB: NO
-- Use OpenMP: NO
-- Use GCD NO
-- Use Concurrency NO
-- Use C=: NO
-- Use Cuda: NO
-- Use OpenCL: YES
--
-- OpenCL:
-- Version: dynamic
-- Include path: /home/dragonros/Downloads/SLAM_DEPS/opencv-2.4.11/3rdparty/include/opencl/1.2
-- Use AMD FFT: NO
-- Use AMD BLAS: NO
--
-- Python:
-- Interpreter: /usr/bin/python2 (ver )
--
-- Java:
-- ant: NO
-- JNI: /usr/lib/jvm/java-8-openjdk-amd64/include /usr/lib/jvm/java-8-openjdk-amd64/include/linux /usr/lib/jvm/java-8-openjdk-amd64/include
-- Java tests: NO
--
-- Documentation:
-- Build Documentation: NO
-- Sphinx: NO
-- PdfLaTeX compiler: NO
-- Doxygen: NO
--
-- Tests and samples:
-- Tests: YES
-- Performance tests: YES
-- C/C++ Examples: NO
--
-- Install path: /usr/local
--
-- cvconfig.h is in: /home/dragonros/Downloads/SLAM_DEPS/build
-- -----------------------------------------------------------------
--
-- Configuring incomplete, errors occurred!
See also "/home/dragonros/Downloads/SLAM_DEPS/build/CMakeFiles/CMakeOutput.log".
See also "/home/dragonros/Downloads/SLAM_DEPS/build/CMakeFiles/CMakeError.log".
Am I compiling it wrong? If not, how can I resolve this error?
You need to change opencv2.4.13/cmake/OpenCVDetectCXXCompiler.cmake (not sure which line) dumpversion to dumpfullversion
Explanation is that
In gcc with higher version, dumpversion function can't get true full
version number of compiler so that cmake progress will fail
Recommendation: On github, there plenty of refactored versions for both 4.2.0 and others. I recommend to upgrade to newer OpenCV versions for orb_slam_ros. Cmake lists and source files should be changed respectively.
I would like to link opencv statically in my c++ program so user does not have to download opencv themselves.
I have tried everything on internet to try to use opencv static library in my c++ program but it is not working.
I have compiled the opencv static library with -DBUILD_SHARED_LIBS=OFF to generate opencv lib files in /usr/local/lib. All of the files has .a extension. I moved these files to a folder in my program and linked it with eclipse with ("${workspace_loc:/${ProjName}/opencv lib}")
I have included -ljpeg -lpng -ltiff -lzlib -lpthread -lrt -ldl -lz -lm
I have put -static flag
I tried to link /usr/local/include/opencv and /usr/local/bin instead
The error message shown a bunch of code like
...
sum.cpp:(.text._ZN2cv3sumERKNS_11_InputArrayE+0xb19): undefined reference to `ippicviSum_16s_C4R'
...
and
/home/vivian/cuda-workspace/AutoVideoAnalyze_v4/opencv lib/libdl.a(dlopen.o): In function dlopen':
(.text+0x5): undefined reference to__dlopen'
/home/vivian/cuda-workspace/AutoVideoAnalyze_v4/opencv lib/libdl.a(dlclose.o): In function dlclose':
(.text+0x1): undefined reference to__dlclose'
/home/vivian/cuda-workspace/AutoVideoAnalyze_v4/opencv lib/libdl.a(dlsym.o): In function dlsym':
(.text+0x5): undefined reference to__dlsym'
collect2: error: ld returned 1 exit status
make: *** [AutoVideoAnalyze_v4] Error 1
I have tried many combination and different ways on google but nothing works. Have anyone actually linked opencv statically on their c++ program? Can you share your work please?
Finally linked opencv statically i eclipse! I used Opencv Cuda, IPP, ffmpeg and many other libraries so there are more libraries to include!
gcc c++ linker: Libraries(-l):
opencv_cudabgsegm, opencv_cudaobjdetect ,opencv_cudastereo, opencv_stitching, opencv_cudafeatures2d, opencv_superres, opencv_cudacodec, opencv_videostab, opencv_cudaoptflow, opencv_cudalegacy, opencv_cudawarping, opencv_aruco, opencv_bgsegm, opencv_bioinspired, opencv_ccalib, opencv_cvv, opencv_dnn_objdetect, opencv_dpm, opencv_face, opencv_photo, opencv_cudaimgproc, opencv_cudafilters, opencv_freetype, opencv_fuzzy, opencv_hdf, opencv_hfs, opencv_img_hash, opencv_line_descriptor, opencv_optflow, opencv_reg, opencv_rgbd, opencv_saliency, opencv_stereo, opencv_structured_light, opencv_phase_unwrapping, opencv_surface_matching, opencv_tracking, opencv_datasets, opencv_text, opencv_dnn, opencv_plot, opencv_xfeatures2d, opencv_shape, opencv_video, opencv_ml, opencv_cudaarithm, opencv_ximgproc, opencv_calib3d, opencv_features2d, opencv_highgui, opencv_videoio, opencv_flann, opencv_xobjdetect, opencv_imgcodecs, opencv_objdetect, opencv_xphoto, opencv_imgproc, opencv_core, opencv_cudev, libprotobuf, GLU, GL, gstpbutils-1.0, gstriff-1.0, gstapp-1.0, gstvideo-1.0, gstbase-1.0, gstreamer-1.0, gobject-2.0, glib-2.0, avcodec, avformat, swscale, avutil, avfilter, swresample, avresample, avdevice, postproc, m, z, x264, lzma, rt, dc1394, tbb, gphoto2_port, gphoto2, xine, jpeg, webp, png, tiff, jasper, Imath, hdf5, lept, sz, IlmImf, cudart, nppc, nppial, nppicc, nppicom, nppidei, nppif, nppig, nppim, nppist, nppisu, nppitc, npps, cublas, cufft, ippiw, ippicv, ittnotify, dl, pthread
Library search path (-L):
/usr/include, /usr/lib/x86_64-linux-gnu, /usr/lib/x86_64-linux-gnu/hdf5/serial/, /usr/local/share/OpenCV/3rdparty/lib, /usr/local/cuda-9.2/lib64, /usr/local/lib
If you want to know what library do you need to include, you can look at the General configuration that looks like the script below (*appear when you are building opencv) and include every library in the script into the program that you want to link opencv statically.
General configuration for OpenCV 3.4.2 =====================================
-- Version control: 3.4.2
--
-- Extra modules:
-- Location (extra): /home/vivian/Downloads/opencv_contrib/modules
-- Version control (extra): 3.4.2
--
-- Platform:
-- Timestamp: 2019-01-17T01:23:08Z
-- Host: Linux 4.15.0-43-generic x86_64
-- CMake: 3.10.2
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: RELEASE
--
-- CPU/HW features:
-- Baseline: SSE SSE2 SSE3
-- requested: SSE3
-- Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
-- requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
-- SSE4_1 (3 files): + SSSE3 SSE4_1
-- SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
-- FP16 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
-- AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
-- AVX2 (9 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
-- AVX512_SKX (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_SKX
--
-- C/C++:
-- Built as dynamic libs?: NO
-- C++11: YES
-- C++ Compiler: /usr/bin/c++ (ver 7.3.0)
-- C++ flags (Release): -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 -Wsuggest-override -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -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 -Wsuggest-override -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /usr/bin/cc
-- C flags (Release): -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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release):
-- Linker flags (Debug):
-- ccache: NO
-- Precompiled headers: NO
-- Extra dependencies: /usr/lib/x86_64-linux-gnu/libtbb.so /usr/lib/x86_64-linux-gnu/libcuda.so /usr/lib/x86_64-linux-gnu/libnvcuvid.so Qt5::Test Qt5::Concurrent Qt5::OpenGL /usr/lib/x86_64-linux-gnu/libwebp.so /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libtiff.so /usr/lib/x86_64-linux-gnu/libjasper.so /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so gstbase-1.0 gstreamer-1.0 gobject-2.0 glib-2.0 gstvideo-1.0 gstapp-1.0 gstriff-1.0 gstpbutils-1.0 dc1394 xine avformat z avcodec lzma swresample swscale avutil avresample gphoto2 gphoto2_port Qt5::Core Qt5::Gui Qt5::Widgets freetype harfbuzz /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so /usr/lib/x86_64-linux-gnu/libpthread.so /usr/lib/x86_64-linux-gnu/libsz.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libdl.so /usr/lib/x86_64-linux-gnu/libm.so tesseract lept dl m pthread rt /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGLU.so cudart nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/local/cuda-9.2/lib64
-- 3rdparty dependencies: ittnotify libprotobuf ippiw ippicv
--
-- OpenCV modules:
-- To be built: aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv datasets dnn dnn_objdetect dpm face features2d flann freetype fuzzy hdf hfs highgui img_hash imgcodecs imgproc java java_bindings_generator line_descriptor ml objdetect optflow phase_unwrapping photo plot python2 python3 python_bindings_generator reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
-- Disabled: js world
-- Disabled by dependency: -
-- Unavailable: cnn_3dobj matlab ovis sfm viz
-- Applications: tests perf_tests apps
-- Documentation: NO
-- Non-free algorithms: NO
--
-- GUI:
-- QT: YES (ver 5.9.5)
-- QT OpenGL support: YES (Qt5::OpenGL 5.9.5)
-- GTK+: NO
-- OpenGL support: YES (/usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGLU.so)
-- VTK support: NO
--
-- Media I/O:
-- ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)
-- JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 80)
-- WEBP: /usr/lib/x86_64-linux-gnu/libwebp.so (ver encoder: 0x020e)
-- PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.34)
-- TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.0.9)
-- JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
-- OpenEXR: /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 2.2.0)
-- HDR: YES
-- SUNRASTER: YES
-- PXM: YES
--
-- Video I/O:
-- DC1394: YES (ver 2.2.5)
-- FFMPEG: YES
-- avcodec: YES (ver 58.25.100)
-- avformat: YES (ver 58.17.103)
-- avutil: YES (ver 56.19.100)
-- swscale: YES (ver 5.2.100)
-- avresample: YES (ver 3.7.0)
-- GStreamer:
-- base: YES (ver 1.14.1)
-- video: YES (ver 1.14.1)
-- app: YES (ver 1.14.1)
-- riff: YES (ver 1.14.1)
-- pbutils: YES (ver 1.14.1)
-- libv4l/libv4l2: NO
-- v4l/v4l2: linux/videodev2.h
-- Xine: YES (ver 1.2.8)
-- gPhoto2: YES
--
-- Parallel framework: TBB (ver 2017.0 interface 9107)
--
-- Trace: YES (with Intel ITT)
--
-- Other third-party libraries:
-- Intel IPP: 2017.0.3 [2017.0.3]
-- at: /home/vivian/Downloads/opencv/build/3rdparty/ippicv/ippicv_lnx
-- Intel IPP IW: sources (2017.0.3)
-- at: /home/vivian/Downloads/opencv/build/3rdparty/ippicv/ippiw_lnx
-- Lapack: NO
-- Eigen: YES (ver 3.3.4)
-- Custom HAL: NO
-- Protobuf: build (3.5.1)
--
-- NVIDIA CUDA: YES (ver 9.2, CUFFT CUBLAS NVCUVID FAST_MATH)
-- NVIDIA GPU arch: 61
-- NVIDIA PTX archs:
--
-- OpenCL: YES (no extra features)
-- Include path: /home/vivian/Downloads/opencv/3rdparty/include/opencl/1.2
-- Link libraries: Dynamic load
--
-- Python 2:
-- Interpreter: /usr/bin/python2.7 (ver 2.7.15)
-- Libraries: /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.15rc1)
-- numpy: /home/vivian/.local/lib/python2.7/site-packages/numpy/core/include (ver 1.15.2)
-- packages path: lib/python2.7/dist-packages
--
-- Python 3:
-- Interpreter: /usr/bin/python3 (ver 3.6.7)
-- Libraries: /usr/lib/x86_64-linux-gnu/libpython3.6m.so (ver 3.6.7)
-- numpy: /home/vivian/.local/lib/python3.6/site-packages/numpy/core/include (ver 1.15.4)
-- packages path: lib/python3.6/dist-packages
--
-- Python (for build): /usr/bin/python2.7
--
-- Java:
-- ant: /usr/bin/ant (ver 1.10.3)
-- JNI: /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include
-- Java wrappers: YES
-- Java tests: YES
--
-- Matlab: NO
--
-- Install to: /usr/local
I'm trying to compile opencv with CUDA 8.0 support (I compiled it successfully without CUDA). Since I need only cv::cuda::SURF_CUDA and cv::xfeatures2d::SURF, I disabled most of the modules.
This is my cmake configuration:
-- General configuration for OpenCV 3.2.0-dev =====================================
-- Version control: 3.2.0-168-g47ae5f1
--
-- Extra modules:
-- Location (extra): /home/luca/ParallelOpenCV/opencv_contrib/modules
-- Version control (extra): 3.2.0-55-g8b74484-dirty
--
-- Platform:
-- Timestamp: 2017-02-16T10:10:04Z
-- Host: Linux 4.4.0-62-generic x86_64
-- CMake: 3.5.1
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: RelWithDebInfo
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: /usr/bin/c++ (ver 5.4.0)
-- C++ flags (Release): -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 -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -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 -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /usr/bin/cc
-- C flags (Release): -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 -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fopenmp -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -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 -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fopenmp -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release):
-- Linker flags (Debug):
-- ccache: NO
-- Precompiled headers: YES
-- Extra dependencies: /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libz.so gtk-x11-2.0 gdk-x11-2.0 pangocairo-1.0 atk-1.0 cairo gdk_pixbuf-2.0 gio-2.0 pangoft2-1.0 pango-1.0 gobject-2.0 glib-2.0 fontconfig freetype gthread-2.0 avcodec-ffmpeg avformat-ffmpeg avutil-ffmpeg swscale-ffmpeg dl m pthread rt cudart nppc nppi npps cublas cufft -L/usr/local/cuda-8.0/lib64
-- 3rdparty dependencies: libjpeg libwebp libtiff libjasper IlmImf
--
-- OpenCV modules:
-- To be built: cudev core cudaarithm flann imgproc ml video cudabgsegm cudafilters cudaimgproc cudawarping imgcodecs shape videoio cudacodec highgui objdetect xobjdetect features2d calib3d cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo xfeatures2d
-- Disabled: photo stitching superres ts videostab world aruco bgsegm bioinspired ccalib contrib_world datasets dnn dpm face freetype fuzzy line_descriptor matlab optflow phase_unwrapping plot reg rgbd saliency stereo structured_light surface_matching text tracking ximgproc xphoto
-- Disabled by dependency: -
-- Unavailable: java python2 python3 viz cnn_3dobj cvv hdf sfm
--
-- GUI:
-- QT: NO
-- GTK+ 2.x: YES (ver 2.24.30)
-- GThread : YES (ver 2.48.1)
-- GtkGlExt: NO
-- OpenGL support: NO
-- VTK support: NO
--
-- Media I/O:
-- ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8)
-- JPEG: libjpeg (ver 90)
-- WEBP: build (ver 0.3.1)
-- PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.54)
-- TIFF: build (ver 42 - 4.0.2)
-- JPEG 2000: build (ver 1.900.1)
-- OpenEXR: build (ver 1.7.1)
-- GDAL: NO
-- GDCM: NO
--
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: NO
-- FFMPEG: YES
-- avcodec: YES (ver 56.60.100)
-- avformat: YES (ver 56.40.101)
-- avutil: YES (ver 54.31.100)
-- swscale: YES (ver 3.1.101)
-- avresample: NO
-- GStreamer: NO
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- OpenNI2: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- Aravis SDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: NO/YES
-- XIMEA: NO
-- Xine: NO
-- gPhoto2: NO
--
-- Parallel framework: OpenMP
--
-- Other third-party libraries:
-- Use IPP: 9.0.1 [9.0.1]
-- at: /home/luca/ParallelOpenCV/opencv/build/3rdparty/ippicv/ippicv_lnx
-- Use IPP Async: NO
-- Use VA: NO
-- Use Intel VA-API/OpenCL: NO
-- Use Lapack: NO
-- Use Eigen: YES (ver 3.2.92)
-- Use Cuda: YES (ver 8.0)
-- Use OpenCL: YES
-- Use OpenVX: NO
-- Use custom HAL: NO
--
-- NVIDIA CUDA
-- Use CUFFT: YES
-- Use CUBLAS: YES
-- USE NVCUVID: NO
-- NVIDIA GPU arch: 20 30 35 37 50 52 60 61
-- NVIDIA PTX archs:
-- Use fast math: YES
--
-- OpenCL: <Dynamic loading of OpenCL library>
-- Include path: /home/luca/ParallelOpenCV/opencv/3rdparty/include/opencl/1.2
-- Use AMDFFT: NO
-- Use AMDBLAS: NO
--
-- Python 2:
-- Interpreter: /usr/bin/python2.7 (ver 2.7.12)
--
-- Python 3:
-- Interpreter: /usr/bin/python3 (ver 3.5.2)
--
-- Python (for build): /usr/bin/python2.7
--
-- Java:
-- ant: NO
-- JNI: /usr/lib/jvm/java-8-oracle/include /usr/lib/jvm/java-8-oracle/include/linux /usr/lib/jvm/java-8-oracle/include
-- Java wrappers: NO
-- Java tests: NO
--
-- Matlab:
-- mex: /usr/local/MATLAB/R2016b/bin/mex
-- Compiler/generator: Not working (bindings will not be generated)
--
-- Documentation:
-- Doxygen: NO
--
-- Tests and samples:
-- Tests: NO
-- Performance tests: NO
-- C/C++ Examples: NO
--
-- Install path: /home/luca/ParallelOpenCV/parallelOpenCV
--
-- cvconfig.h is in: /home/luca/ParallelOpenCV/opencv/build
-- -----------------------------------------------------------------
--
However, if I run make or make install it stops the process at 100% (without install anything). This is the output:
Scanning dependencies of target opencv_cudalegacy
[ 97%] Building CXX object modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/bm.cpp.o
[ 97%] Building CXX object modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/gmg.cpp.o
[ 97%] Building CXX object modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/interpolate_frames.cpp.o
[ 97%] Building CXX object modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/calib3d.cpp.o
[ 97%] Building CXX object modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/image_pyramid.cpp.o
[ 98%] Building CXX object modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/bm_fast.cpp.o
[ 98%] Building CXX object modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/graphcuts.cpp.o
[ 98%] Building CXX object modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/NCV.cpp.o
[ 98%] Building CXX object modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/needle_map.cpp.o
[ 98%] Building CXX object modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/fgd.cpp.o
[ 99%] Linking CXX shared library ../../lib/libopencv_cudalegacy.so
[ 99%] Built target opencv_cudalegacy
[ 99%] Building NVCC (Device) object modules/cudaobjdetect/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_lbp.cu.o
[ 99%] Building NVCC (Device) object modules/cudaoptflow/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_tvl1flow.cu.o
[ 99%] Building NVCC (Device) object modules/cudaoptflow/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_pyrlk.cu.o
[ 99%] Building NVCC (Device) object modules/cudaoptflow/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_farneback.cu.o
[ 99%] Building NVCC (Device) object modules/cudaobjdetect/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_hog.cu.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
Scanning dependencies of target opencv_cudaobjdetect
[ 99%] Building CXX object modules/cudaobjdetect/CMakeFiles/opencv_cudaobjdetect.dir/src/cascadeclassifier.cpp.o
[ 99%] Building CXX object modules/cudaobjdetect/CMakeFiles/opencv_cudaobjdetect.dir/src/hog.cpp.o
[ 99%] Linking CXX shared library ../../lib/libopencv_cudaobjdetect.so
[ 99%] Built target opencv_cudaobjdetect
Scanning dependencies of target opencv_cudaoptflow
[ 99%] Building CXX object modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/src/tvl1flow.cpp.o
[ 99%] Building CXX object modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/src/farneback.cpp.o
[ 99%] Building CXX object modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/src/brox.cpp.o
[ 99%] Building CXX object modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/src/pyrlk.cpp.o
[100%] Linking CXX shared library ../../lib/libopencv_cudaoptflow.so
[100%] Built target opencv_cudaoptflow
And then it suddenly finish it, without install nothing! And if I run make or make install again, it starts from the scratch again. Notice this doesn't happens without CUDA.
Why this happens?
cmake had problems to install the built libraries because I didn't delete the previous objects in the install location. The problem was solved once I manually removed them (even thought I believed make install could have overwritten them).
I just installed OpenCV 2.4.7 with OpenNI and primesense Sensor as it can be seen in the following build information.
I have problems grabbing from a VideoCapture object. For instance, if I run the openni_capture example, I get "Can not grab images." but I get info about the depth and RGB cameras, so I think I'm getting the VideoCapture object properly opened, but by the time it tries to grab an image, the grab function returns 0.
I am using an Asus Xtion Pro Live and OpenNI and Sensor are working properly since I am able to run examples such as NiViewer.
I would appreciate some help with this problem.
Thank you!
General configuration for OpenCV 2.4.7 =====================================
Version control: unknown
Platform:
Host: Linux 3.5.0-47-generic x86_64
CMake: 2.8.9
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/make
Configuration: Release
C/C++:
Built as dynamic libs?: YES
C++ Compiler: /usr/bin/c++ (ver 4.7.2)
C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG -ggdb3
C Compiler: /usr/bin/gcc
C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG -ggdb3
Linker flags (Release):
Linker flags (Debug):
Precompiled headers: YES
OpenCV modules:
To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib java python stitching superres ts videostab
Disabled: world
Disabled by dependency: -
Unavailable: androidcamera
GUI:
QT: NO
GTK+ 2.x: YES (ver 2.24.13)
GThread : YES (ver 2.34.1)
GtkGlExt: NO
OpenGL support: NO
Media I/O:
ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.7)
JPEG: libjpeg (ver 62)
PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.49)
TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 4.0.2)
JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
OpenEXR: build (ver 1.7.1)
Video I/O:
DC1394 1.x: NO
DC1394 2.x: YES (ver 2.2.0)
FFMPEG: YES
codec: YES (ver 53.35.0)
format: YES (ver 53.21.1)
util: YES (ver 51.22.2)
swscale: YES (ver 2.1.0)
gentoo-style: YES
GStreamer:
base: YES (ver 0.10.36)
app: YES (ver 0.10.36)
video: YES (ver 0.10.36)
OpenNI: YES (ver 1.5.7, build 10)
OpenNI PrimeSensor Modules: YES (/usr/lib/libXnCore.so)
PvAPI: NO
GigEVisionSDK: NO
UniCap: NO
UniCap ucil: NO
V4L/V4L2: Using libv4l (ver 0.8.8)
XIMEA: NO
Xine: NO
Other third-party libraries:
Use IPP: NO
Use Eigen: YES (ver 3.0.93)
Use TBB: NO
Use OpenMP: NO
Use GCD NO
Use Concurrency NO
Use C=: NO
Use Cuda: NO
Use OpenCL: YES
OpenCL:
Version: dynamic
Include path: /home/xxx/imageproc/opencv-2.4.7/3rdparty/include/opencl/1.2
Use AMD FFT: NO
Use AMD BLAS: NO
Python:
Interpreter: /usr/bin/python2 (ver 2.7.3)
Libraries: /usr/lib/libpython2.7.so (ver 2.7.3)
numpy: /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.6.2)
packages path: lib/python2.7/dist-packages
Java:
ant: /usr/bin/ant (ver 1.8.2)
JNI: /usr/lib/jvm/java-6-openjdk/include /usr/lib/jvm/java-6-openjdk/include /usr/lib/jvm/java-6-openjdk/include
Java tests: YES
Documentation:
Build Documentation: NO
Sphinx: NO
PdfLaTeX compiler: /usr/bin/pdflatex
Tests and samples:
Tests: YES
Performance tests: YES
C/C++ Examples: YES
Install path: /usr/local
cvconfig.h is in: /home/xxx/imageproc/opencv-2.4.7/release
I instantiate the videocapture and try to grab an image as follows:
VideoCapture capture;
capture.open(CV_CAP_OPENNI);
if ( !capture.isOpened() )
{
cout << "Error opening capture" << endl;
return -1;
}
if( !capture.grab() )
{
cout << "Can not grab image" << endl;
}
Based on your code my guess is that will use the kinect openni driver as opposed to the asus openni driver
How about this:
VideoCapture capture;
capture.open(CV_CAP_OPENNI_ASUS);
if ( !capture.isOpened() )
{
cout << "Error opening capture" << endl;
return -1;
}
if( !capture.grab() )
{
cout << "Can not grab image" << endl;
}
I have managed to use two asus xtion pro sensors with opencv in the past, you can see my test code here.
Also, these are the values from the highui types header, with comments:
CV_CAP_OPENNI =900, // OpenNI (for Kinect)
CV_CAP_OPENNI_ASUS =910, // OpenNI (for Asus Xtion)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
My steps for installing OpenCV on my Machine (MBP, 15", 2.5 GHz i7, 16GB RAM, AMD Radeon HD 6770M, 128GB SSD)
i install git command line tools
latest macports version installed
cmake installed with $ sudo port install cmake
clone repo of opencv $ git clone git://code.opencv.org/opencv.git
after repo is on my machine, I changed to this directory and make a new directory
$ cd opencv $ mkdir build $ cd build
then I run $ cmake -G “Unix Makefiles” ../
after that I get
`-- checking for module 'libdc1394-2'
-- package 'libdc1394-2' not found
-- checking for module 'libdc1394'
-- package 'libdc1394' not found
-- checking for module 'libv4l1'
-- package 'libv4l1' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - not found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- checking for module 'libavcodec'
-- package 'libavcodec' not found
-- checking for module 'libavformat'
-- package 'libavformat' not found
-- checking for module 'libavutil'
-- package 'libavutil' not found
-- checking for module 'libswscale'
-- package 'libswscale' not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- Could NOT find PythonLibs: Found unsuitable version "2.7.2", but required is exact version "2.7.3" (found /usr/lib/libpython2.7.dylib)
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named numpy.distutils
-- Found apache ant 1.8.2: /usr/bin/ant
-- General configuration for OpenCV 2.4.9 =====================================
-- Version control: 2.4.4-642-g061dd7e
-- Platform:
-- Host: Darwin 12.2.0 i386
-- CMake: 2.8.10
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: Release
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: /usr/bin/c++ (ver 4.2.0)
-- C++ flags (Release): -W -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 -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -fno-omit-frame-pointer -msse -msse2 -msse3 -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -W -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 -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -fno-omit-frame-pointer -msse -msse2 -msse3 -g -O0 -DDEBUG -D_DEBUG -ggdb3
-- C Compiler: /usr/bin/cc
-- C flags (Release): -W -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 -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -fno-omit-frame-pointer -msse -msse2 -msse3 -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -W -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 -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -fno-omit-frame-pointer -msse -msse2 -msse3 -g -O0 -DDEBUG -D_DEBUG -ggdb3
-- Linker flags (Release):
-- Linker flags (Debug):
-- Precompiled headers: NO
-- OpenCV modules:
-- To be built: core imgproc flann highgui features2d calib3d ml video objdetect contrib nonfree photo legacy gpu java softcascade stitching ts videostab
-- Disabled: world
-- Disabled by dependency: -
-- Unavailable: androidcamera ocl python
-- GUI:
-- QT 4.x: NO
-- Cocoa: YES
-- OpenGL support: NO
-- Media I/O:
-- ZLib: build (ver 1.2.7)
-- JPEG: build (ver 90)
-- WEBP: build (ver 0.2.1)
-- 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: YES
-- codec: YES (ver Unknown)
-- format: YES (ver Unknown)
-- util: YES (ver Unknown)
-- swscale: YES (ver Unknown)
-- gentoo-style: YES
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- QuickTime: NO
-- QTKit: YES
-- V4L/V4L2: NO/NO
-- Other third-party libraries:
-- Use IPP: NO
-- Use Eigen: NO
-- Use TBB: NO
-- Use OpenMP: NO
-- Use GCD YES
-- Use Concurrency NO
-- Use C=: NO
-- Use Cuda: NO
-- Use OpenCL: NO
-- Python:
-- Interpreter: /opt/local/bin/python2 (ver 2.7.3)
-- Java:
-- ant: /usr/bin/ant (ver 1.8.2)
-- JNI: /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers
-- Java tests: YES
-- Documentation:
-- Build Documentation: NO
-- Sphinx: NO
-- PdfLaTeX compiler: NO
-- Tests and samples:
-- Tests: YES
-- Performance tests: YES
-- C/C++ Examples: NO
-- Install path: /usr/local
-- cvconfig.h is in: /Users/miralemcebic/Desktop/ocv/opencv/build
-- -----------------------------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/miralemcebic/Desktop/ocv/opencv/build`
than I run $ cmake -G “Unix Makefiles” ../
Now here comes the errors and of the end by 30% I get this
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libopencv_highgui.2.4.9.dylib] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
What is here the Problem? I also have Python 2.7 and Python >3
Can anybody help me by this issue?
Install macports
$ sudo port selfupdate
$ sudo port install opencv
Wait.