Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

failed to make opencv.git with gcc48 on macosx mavericks

I forked the repos, and clone a copy on my computer, my OS is macosx maverick and the gcc version is 4.8

I just failed to make the fresh opencv, the error messages are as below, It is the matter of the gcc ?

In file included from /Users/benzene/works/OpenCV/opencv/modules/core/include/opencv2/core.hpp:52:0, from /Users/benzene/works/OpenCV/opencv/modules/highgui/include/opencv2/highgui.hpp:46, from /Users/benzene/works/OpenCV/opencv/modules/highgui/src/precomp.hpp:45, from /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:43: /Users/benzene/works/OpenCV/opencv/modules/core/include/opencv2/core/base.hpp:228:35: warning: unknown option after '#pragma GCC diagnostic' kind [-Wpragmas] # pragma GCC diagnostic ignored "-Winvalid-noreturn" ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: In function 'void cvDestroyAllWindows()': /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:199:23: error: expected ';' before 'in' for(NSString key in list) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:199:23: error: 'in' was not declared in this scope /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:199:26: error: expected ';' before 'list' for(NSString *key in list) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:199:26: warning: for increment expression has no effect [-Wunused-value] /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: In function 'void cvShowImage(const char, const CvArr)': /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:31: error: expected ';' before 'in' for(NSString *key in [window sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:31: error: 'in' was not declared in this scope /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:42: error: expected ']' before 'sliders' for(NSString *key in [window sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:42: error: expected ';' before 'sliders' /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:42: error: 'sliders' was not declared in this scope /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:49: error: expected ')' before ']' token for(NSString *key in [window sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:49: error: expected primary-expression before ']' token /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:49: error: expected ';' before ']' token /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:27: warning: unused variable 'key' [-Wunused-variable] for(NSString *key in [window sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: In function 'const char cvGetWindowName(void)': /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:435:23: error: expected ';' before 'in' for(NSString *key in windows) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:435:23: error: 'in' was not declared in this scope /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:435:26: error: expected ';' before 'windows' for(NSString *key in windows) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:435:26: warning: for increment expression has no effect [-Wunused-value] /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: In function '-[CVWindow cvSendMouseEvent:type:flags:]': /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:23: error: expected ';' before 'in' for(NSString *key in [window sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:23: error: 'in' was not declared in this scope /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:34: error: expected ']' before 'sliders' for(NSString *key in [window sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:34: error: expected ';' before 'sliders' /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:34: warning: value computed is not used [-Wunused-value] /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:34: warning: for increment expression has no effect [-Wunused-value] /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:41: error: expected ')' before ']' token for(NSString *key in [window sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:41: error: expected primary-expression before ']' token /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:41: error: expected ';' before ']' token /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:19: warning: unused variable 'key' [-Wunused-variable] for(NSString *key in [window sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: At global scope: /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:755:1: warning: unused parameter '_value' [-Wunused-parameter] @end ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:755:1: warning: unused parameter '_value' [-Wunused-parameter] /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:755:1: warning: unused parameter '_value' [-Wunused-parameter] /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:755:1: warning: unused parameter '_value' [-Wunused-parameter] /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:755:1: warning: unused parameter '_value' [-Wunused-parameter] /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:755:1: warning: unused parameter '_value' [-Wunused-parameter] /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: In function '-[CVView setFrameSize:]': /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:23: error: expected ';' before 'in' for(NSString *key in [cvwindow sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:23: error: 'in' was not declared in this scope /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:36: error: expected ']' before 'sliders' for(NSString *key in [cvwindow sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:36: error: expected ';' before 'sliders' /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:36: error: 'sliders' was not declared in this scope /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:43: error: expected ')' before ']' token for(NSString *key in [cvwindow sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:43: error: expected primary-expression before ']' token /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:43: error: expected ';' before ']' token /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:19: warning: unused variable 'key' [-Wunused-variable] for(NSString *key in [cvwindow sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:841:9: warning: unused variable 'height' [-Wunused-variable] int height = size.height; ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: In function '-[CVView drawRect:]': /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:27: error: expected ';' before 'in' for(NSString *key in [cvwindow sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:27: error: 'in' was not declared in this scope /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:40: error: expected ']' before 'sliders' for(NSString *key in [cvwindow sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:40: error: expected ';' before 'sliders' /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:40: error: 'sliders' was not declared in this scope /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:47: error: expected ')' before ']' token for(NSString *key in [cvwindow sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:47: error: expected primary-expression before ']' token /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:47: error: expected ';' before ']' token /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:23: warning: unused variable 'key' [-Wunused-variable] for(NSString *key in [cvwindow sliders]) { ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:861:9: warning: unused variable 'height' [-Wunused-variable] int height = 0; ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: At global scope: /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:881:1: warning: unused parameter '_value' [-Wunused-parameter] @end ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:937:1: warning: unused parameter '_value' [-Wunused-parameter] @end ^ /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:937:1: warning: unused parameter '_value' [-Wunused-parameter] /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:937:1: warning: unused parameter '_value' [-Wunused-parameter] /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:937:1: warning: unused parameter '_value' [-Wunused-parameter] /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:937:1: warning: unused parameter '_value' [-Wunused-parameter] /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:937:1: warning: unused parameter '_value' [-Wunused-parameter] make[2]: [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_cocoa.mm.o] Error 1 make[1]: [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 make: ** [all] Error 2

click to hide/show revision 2
No.2 Revision

updated 2014-03-30 12:29:44 -0500

berak gravatar image

failed to make opencv.git with gcc48 on macosx mavericks

I forked the repos, and clone a copy on my computer, my OS is macosx maverick and the gcc version is 4.8

I just failed to make the fresh opencv, the error messages are as below, It is the matter of the gcc ?

In file included from /Users/benzene/works/OpenCV/opencv/modules/core/include/opencv2/core.hpp:52:0,
                 from /Users/benzene/works/OpenCV/opencv/modules/highgui/include/opencv2/highgui.hpp:46,
                 from /Users/benzene/works/OpenCV/opencv/modules/highgui/src/precomp.hpp:45,
                 from /Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:43:
/Users/benzene/works/OpenCV/opencv/modules/core/include/opencv2/core/base.hpp:228:35: warning: unknown option after '#pragma GCC diagnostic' kind [-Wpragmas]
 #   pragma GCC diagnostic ignored "-Winvalid-noreturn"
                                   ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: In function 'void cvDestroyAllWindows()':
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:199:23: error: expected ';' before 'in'
     for(NSString key *key in list) {
                       ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:199:23: error: 'in' was not declared in this scope
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:199:26: error: expected ';' before 'list'
     for(NSString *key in list) {
                          ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:199:26: warning: for increment expression has no effect [-Wunused-value]
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: In function 'void cvShowImage(const char, char*, const CvArr)':
CvArr*)':
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:31: error: expected ';' before 'in'
             for(NSString *key in [window sliders]) {
                               ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:31: error: 'in' was not declared in this scope
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:42: error: expected ']' before 'sliders'
             for(NSString *key in [window sliders]) {
                                          ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:42: error: expected ';' before 'sliders'
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:42: error: 'sliders' was not declared in this scope
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:49: error: expected ')' before ']' token
             for(NSString *key in [window sliders]) {
                                                 ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:49: error: expected primary-expression before ']' token
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:49: error: expected ';' before ']' token
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:229:27: warning: unused variable 'key' [-Wunused-variable]
             for(NSString *key in [window sliders]) {
                           ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: In function 'const char cvGetWindowName(void)':
char* cvGetWindowName(void*)':
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:435:23: error: expected ';' before 'in'
     for(NSString *key in windows) {
                       ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:435:23: error: 'in' was not declared in this scope
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:435:26: error: expected ';' before 'windows'
     for(NSString *key in windows) {
                          ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:435:26: warning: for increment expression has no effect [-Wunused-value]
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: In function '-[CVWindow cvSendMouseEvent:type:flags:]':
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:23: error: expected ';' before 'in'
     for(NSString *key in [window sliders]) {
                       ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:23: error: 'in' was not declared in this scope
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:34: error: expected ']' before 'sliders'
     for(NSString *key in [window sliders]) {
                                  ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:34: error: expected ';' before 'sliders'
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:34: warning: value computed is not used [-Wunused-value]
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:34: warning: for increment expression has no effect [-Wunused-value]
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:41: error: expected ')' before ']' token
     for(NSString *key in [window sliders]) {
                                         ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:41: error: expected primary-expression before ']' token
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:41: error: expected ';' before ']' token
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:624:19: warning: unused variable 'key' [-Wunused-variable]
     for(NSString *key in [window sliders]) {
                   ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: At global scope:
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:755:1: warning: unused parameter '_value' [-Wunused-parameter]
 @end
 ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:755:1: warning: unused parameter '_value' [-Wunused-parameter]
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:755:1: warning: unused parameter '_value' [-Wunused-parameter]
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:755:1: warning: unused parameter '_value' [-Wunused-parameter]
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:755:1: warning: unused parameter '_value' [-Wunused-parameter]
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:755:1: warning: unused parameter '_value' [-Wunused-parameter]
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: In function '-[CVView setFrameSize:]':
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:23: error: expected ';' before 'in'
     for(NSString *key in [cvwindow sliders]) {
                       ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:23: error: 'in' was not declared in this scope
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:36: error: expected ']' before 'sliders'
     for(NSString *key in [cvwindow sliders]) {
                                    ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:36: error: expected ';' before 'sliders'
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:36: error: 'sliders' was not declared in this scope
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:43: error: expected ')' before ']' token
     for(NSString *key in [cvwindow sliders]) {
                                           ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:43: error: expected primary-expression before ']' token
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:43: error: expected ';' before ']' token
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:844:19: warning: unused variable 'key' [-Wunused-variable]
     for(NSString *key in [cvwindow sliders]) {
                   ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:841:9: warning: unused variable 'height' [-Wunused-variable]
     int height = size.height;
         ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: In function '-[CVView drawRect:]':
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:27: error: expected ';' before 'in'
         for(NSString *key in [cvwindow sliders]) {
                           ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:27: error: 'in' was not declared in this scope
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:40: error: expected ']' before 'sliders'
         for(NSString *key in [cvwindow sliders]) {
                                        ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:40: error: expected ';' before 'sliders'
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:40: error: 'sliders' was not declared in this scope
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:47: error: expected ')' before ']' token
         for(NSString *key in [cvwindow sliders]) {
                                               ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:47: error: expected primary-expression before ']' token
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:47: error: expected ';' before ']' token
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:863:23: warning: unused variable 'key' [-Wunused-variable]
         for(NSString *key in [cvwindow sliders]) {
                       ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:861:9: warning: unused variable 'height' [-Wunused-variable]
     int height = 0;
         ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm: At global scope:
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:881:1: warning: unused parameter '_value' [-Wunused-parameter]
 @end
 ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:937:1: warning: unused parameter '_value' [-Wunused-parameter]
 @end
 ^
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:937:1: warning: unused parameter '_value' [-Wunused-parameter]
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:937:1: warning: unused parameter '_value' [-Wunused-parameter]
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:937:1: warning: unused parameter '_value' [-Wunused-parameter]
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:937:1: warning: unused parameter '_value' [-Wunused-parameter]
/Users/benzene/works/OpenCV/opencv/modules/highgui/src/window_cocoa.mm:937:1: warning: unused parameter '_value' [-Wunused-parameter]
make[2]:  *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_cocoa.mm.o] Error 1
make[1]:  *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: ** *** [all] Error 2

2