Ask Your Question
1

building openCV 2.4.2 on OS X 10.9 fails

asked 2013-10-31 09:37:47 -0600

Marieke21 gravatar image

updated 2014-03-30 13:23:10 -0600

berak gravatar image

I have been trying to instal openCV on my MacBook Pro running OS X 10.9 (Mavericks) for days now. Have tried several ways (homebrew, from source, other versions, different preferences, etc.) but keep running into problems. The current error that I get when I try to build openCV is:

In file included from /users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/src/precomp.cpp:1:
In file included from /users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/src/precomp.hpp:2:
In file included from /users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/include/opencv2/ts/ts.hpp:40:
/users/Marieke/Downloads/OpenCV-2.4.2/modules/ts/include/opencv2/ts/ts_gtest.h:1657:13: fatal error: 
      'tr1/tuple' file not found
#   include <tr1/tuple>  // NOLINT
            ^
1 error generated. 
make[2]: *** [modules/ts/CMakeFiles/opencv_ts.dir/src/precomp.cpp.o] Error 1
make[1]: *** [modules/ts/CMakeFiles/opencv_ts.dir/all] Error 2
make: *** [all] Error 2

Anyone knows how to fix this? All help is appreciated, thank you!

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2014-03-30 12:46:56 -0600

benzwt gravatar image

adrian, thanks for solving the problem, but your description is no clear and not detail. would you please describe you solution more clearly ?

Thanks!

edit flag offensive delete link more

Comments

This is not an answer. Please post a comment on the answer from Adrian below and delete this answer.

jensenb gravatar imagejensenb ( 2014-03-31 02:28:40 -0600 )edit
0

answered 2013-12-17 08:57:04 -0600

jensenb gravatar image

This isn't really an OpenCV problem, but a problem with the version of gtest included with that outdated version of OpenCV with libc++, documented here: http://code.opencv.org/issues/2412. Fixing the issue requires an updated version of OpenCV. I believe 2.4.6 already resolves the issue, but I recommend installing the latest version of OpenCV, 2.4.7.2, that version builds without problems on Mavericks.

edit flag offensive delete link more
0

answered 2013-12-17 06:17:13 -0600

I'm having the same problem, is there a solution?

edit flag offensive delete link more
0

answered 2014-01-17 02:05:24 -0600

Adrian gravatar image

Hi all,

I solved the problem:

(1) download / checkout latest version (git pull) (2) go into cMake (3) build new make based project (4) configure (5) advanced mode (6) search for cc and set (6.1) set CMAKE_C_COMPILER = /usr/bin/clang (6.2) set CUDA_HOST_COMPILER = /usr/bin/clang (7) configure (8) search for CXX (8) set CMAKE_CXX_FLAGS = -fno_inline -mmacosx-version-min=10.8 (9) configure (10) generate (11) build with make or make -j8

have fun.

OpenGL is not support, not yet solved this issue, but CUDA and OSX 10.9 is working

/adrian

edit flag offensive delete link more

Comments

Have you tested that CuDA was actually built and is working? Did you link OpenCV against libc++ or libstdc++? I have been unable to find way to get OpenCV to link against libc++ and CuDA at the same time.

jensenb gravatar imagejensenb ( 2014-01-17 04:52:29 -0600 )edit

I build it on my OS/X 10.9 with retina .... ./opencv_test_core
[----------] Global test environment tear-down [==========] 5103 tests from 146 test cases ran. (100739 ms total) [ PASSED ] 5094 tests.

Adrian gravatar imageAdrian ( 2014-01-17 07:43:53 -0600 )edit

./opencv_test_cuda [----------] Global test environment tear-down [==========] 1082 tests from 14 test cases ran. (1791 ms total) [ PASSED ] 1071 tests. [ FAILED ] 11 tests, listed below:

Adrian gravatar imageAdrian ( 2014-01-17 07:44:53 -0600 )edit

Do you like to get my CMakeCache.txt ?

Adrian gravatar imageAdrian ( 2014-01-17 07:46:44 -0600 )edit

Sorry, i did a mistake in the description:

CUDA_HOST_COMPILER = /usr/bin/clang

CMAKE_CXX_FLAGS = -fno_inline -mmacosx-version-min=10.7

set CMAKE_C_COMPILER = /usr/bin/cc set CMAKE_CXX_COMPILER = /usr/bin/c++

Adrian gravatar imageAdrian ( 2014-01-17 07:50:34 -0600 )edit

Can you post the output of "otool -L /usr/local/lib/libopencv_gpu.dylib" and "otool -L /usr/local/lib/libopencv_core.dylib"? If you did not install openCV with "make install" to /usr/local, change the prefix to wherever you installed OpenCV.

jensenb gravatar imagejensenb ( 2014-01-17 08:07:37 -0600 )edit

otool -L libopencv_core.dylib libopencv_core.dylib: /Users/adegli/dev/OpenCV/build/osx/lib/libopencv_core.3.0.dylib (compatibility version 3.0.0, current version 3.0.0) /Users/adegli/dev/OpenCV/build/osx/lib/libopencv_cudev.3.0.dylib (compatibility version 3.0.0, current version 3.0.0) /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL (compatibility version 1.0.0, current version 1.0.0) @rpath/libcudart.5.5.dylib (compatibility version 0.0.0, current version 5.5.28) @rpath/libnppc.5.5.dylib (compatibility version 0.0.0, current version 5.5.28) @rpath/libnppi.5.5.dylib (compatibility version 0.0.0, current version 5.5.28) @rpath/libnpps.5.5.dylib (compatibility version 0.0.0, current version 5.5.28) @rpath/libcufft.5.5.dylib (compatibility version 0.0.0, current version

Adrian gravatar imageAdrian ( 2014-01-17 08:17:06 -0600 )edit

libopencv_gpu.dylib i dont find

Adrian gravatar imageAdrian ( 2014-01-17 08:19:49 -0600 )edit

It seems your comment for libopencv_core was cut short, did you see an entry in the out containing libc++, or libstdc++? Thanks!

jensenb gravatar imagejensenb ( 2014-01-17 08:54:12 -0600 )edit

/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

Adrian gravatar imageAdrian ( 2014-01-17 09:02:41 -0600 )edit

Question Tools

Stats

Asked: 2013-10-31 09:37:47 -0600

Seen: 1,311 times

Last updated: Mar 30 '14