Ask Your Question

Revision history [back]

opencv 3.00 build error

Hello all,

   I am trying to install OpenCV 3.00 on my OS X. After running CMAKE, I went into my build directory and did 'make all'. I ran across the following error.

======================================================================================================

Brians-MacBook-Pro:build briansia1$ make all [ 2%] Built target zlib [ 8%] Built target libtiff [ 13%] Built target libjpeg [ 18%] Built target libjasper [ 20%] Built target libpng [ 28%] Built target IlmImf [ 29%] Built target opencv_hal [ 34%] Built target opencv_core [ 40%] Built target opencv_imgproc [ 41%] Built target opencv_imgcodecs [ 41%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_qtkit.mm.o In file included from /Users/briansia1/Desktop/opencv-3.0.0/modules/videoio/src/cap_qtkit.mm:46: In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTKit.h:20: In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTError.h:17: In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10: In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5: /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:19:21: error: expected a type - (id)copyWithZone:(nullable NSZone )zone; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:25:28: error: expected a type - (id)mutableCopyWithZone:(nullable NSZone *)zone; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:32:4: error: expected a type - (nullable instancetype)initWithCoder:(NSCoder *)aDecoder; // NS_DESIGNATED_INITIALIZER ^ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:53:4: error: expected a type - (nullable id)replacementObjectForCoder:(NSCoder *)aCoder; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:54:4: error: expected a type - (nullable id)awakeAfterUsingCoder:(NSCoder *)aDecoder NS_REPLACES_RECEIVER; ^ In file included from /Users/briansia1/Desktop/opencv-3.0.0/modules/videoio/src/cap_qtkit.mm:46: In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTKit.h:20: In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTError.h:17: In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10: In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:6: /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:15: error: expected ';' after @class @class NSArray<objecttype>; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:16: error: cannot find protocol declaration for 'ObjectType' @class NSArray<objecttype>; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:25: error: cannot find protocol declaration for 'ObjectType' @interface NSEnumerator<objecttype> : NSObject <nsfastenumeration> ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:37: error: expected unqualified-id @interface NSEnumerator<objecttype> : NSObject <nsfastenumeration> ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:4: error: expected a type - (nullable ObjectType)nextObject; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:25: error: cannot find protocol declaration for 'ObjectType' @interface NSEnumerator<objecttype> (NSExtendedEnumerator) ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:1: error: duplicate interface definition for class 'NSEnumerator' @interface NSEnumerator<objecttype> (NSExtendedEnumerator) ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:12: note: previous definition is here @interface NSEnumerator<objecttype> : NSObject <nsfastenumeration> ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:37: error: method type specifier must start with '-' or '+' @interface NSEnumerator<objecttype> (NSExtendedEnumerator) ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:38: error: expected a type @interface NSEnumerator<objecttype> (NSExtendedEnumerator) ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:1: error: expected selector for Objective-C method @property (readonly, copy) NSArray<objecttype> *allObjects; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:28: error: unknown type name 'NSArray' @property (readonly, copy) NSArray<objecttype> *allObjects; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:35: error: expected member name or ';' after declaration specifiers @property (readonly, copy) NSArray<objecttype> *allObjects; ~~~~~~~^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:1: error: property requires fields to be named @property (readonly, copy) NSArray<objecttype> *allObjects; ^ ~~~~~~~ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:35: error: expected ';' at end of declaration list @property (readonly, copy) NSArray<objecttype> *allObjects; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[2]: [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_qtkit.mm.o] Error 1 make[1]: [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2 make: ** [all] Error 2 Brians-MacBook-Pro:build briansia1$

===================================================================================================

 I am an OpenCV newbie, and hence do not have much experience with any of this. Any help will be appreciated. Thank you.
click to hide/show revision 2
No.2 Revision

updated 2016-12-19 22:44:34 -0500

berak gravatar image

opencv 3.00 build error

Hello all,

   I am trying to install OpenCV 3.00 on my OS X. After running CMAKE, I went into my build directory and did 'make all'. I ran across the following error.
======================================================================================================

======================================================================================================

Brians-MacBook-Pro:build briansia1$ make all [ 2%] Built target zlib [ 8%] Built target libtiff [ 13%] Built target libjpeg [ 18%] Built target libjasper [ 20%] Built target libpng [ 28%] Built target IlmImf [ 29%] Built target opencv_hal [ 34%] Built target opencv_core [ 40%] Built target opencv_imgproc [ 41%] Built target opencv_imgcodecs [ 41%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_qtkit.mm.o In file included from /Users/briansia1/Desktop/opencv-3.0.0/modules/videoio/src/cap_qtkit.mm:46: In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTKit.h:20: In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTError.h:17: In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10: In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5: /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:19:21: error: expected a type - (id)copyWithZone:(nullable NSZone )zone; *)zone; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:25:28: error: expected a type - (id)mutableCopyWithZone:(nullable NSZone *)zone; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:32:4: error: expected a type - (nullable instancetype)initWithCoder:(NSCoder *)aDecoder; // NS_DESIGNATED_INITIALIZER ^ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:53:4: error: expected a type - (nullable id)replacementObjectForCoder:(NSCoder *)aCoder; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:54:4: error: expected a type - (nullable id)awakeAfterUsingCoder:(NSCoder *)aDecoder NS_REPLACES_RECEIVER; ^ In file included from /Users/briansia1/Desktop/opencv-3.0.0/modules/videoio/src/cap_qtkit.mm:46: In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTKit.h:20: In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTError.h:17: In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10: In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:6: /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:15: error: expected ';' after @class @class NSArray<objecttype>; NSArray<ObjectType>; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:16: error: cannot find protocol declaration for 'ObjectType' @class NSArray<objecttype>; NSArray<ObjectType>; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:25: error: cannot find protocol declaration for 'ObjectType' @interface NSEnumerator<objecttype> NSEnumerator<ObjectType> : NSObject <nsfastenumeration> <NSFastEnumeration> ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:37: error: expected unqualified-id @interface NSEnumerator<objecttype> NSEnumerator<ObjectType> : NSObject <nsfastenumeration> <NSFastEnumeration> ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:4: error: expected a type - (nullable ObjectType)nextObject; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:25: error: cannot find protocol declaration for 'ObjectType' @interface NSEnumerator<objecttype> NSEnumerator<ObjectType> (NSExtendedEnumerator) ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:1: error: duplicate interface definition for class 'NSEnumerator' @interface NSEnumerator<objecttype> NSEnumerator<ObjectType> (NSExtendedEnumerator) ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:12: note: previous definition is here @interface NSEnumerator<objecttype> NSEnumerator<ObjectType> : NSObject <nsfastenumeration> <NSFastEnumeration> ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:37: error: method type specifier must start with '-' or '+' @interface NSEnumerator<objecttype> NSEnumerator<ObjectType> (NSExtendedEnumerator) ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:38: error: expected a type @interface NSEnumerator<objecttype> NSEnumerator<ObjectType> (NSExtendedEnumerator) ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:1: error: expected selector for Objective-C method @property (readonly, copy) NSArray<objecttype> NSArray<ObjectType> *allObjects; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:28: error: unknown type name 'NSArray' @property (readonly, copy) NSArray<objecttype> NSArray<ObjectType> *allObjects; ^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:35: error: expected member name or ';' after declaration specifiers @property (readonly, copy) NSArray<objecttype> NSArray<ObjectType> *allObjects; ~~~~~~~^ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:1: error: property requires fields to be named @property (readonly, copy) NSArray<objecttype> NSArray<ObjectType> *allObjects; ^ ~~~~~~~ /System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:35: error: expected ';' at end of declaration list @property (readonly, copy) NSArray<objecttype> NSArray<ObjectType> *allObjects; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_qtkit.mm.o] Error 1 make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2 make: ** *** [all] Error 2 Brians-MacBook-Pro:build briansia1$

===================================================================================================

===================================================================================================
 I am an OpenCV newbie, and hence do not have much experience with any of this. Any help will be appreciated. Thank you.