I'm trying to build Opencv 2.48 on RHEL 6.4 as a static library to use with Java. I'm running kernel Linux 2.6.32=358.el6.x86_64. When I run "make -j8" it compiles up until ~ 38% and then throws the following error when linking the cudaarithm.a library. I currently have CUDA 5.5 installed with a recent GTX 680 graphics card. I'm using CUDA on a regular basis and it's working extremely well.
Scanning dependencies of target opencv_cudaarithm [ 38%] Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/reductions.cpp.o [ 39%] [ 39%] [ 39%] Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/element_operations.cpp.o Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/arithm.cpp.o Building CXX object modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/src/core.cpp.o Linking CXX static library ../../lib/libopencv_cudaarithm.a [ 39%] Built target opencv_cudaarithm make: * [all] Error 2
I have a couple of missing dependencies but none that I would suspect to be involved in the CUDA build.
Here's the output of cake -DBUILD_SHARED_LIBS=OFF ..
cmake -DBUILD_SHARED_LIBS=OFF .. -- Detected version of GNU GCC: 44 (404) -- Found ZLIB: /usr/lib64/libz.so (found suitable version "1.2.3", minimum required is "1.2.3") -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.3") -- checking for module 'gstreamer-base-1.0' -- package 'gstreamer-base-1.0' not found -- 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 'libdc1394-2' -- package 'libdc1394-2' not found -- checking for module 'libdc1394' -- package 'libdc1394' not found -- Looking for linux/videodev.h -- Looking for linux/videodev.h - 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 -- CUDA detected: 5.5 -- CUDA NVCC target flags: -gencode;arch=compute_11,code=sm_11;-gencode;arch=compute_12,code=sm_12;-gencode;arch=compute_13,code=sm_13;-gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_30,code=compute_30 -- Update variable PYTHON_LIBRARY from environment: /usr/local/canopy/appdata/canopy-1.3.0.1715.rh5-x86_64/lib -- Update variable PYTHON_INCLUDE_DIR from environment: /usr/local/canopy/appdata/canopy-1.3.0.1715.rh5-x86_64/include -- Found apache ant 1.7.1: /usr/bin/ant -- Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or set $VTK_DIR enviroment variable to VTK install subdirectory with VTKConfig.cmake file (for windows)
-- General configuration for OpenCV 3.0.0-dev =====================================
-- Version control: 2.4.8-3568-g0ce8f1d
-- Platform: -- Host: Linux 2.6.32-358.el6.x86_64 x86_64 -- CMake: 2.8.12.2 -- CMake generator: Unix Makefiles -- CMake build tool: /usr/bin/gmake
-- Configuration: Release
-- C/C++:
-- Built as dynamic libs?: NO
-- C++ Compiler: /usr/bin/c++ (ver 4.4.7)
-- C++ flags (Release): -fPIC -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 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -fPIC -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 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /usr/bin/cc
-- C flags (Release): -fPIC -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 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -fPIC -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 -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release):
-- Linker flags (Debug):
-- Precompiled headers: YES
-- OpenCV modules: -- To be built: cudev core flann imgproc highgui features2d calib3d cudaarithm ml nonfree objdetect video contrib cudalegacy cudawarping cuda cudafilters cudaimgproc legacy cudabgsegm cudacodec cudafeatures2d cudaoptflow cudastereo photo java optim softcascade python shape stitching superres ts videostab -- Disabled: world -- Disabled by dependency: -
-- Unavailable: androidcamera matlab viz
-- GUI: -- QT: NO -- GTK+ 2.x: YES (ver 2.18.9) -- GThread : YES (ver 2.22.5) -- GtkGlExt: NO -- OpenGL support: NO
-- VTK support: NO
-- Media I/O: -- ZLib: /usr/lib64/libz.so (ver 1.2.3) -- JPEG: /usr/lib64/libjpeg.so (ver ) -- WEBP: build (ver 0.3.1) -- PNG: /usr/lib64/libpng.so (ver 1.2.49) -- TIFF: /usr/lib64/libtiff.so (ver 42 - 3.9.4) -- JPEG 2000: /usr/lib64/libjasper.so (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 55.52.102)
-- format: YES (ver 55.34.101)
-- util: YES (ver 52.66.101)
-- swscale: YES (ver 2.5.101)
-- gentoo-style: YES
-- GStreamer:
-- base: YES (ver 0.10.29)
-- video: YES (ver 0.10.29)
-- app: YES (ver 0.10.29)
-- riff: YES (ver 0.10.29)
-- pbutils: YES (ver 0.10.29)
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: Using libv4l (ver 0.6.3)
-- 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: YES (ver 5.5)
-- Use OpenCL: YES
-- NVIDIA CUDA -- Use CUFFT: YES -- Use CUBLAS: NO -- USE NVCUVID: NO -- NVIDIA GPU arch: 11 12 13 20 21 30 35 -- NVIDIA PTX archs: 30
-- Use fast math: NO
-- OpenCL: -- Version: dynamic -- Include path: /home/developer/andor_development/working/andor_dependencies/opencv/3rdparty/include/opencl/1.2 -- Use AMDFFT: NO
-- Use AMDBLAS: NO
-- Python: -- Interpreter: /usr/bin/python2 (ver 2.7.6) -- Libraries: /usr/local/canopy/appdata/canopy-1.3.0.1715.rh5-x86_64/lib -- numpy: /usr/local/canopy/appdata/canopy-1.3.0.1715.rh5-x86_64/lib/python2.7/site-packages/numpy/core/include (ver 1.8.0)
-- packages path: lib/python2.7/site-packages
-- Java: -- ant: /usr/bin/ant (ver 1.7.1) -- JNI: /usr/local/jdk1.7.0_21/include /usr/local/jdk1.7.0_21/include/linux /usr/local/jdk1.7.0_21/include
-- Java tests: YES
-- Matlab:
-- mex: NO
-- Documentation: -- Build Documentation: NO -- Sphinx: NO -- PdfLaTeX compiler: /usr/bin/pdflatex
-- PlantUML: NO
-- Tests and samples: -- Tests: YES -- Performance tests: YES
-- C/C++ Examples: NO
-- Install path: /usr/local
-- cvconfig.h is in: /home/developer/andor_development/working/andor_dependencies/opencv/build
-- -----------------------------------------------------------------
-- Configuring done WARNING: Target "opencv_python" requests linking to directory "/usr/local/canopy/appdata/canopy-1.3.0.1715.rh5-x86_64/lib". Targets may link only to libraries. CMake is dropping the item. -- Generating done -- Build files have been written to: /home/developer/andor_development/working/andor_dependencies/opencv/build
Any clue as to why I'm having this problem? Note that I'm using the Enthought version of Python 2.7.6 which is installed as part of their new "canopy" package and I needed to point specifically to it to get rid of errors finding the PYTHON_LIBRARY and PYTHON_INCLUDE_DIR. I'm setting these with environmental variable. Sincerely,
Jennifer Milburn Caltech Optical Observatories