Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error building openCV 2.4.9 library not found for -lopencv_cudev

Hi all,

I'm having trouble to build opencv on my Mac OS 10.9.2 to us it with python During the make step I get the following error:

[ 85%] Building CXX object modules/python/CMakeFiles/opencv_python.dir/src2/cv2.cpp.o
Linking CXX shared library ../../lib/cv2.so
ld: library not found for -lopencv_cudev

and even if a disable BUILD_opencv_python

Linking CXX executable ../../bin/opencv_createsamples
ld: library not found for -lopencv_cudev

And I'm also getting this. Not sure if it's related or not

Linking CXX static library ../../lib/libopencv_core.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(cuda_buffer_pool.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(opencl_clamdblas.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(opencl_clamdfft.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(opencl_core.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(cuda_buffer_pool.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(opencl_clamdblas.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(opencl_clamdfft.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(opencl_core.cpp.o) has no symbols

Any idea? Thanks for your help!

-- Found ZLIB: /usr/lib/libz.dylib (found suitable version "1.2.5", minimum required is "1.2.3") 
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5") 
-- 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 libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- Found Sphinx 1.2.1: /Library/Frameworks/Python.framework/Versions/2.7/bin/sphinx-build
-- Found apache ant 1.9.2: /usr/local/ant/apache-ant-1.9.2/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) 
-- Module opencv_python disabled because opencv_softcascade dependency can't be resolved!
-- 
-- General configuration for OpenCV 3.0.0-dev =====================================
--   Version control:               2.4.8-3886-g6f055d7
-- 
--   Platform:
--     Host:                        Darwin 13.1.0 i386
--     CMake:                       2.8.12.2
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               Release
-- 
--   C/C++:
--     Built as dynamic libs?:      NO
--     C++ Compiler:                /usr/bin/c++  (ver 5.1.0)
--     C++ flags (Release):         -fPIC   -fsigned-char -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 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fPIC   -fsigned-char -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 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fPIC   -fsigned-char -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 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fPIC   -fsigned-char -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 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         NO
-- 
--   OpenCV modules:
--     To be built:                 core flann imgproc highgui features2d calib3d cudaarithm ml nonfree objdetect video contrib cudawarping cuda cudafilters cudaimgproc legacy cudabgsegm cudafeatures2d cudaoptflow cudastereo optim photo shape stitching superres ts videostab
--     Disabled:                    java softcascade world
--     Disabled by dependency:      python(deps: cudev softcascade)
--     Unavailable:                 androidcamera cudacodec cudalegacy cudev matlab viz
-- 
--   GUI: 
--     QT:                          NO
--     Cocoa:                       YES
--     OpenGL support:              NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /usr/lib/libz.dylib (ver 1.2.5)
--     JPEG:                        /usr/local/lib/libjpeg.dylib (ver 80)
--     WEBP:                        NO
--     PNG:                         /usr/local/lib/libpng.dylib (ver 1.6.10)
--     TIFF:                        NO
--     JPEG 2000:                   NO
--     OpenEXR:                     NO
-- 
--   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:                     YES (ver 4.2 interface 7000)
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    NO
--     Use OpenCL:                  NO
-- 
--   Python:
--     Interpreter:                 /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 (ver 2.7.3)
--     Libraries:                   NO
--     numpy:                       /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include (ver 1.8.0)
--     packages path:               /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
-- 
--   Java:
--     ant:                         /usr/local/ant/apache-ant-1.9.2/bin/ant (ver 1.9.2)
--     JNI:                         /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers
--     Java tests:                  NO
-- 
--   Matlab:
--     mex:                         NO
-- 
--   Documentation:
--     Build Documentation:         YES (only HTML and without math expressions)
--     Sphinx:                      /Library/Frameworks/Python.framework/Versions/2.7/bin/sphinx-build (ver 1.2.1)
--     PdfLaTeX compiler:           NO
--     PlantUML:                    NO
-- 
--   Tests and samples:
--     Tests:                       NO
--     Performance tests:           NO
--     C/C++ Examples:              NO
-- 
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /usr/local/opencv/build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/opencv/build
click to hide/show revision 2
retagged

updated 2014-04-08 03:42:38 -0500

berak gravatar image

Error building openCV 2.4.9 library not found for -lopencv_cudev

Hi all,

I'm having trouble to build opencv on my Mac OS 10.9.2 to us it with python During the make step I get the following error:

[ 85%] Building CXX object modules/python/CMakeFiles/opencv_python.dir/src2/cv2.cpp.o
Linking CXX shared library ../../lib/cv2.so
ld: library not found for -lopencv_cudev

and even if a disable BUILD_opencv_python

Linking CXX executable ../../bin/opencv_createsamples
ld: library not found for -lopencv_cudev

And I'm also getting this. Not sure if it's related or not

Linking CXX static library ../../lib/libopencv_core.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(cuda_buffer_pool.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(opencl_clamdblas.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(opencl_clamdfft.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(opencl_core.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(cuda_buffer_pool.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(opencl_clamdblas.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(opencl_clamdfft.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../lib/libopencv_core.a(opencl_core.cpp.o) has no symbols

Any idea? Thanks for your help!

-- Found ZLIB: /usr/lib/libz.dylib (found suitable version "1.2.5", minimum required is "1.2.3") 
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5") 
-- 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 libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- Found Sphinx 1.2.1: /Library/Frameworks/Python.framework/Versions/2.7/bin/sphinx-build
-- Found apache ant 1.9.2: /usr/local/ant/apache-ant-1.9.2/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) 
-- Module opencv_python disabled because opencv_softcascade dependency can't be resolved!
-- 
-- General configuration for OpenCV 3.0.0-dev =====================================
--   Version control:               2.4.8-3886-g6f055d7
-- 
--   Platform:
--     Host:                        Darwin 13.1.0 i386
--     CMake:                       2.8.12.2
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               Release
-- 
--   C/C++:
--     Built as dynamic libs?:      NO
--     C++ Compiler:                /usr/bin/c++  (ver 5.1.0)
--     C++ flags (Release):         -fPIC   -fsigned-char -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 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fPIC   -fsigned-char -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 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fPIC   -fsigned-char -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 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fPIC   -fsigned-char -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 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         NO
-- 
--   OpenCV modules:
--     To be built:                 core flann imgproc highgui features2d calib3d cudaarithm ml nonfree objdetect video contrib cudawarping cuda cudafilters cudaimgproc legacy cudabgsegm cudafeatures2d cudaoptflow cudastereo optim photo shape stitching superres ts videostab
--     Disabled:                    java softcascade world
--     Disabled by dependency:      python(deps: cudev softcascade)
--     Unavailable:                 androidcamera cudacodec cudalegacy cudev matlab viz
-- 
--   GUI: 
--     QT:                          NO
--     Cocoa:                       YES
--     OpenGL support:              NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /usr/lib/libz.dylib (ver 1.2.5)
--     JPEG:                        /usr/local/lib/libjpeg.dylib (ver 80)
--     WEBP:                        NO
--     PNG:                         /usr/local/lib/libpng.dylib (ver 1.6.10)
--     TIFF:                        NO
--     JPEG 2000:                   NO
--     OpenEXR:                     NO
-- 
--   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:                     YES (ver 4.2 interface 7000)
--     Use OpenMP:                  NO
--     Use GCD                      NO
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    NO
--     Use OpenCL:                  NO
-- 
--   Python:
--     Interpreter:                 /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 (ver 2.7.3)
--     Libraries:                   NO
--     numpy:                       /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include (ver 1.8.0)
--     packages path:               /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
-- 
--   Java:
--     ant:                         /usr/local/ant/apache-ant-1.9.2/bin/ant (ver 1.9.2)
--     JNI:                         /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers
--     Java tests:                  NO
-- 
--   Matlab:
--     mex:                         NO
-- 
--   Documentation:
--     Build Documentation:         YES (only HTML and without math expressions)
--     Sphinx:                      /Library/Frameworks/Python.framework/Versions/2.7/bin/sphinx-build (ver 1.2.1)
--     PdfLaTeX compiler:           NO
--     PlantUML:                    NO
-- 
--   Tests and samples:
--     Tests:                       NO
--     Performance tests:           NO
--     C/C++ Examples:              NO
-- 
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /usr/local/opencv/build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/opencv/build