Ask Your Question
0

Error building openCV 2.4.9 library not found for -lopencv_cudev

asked 2014-04-07 22:18:12 -0600

Romanzo gravatar image

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

berak gravatar image

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 ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-14 16:53:43 -0600

You have to run cmake with disabled cuda for the first time, like this in a clean folder

cmake -D WITH_CUDA=OFF ..
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-04-07 22:18:12 -0600

Seen: 3,355 times

Last updated: Jun 14 '14