Ask Your Question
1

Building OpenCV in Mac Os X (10.9.1) - video library error

asked 2014-01-19 05:47:00 -0500

Tin gravatar image

updated 2014-01-19 06:01:04 -0500

Dear all,

I recently upgraded my gcc compiler to version (4.8.2). After trying to install OpenCV (2.4.8), I get some compiler errors when building the opencv_video library. The way I'm building the OpenCV library is as follows:

cd opencv-2.4.8
mkdir release
cd release/
cmake -D CMAKE_CXX_FLAGS="-I/opt/local/includes -L/opt/local/lib" -D CMAKE_INSTALL_PREFIX="/opt/local" -D CMAKE_BUILD_TYPE=Release -D CMAKE_VERBOSE_MAKEFILE=ON ..
make -j 4

The error message is given below and any feedback/suggestions are really welcomed :-) When following the same steps mentioned above for building the OpenCV library, but with using gcc 4.2.1, I didn't get any compilation problems and the library could be successfully installed.

"/Applications/CMake 2.8-12.app/Contents/bin/cmake" -E cmake_progress_report /Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/release/CMakeFiles 
[ 42%] Building CXX object modules/video/CMakeFiles/opencv_video.dir/src/video_init.cpp.o
cd /Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/release/modules/video && /opt/local/bin/c++   -DCVAPI_EXPORTS -I/opt/local/includes -L/opt/local/lib   -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 -pthread -fomit-frame-pointer -msse -msse2 -msse3 -O3 -DNDEBUG  -DNDEBUG -fPIC -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/video/perf -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/features2d/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/highgui/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/imgproc/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/flann/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/core/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/ts/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/video/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/release/modules/video -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/video/src -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/video/test -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/release -I/opt/local/include     -include "/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/release/modules/video/precomp.hpp" -Winvalid-pch  -o CMakeFiles/opencv_video.dir/src/video_init.cpp.o -c /Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/video/src/video_init.cpp
In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTKit.h:51:0,
             from /Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/highgui/src/cap_qtkit.mm:46:
/System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:123:46: error: expected ')' before '(' token
- (void)modernizeWithCompletionHandler:(void (^)(void))handler AVAILABLE_QTKIT_VERSION_7_7_3_AND_LATER;
                                          ^
/System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:123:46: error: expected identifier before '(' token
/System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:123:46: error: expected ';' before '(' token
/System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:156:18: error: unknown property attribute before ',' token
 @property (atomic, readonly) NSError *                      error                   AVAILABLE_QTKIT_VERSION_7_7_3_AND_LATER;
              ^
/System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:156 ...
(more)
edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2014-01-21 15:35:50 -0500

jensenb gravatar image

This is a known issue on Mavericks: http://code.opencv.org/issues/3359.

You will have build OpenCV without Quick Time support "-D WITH_QUICKTIME=OFF", which may or may not affect you, depending upon whether you absolutely need hardware acceleration for video playback. The FFMpeg based video play functionality works just fine for me.

edit flag offensive delete link more
-1

answered 2014-01-21 15:58:37 -0500

I try you suggestion but the error remains the same.

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.8.dylib] Error 1 make[1]: [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 make: ** [all] Error 2

edit flag offensive delete link more

Comments

This is a separate and likely unrelated issue to the one that tin posted in the question. Note that his build log does not mention missing symbols anywhere. You should open a separate question and include a full build log.

jensenb gravatar imagejensenb ( 2014-01-22 01:24:45 -0500 )edit

Also please use the comment function instead of creating answers to the question

jensenb gravatar imagejensenb ( 2014-01-22 01:25:28 -0500 )edit
-1

answered 2014-01-21 13:02:11 -0500

I am having a similar problem and I followed the same instructions you did. I am getting the following error:

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.8.dylib] Error 1 make[1]: [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 make: ** [all] Error 2

Have anybody managed to solve this? I am trying to solve it for 3 days.

Thanks

edit flag offensive delete link more

Comments

This is a separate and likely unrelated issue to the one that tin posted in the question. Note that his build log does not mention missing symbols anywhere. You should open a separate question and include a full build log.

jensenb gravatar imagejensenb ( 2014-01-22 01:26:09 -0500 )edit

Also please use the comment function instead of creating answers to the question.

jensenb gravatar imagejensenb ( 2014-01-22 01:28:38 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-01-19 05:47:00 -0500

Seen: 3,303 times

Last updated: Jan 21 '14