Compiling Error with Graphlab when building opencv

User 639 | 8/30/2014, 5:48:34 PM

Hi everyone

I'm new to Graphlab. And when I'm compiling Graphlab with gcc on my mac, I get the following error(see below). Can anyone show any light on this. Thank you so much.

Regards.

[ 7%] [ 7%] [ 10%] [ 13%] Built target libbz2 Built target libevent Built target eigen Built target hadoop [ 13%] [ 14%] [ 17%] Built target libtcmalloc [ 21%] Performing build step for 'opencv' Performing build step for 'libjson' Built target zookeeper ============================================================ [ 24%] libjson version: 7.6.0 target: OS: Darwin Built target boost ============================================================ c++: error: unrecognized command line option ‘-fast’ make[3]: * [Objects_static/internalJSONNode.o] Error 1 make[3]: Waiting for unfinished jobs.... c++: error: unrecognized command line option ‘-fast’ make[3]: ** [Objects_static/JSONAllocator.o] Error 1 make[2]: * [../deps/json/src/libjson-stamp/libjson-build] Error 2 make[1]: [CMakeFiles/libjson.dir/all] Error 2 make[1]: ** Waiting for unfinished jobs....

...

make[5]: * [modules/highgui/CMakeFiles/opencvhighgui.dir/src/windowcocoa.mm.o] Error 1 make[5]: * Waiting for unfinished jobs.... In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTKit.h:51:0, from /Users/YufengMa/Documents/Research/graphlab-master/deps/opencv/src/opencv/modules/highgui/src/capqtkit.mm:46: /System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h: At global scope: /System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:123:46: error: expected ‘)’ before ‘(’ token - (void)modernizeWithCompletionHandler:(void (^)(void))handler AVAILABLEQTKITVERSION773ANDLATER; ^ /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 AVAILABLEQTKITVERSION773ANDLATER; ^ /System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:156:18: error: expected ‘)’ before ‘,’ token /System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:156:1: note: ‘assign’ can be unsafe for Objective-C objects; please state explicitly if you need it @property (atomic, readonly) NSError * error AVAILABLEQTKITVERSION773ANDLATER; ^ /System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:162:18: error: unknown property attribute before ‘,’ token @property (atomic, assign) QTMovieModernizerStatus status AVAILABLEQTKITVERSION773AND_LATER; ^ /System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:162:18: error: expected ‘)’ before ‘,’ token make[5]: * [modules/highgui/CMakeFiles/opencvhighgui.dir/src/capqtkit.mm.o] Error 1 make[4]: [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 make[3]: ** [all] Error 2 make[2]: * [../deps/opencv/src/opencv-stamp/opencv-build] Error 2 make[1]: [CMakeFiles/opencv.dir/all] Error 2 make: ** [all] Error 2

My OS and OS versions is OSX 10.9.1.

Output of uname -a: Darwin Yufengs-MacBook-Pro-2.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASEX8664 x86_64

The output of g++ -v and clang++ -v: Using built-in specs. COLLECTGCC=g++ COLLECTLTOWRAPPER=/usr/gcc-4.9.1/libexec/gcc/x8664-apple-darwin13.3.0/4.9.1/lto-wrapper Target: x86_64-apple-darwin13.3.0 Configured with: ../configure --prefix=/usr/gcc-4.9.1 --enable-checking=release --with-gmp=/usr/gcc-4.9.1 --with-mpfr=/usr/gcc-4.9Html�I�M! ��7# ++����FYI: If you are using Anaconda and having problems with NumPyHello everyon

Comments

User 6 | 8/31/2014, 3:55:11 PM

Hi, 1) When compiling Powergraph, we recommend to compile the minimal set of toolkits you want to use. Are you planning to use cloudcv image processing toolkit? If not please cd to the toolkit you like to compile and compile there. For example cd graph_analytics make 2) Cloudcv is based on code contribution from virginia tech and depends on opencv which is an external library. If you do plan to use cloudcv, we recommend switching to a linux machine. Alternatively you may need to contact opencv support to verify it works on this version of MAC OS.


User 639 | 9/1/2014, 2:12:29 AM

Thank you. Vision package is actually the one I need. And I've changed to Ubuntu for test. But it came with new errors in configure step for opencv. I've googled here and there without any solutions. See below.

Regards.

[ 3%] Built target eigen [ 7%] Built target libbz2 [ 10%] [ 13%] Built target hadoop Built target libevent [ 17%] Built target libjson [ 19%] [ 20%] Built target libtcmalloc [ 24%] Performing configure step for 'opencv' Built target zookeeper [ 27%] Built target boost -- Detected version of GNU GCC: 48 (408) CMake Error at cmake/OpenCVModule.cmake:619 (endmacro): endmacro An ENDMACRO command was found outside of a proper MACRO ENDMACRO structure. Or its arguments did not match the opening MACRO command. Call Stack (most recent call first): CMakeLists.txt:446 (include)

-- Could NOT find PythonLibs (missing: PYTHONLIBRARIES PYTHONINCLUDEDIRS) (Required is exact version "2.7.6") Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named numpy.distutils CMake Error at modules/core/CMakeLists.txt:9 (ocvmoduleincludedirectories): Unknown CMake command "ocvmoduleinclude_directories".

-- Configuring incomplete, errors occurred! See also "/home/yufengma/Documents/Research/graphlab/deps/opencv/src/opencv-build/CMakeFiles/CMakeOutput.log". See also "/home/yufengma/Documents/Research/graphlab/deps/opencv/src/opencv-build/CMakeFiles/CMakeError.log". make[2]: * [../deps/opencv/src/opencv-stamp/opencv-configure] Error 1 make[1]: [CMakeFiles/opencv.dir/all] Error 2 make[1]: ** Waiting for unfinished jobs.... [ 47%] Built target graphlab make: *** [all] Error 2


User 6 | 9/1/2014, 4:47:13 AM

It seems that opencv is looking for python 2.7.6 include directories. Please make sure you have python 2.7.6 installed on your system and the include directories are added into the path.


User 639 | 9/2/2014, 12:40:27 AM

Thank you. This error has been fixed. What I want is the previous one, for which I have posted another discussion. Can you go and give some advice?

<a href="http://forum.graphlab.com/discussion/516/cmake-error-when-building-dependency-opencv#latest">forum.graphlab.com/discussion/516/cmake-error-when-building-dependency-opencv#latest</a>


User 6 | 9/2/2014, 4:57:08 PM

Hi, I looked into your problem, it does not relate to graphlab but to opencv. See this website which explains how to install on ubuntu 14.04 http://www.sysads.co.uk/2014/05/install-opencv-2-4-9-ubuntu-14-04-13-10/. You will notice that there are tens and tens of required packages, their setup is quite complex. If you still fail, you will need to contact heir support.


User 639 | 9/2/2014, 7:14:21 PM

Thank you. I think I found out the reason. What 'make' extract from opencv2.4.9 does not match the files I extract manually. I just replaced the opencv folder manually and then 'make' again. It went well.


User 6 | 9/2/2014, 7:16:23 PM

At any case Dhruv now submitted a patch to use opencv 2.4.9 and avoid compiling some of the sections, maybe it will help resolve some of the issues.