Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Compiler error using GCC 4.8.2 (MacPorts), OS X 10.9.2

I'm trying to build OpenCV 2.4.9 from source on Mac OS X 10.9.2, using GCC 4.8.2 from MacPorts. Unfortunately I'm getting compile errors when trying to build the highgui module.

I'm attaching the CMake output as well as the error messages. It was suggested here to disable QuickTime support (-D WITH_QUICKTIME=OFF) for a similar-looking error, however that doesn't seem to help.

Can someone reproduce this behavior (I'd assume quite a few users must have experience this?) and let me know how to fix the build process? Thanks!

opencv-2.4.9-build$ which gcc
/opt/local/bin/gcc
opencv-2.4.9-build$ gcc --version
gcc (MacPorts gcc48 4.8.2_0) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
opencv-2.4.9-build$ cmake -DWITH_QUICKTIME=OFF ../opencv-2.4.9
-- The CXX compiler identification is GNU 4.8.2
-- The C compiler identification is GNU 4.8.2
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /opt/local/bin/c++
-- Check for working CXX compiler: /opt/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /opt/local/bin/gcc
-- Check for working C compiler: /opt/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detected version of GNU GCC: 48 (408)
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Success
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Success
-- Performing Test HAVE_C_W
-- Performing Test HAVE_C_W - Success
-- Performing Test HAVE_CXX_WALL
-- Performing Test HAVE_CXX_WALL - Success
-- Performing Test HAVE_C_WALL
-- Performing Test HAVE_C_WALL - Success
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_C_WERROR_RETURN_TYPE
-- Performing Test HAVE_C_WERROR_RETURN_TYPE - Success
-- Performing Test HAVE_CXX_WERROR_ADDRESS
-- Performing Test HAVE_CXX_WERROR_ADDRESS - Success
-- Performing Test HAVE_C_WERROR_ADDRESS
-- Performing Test HAVE_C_WERROR_ADDRESS - Success
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT
-- Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success
-- Performing Test HAVE_CXX_WFORMAT
-- Performing Test HAVE_CXX_WFORMAT - Success
-- Performing Test HAVE_C_WFORMAT
-- Performing Test HAVE_C_WFORMAT - Success
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY
-- Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WMISSING_DECLARATIONS
-- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
-- Performing Test HAVE_C_WMISSING_PROTOTYPES
-- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WUNDEF
-- Performing Test HAVE_CXX_WUNDEF - Success
-- Performing Test HAVE_C_WUNDEF
-- Performing Test HAVE_C_WUNDEF - Success
-- Performing Test HAVE_CXX_WINIT_SELF
-- Performing Test HAVE_CXX_WINIT_SELF - Success
-- Performing Test HAVE_C_WINIT_SELF
-- Performing Test HAVE_C_WINIT_SELF - Success
-- Performing Test HAVE_CXX_WPOINTER_ARITH
-- Performing Test HAVE_CXX_WPOINTER_ARITH - Success
-- Performing Test HAVE_C_WPOINTER_ARITH
-- Performing Test HAVE_C_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_WSHADOW
-- Performing Test HAVE_CXX_WSHADOW - Success
-- Performing Test HAVE_C_WSHADOW
-- Performing Test HAVE_C_WSHADOW - Success
-- Performing Test HAVE_CXX_WSIGN_PROMO
-- Performing Test HAVE_CXX_WSIGN_PROMO - Success
-- Performing Test HAVE_C_WSIGN_PROMO
-- Performing Test HAVE_C_WSIGN_PROMO - Failed
-- Performing Test HAVE_CXX_WNO_NARROWING
-- Performing Test HAVE_CXX_WNO_NARROWING - Success
-- Performing Test HAVE_C_WNO_NARROWING
-- Performing Test HAVE_C_WNO_NARROWING - Success
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_CXX_PTHREAD
-- Performing Test HAVE_CXX_PTHREAD - Success
-- Performing Test HAVE_C_PTHREAD
-- Performing Test HAVE_C_PTHREAD - Success
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER
-- Performing Test HAVE_CXX_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER
-- Performing Test HAVE_C_FOMIT_FRAME_POINTER - Success
-- Performing Test HAVE_CXX_MSSE
-- Performing Test HAVE_CXX_MSSE - Success
-- Performing Test HAVE_C_MSSE
-- Performing Test HAVE_C_MSSE - Success
-- Performing Test HAVE_CXX_MSSE2
-- Performing Test HAVE_CXX_MSSE2 - Success
-- Performing Test HAVE_C_MSSE2
-- Performing Test HAVE_C_MSSE2 - Success
-- Performing Test HAVE_CXX_MSSE3
-- Performing Test HAVE_CXX_MSSE3 - Success
-- Performing Test HAVE_C_MSSE3
-- Performing Test HAVE_C_MSSE3 - Success
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Performing Test HAVE_C_WNO_ATTRIBUTES
-- Performing Test HAVE_C_WNO_ATTRIBUTES - Success
-- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES
-- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES - Success
-- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES
-- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES - Success
-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS - Success
-- Looking for assert.h
-- Looking for assert.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for io.h
-- Looking for io.h - not found
-- Looking for jbg_newlen
-- Looking for jbg_newlen - not found
-- Looking for mmap
-- Looking for mmap - found
-- Looking for search.h
-- Looking for search.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- Performing Test HAVE_C_WNO_UNDEF
-- Performing Test HAVE_C_WNO_UNDEF - Success
-- Performing Test HAVE_C_WNO_UNUSED
-- Performing Test HAVE_C_WNO_UNUSED - Success
-- Performing Test HAVE_C_WNO_SIGN_COMPARE
-- Performing Test HAVE_C_WNO_SIGN_COMPARE - Success
-- Performing Test HAVE_C_WNO_CAST_ALIGN
-- Performing Test HAVE_C_WNO_CAST_ALIGN - Success
-- Performing Test HAVE_C_WNO_SHADOW
-- Performing Test HAVE_C_WNO_SHADOW - Success
-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED
-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED - Success
-- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST
-- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST - Success
-- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST
-- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST - Success
-- Performing Test HAVE_C_WNO_UNUSED_PARAMETER
-- Performing Test HAVE_C_WNO_UNUSED_PARAMETER - Success
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER - Success
-- Performing Test HAVE_C_WNO_IMPLICIT_FUNCTION_DECLARATION
-- Performing Test HAVE_C_WNO_IMPLICIT_FUNCTION_DECLARATION - Success
-- Performing Test HAVE_C_WNO_UNINITIALIZED
-- Performing Test HAVE_C_WNO_UNINITIALIZED - Success
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_PARAMETER
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_PARAMETER - Success
-- Looking for semaphore.h
-- Looking for semaphore.h - found
-- Performing Test HAVE_CXX_WNO_SHADOW
-- Performing Test HAVE_CXX_WNO_SHADOW - Success
-- Performing Test HAVE_CXX_WNO_UNUSED
-- Performing Test HAVE_CXX_WNO_UNUSED - Success
-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE
-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE - Success
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Performing Test HAVE_CXX_WNO_UNINITIALIZED
-- Performing Test HAVE_CXX_WNO_UNINITIALIZED - Success
-- Performing Test HAVE_CXX_WNO_SWITCH
-- Performing Test HAVE_CXX_WNO_SWITCH - Success
-- Performing Test HAVE_CXX_WNO_PARENTHESES
-- Performing Test HAVE_CXX_WNO_PARENTHESES - Success
-- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS
-- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS - Success
-- Performing Test HAVE_CXX_WNO_EXTRA
-- Performing Test HAVE_CXX_WNO_EXTRA - Success
-- checking for module 'libdc1394-2'
--   package 'libdc1394-2' not found
-- checking for module 'libdc1394'
--   package 'libdc1394' not found
-- checking for module 'libv4l1'
--   package 'libv4l1' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - not found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- checking for module 'libavcodec'
--   found libavcodec, version 55.52.102
-- checking for module 'libavformat'
--   found libavformat, version 55.33.100
-- checking for module 'libavutil'
--   found libavutil, version 52.66.100
-- checking for module 'libswscale'
--   found libswscale, version 2.5.102
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- Found PythonInterp: /anaconda/bin/python2 (found suitable version "2.7.6", minimum required is "2.0") 
-- Could NOT find PythonLibs: Found unsuitable version "2.7.5", but required is exact version "2.7.6" (found /usr/lib/libpython2.7.dylib)
-- Found Sphinx 1.2.2: /anaconda/bin/sphinx-build
-- Found JNI: -framework JavaVM  
-- Assume that non-module dependency is available: -framework OpenCL (for module opencv_ocl)
-- Performing Test HAVE_OBJCXX_FOBJC_EXCEPTIONS
-- Performing Test HAVE_OBJCXX_FOBJC_EXCEPTIONS - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- 
-- General configuration for OpenCV 2.4.9 =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Host:                        Darwin 13.1.0 i386
--     CMake:                       2.8.12.2
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /opt/local/bin/gmake
--     Configuration:               Release
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /opt/local/bin/c++  (ver 4.8.2)
--     C++ flags (Release):         -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
--     C++ flags (Debug):           -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 -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /opt/local/bin/gcc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -pthread -fomit-frame-pointer -msse -msse2 -msse3 -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -pthread -fomit-frame-pointer -msse -msse2 -msse3 -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         YES
-- 
--   OpenCV modules:
--     To be built:                 core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib python stitching superres ts videostab
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera dynamicuda java viz
-- 
--   GUI: 
--     QT:                          NO
--     Cocoa:                       YES
--     OpenGL support:              NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        build (ver 1.2.7)
--     JPEG:                        build (ver 62)
--     PNG:                         build (ver 1.5.12)
--     TIFF:                        build (ver 42 - 4.0.2)
--     JPEG 2000:                   build (ver 1.900.1)
--     OpenEXR:                     build (ver 1.7.1)
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  NO
--     FFMPEG:                      YES
--       codec:                     YES (ver Unknown)
--       format:                    YES (ver Unknown)
--       util:                      YES (ver Unknown)
--       swscale:                   YES (ver Unknown)
--       gentoo-style:              YES
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     QuickTime:                   NO
--     QTKit:                       YES
--     V4L/V4L2:                    NO/NO
-- 
--   Other third-party libraries:
--     Use IPP:                     NO
--     Use Eigen:                   NO
--     Use TBB:                     NO
--     Use OpenMP:                  NO
--     Use GCD                      YES
--     Use Concurrency              NO
--     Use C=:                      NO
--     Use Cuda:                    NO
--     Use OpenCL:                  YES
-- 
--   OpenCL:
--     Version:                     static
--     libraries:                   -framework OpenCL
--     Use AMD FFT:                 NO
--     Use AMD BLAS:                NO
-- 
--   Python:
--     Interpreter:                 /anaconda/bin/python2 (ver 2.7.6)
--     Libraries:                   /usr/lib/libpython2.7.dylib (ver 2.7.5)
--     numpy:                       /anaconda/lib/python2.7/site-packages/numpy/core/include (ver 1.8.0)
--     packages path:               lib/python2.7/site-packages
-- 
--   Java:
--     ant:                         NO
--     JNI:                         /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers
--     Java tests:                  NO
-- 
--   Documentation:
--     Build Documentation:         YES (only HTML and without math expressions)
--     Sphinx:                      /anaconda/bin/sphinx-build (ver 1.2.2)
--     PdfLaTeX compiler:           NO
-- 
--   Tests and samples:
--     Tests:                       YES
--     Performance tests:           YES
--     C/C++ Examples:              NO
-- 
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /build/opencv-2.4.9-build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /build/opencv-2.4.9-build

opencv-2.4.9-build$ make
[  2%] Built target zlib
[  6%] Built target libtiff
[  9%] Built target libjpeg
[ 13%] Built target libjasper
[ 16%] Built target libpng
[ 20%] Built target IlmImf
[ 23%] Built target opencv_core_pch_dephelp
[ 23%] Built target pch_Generate_opencv_core
[ 25%] Built target opencv_core
[ 25%] Built target opencv_ts_pch_dephelp
[ 25%] Built target pch_Generate_opencv_ts
[ 25%] Built target opencv_features2d_pch_dephelp
[ 27%] Built target pch_Generate_opencv_features2d
[ 27%] Built target opencv_flann_pch_dephelp
[ 27%] Built target pch_Generate_opencv_flann
[ 27%] Built target opencv_flann
[ 27%] Built target opencv_imgproc_pch_dephelp
[ 27%] Built target pch_Generate_opencv_imgproc
[ 30%] Built target opencv_imgproc
[ 30%] Built target opencv_highgui_pch_dephelp
[ 30%] Built target pch_Generate_opencv_highgui
[ 30%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_cocoa.mm.o
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm: In function 'void cvDestroyAllWindows()':
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:200:23: error: expected ';' before 'in'
     for(NSString *key in list) {
                       ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:200:23: error: 'in' was not declared in this scope
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:200:26: error: expected ';' before 'list'
     for(NSString *key in list) {
                          ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:200:26: warning: for increment expression has no effect [-Wunused-value]
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm: In function 'void cvShowImage(const char*, const CvArr*)':
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:230:31: error: expected ';' before 'in'
             for(NSString *key in [window sliders]) {
                               ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:230:31: error: 'in' was not declared in this scope
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:230:42: error: expected ']' before 'sliders'
             for(NSString *key in [window sliders]) {
                                          ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:230:42: error: expected ';' before 'sliders'
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:230:42: error: 'sliders' was not declared in this scope
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:230:49: error: expected ')' before ']' token
             for(NSString *key in [window sliders]) {
                                                 ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:230:49: error: expected primary-expression before ']' token
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:230:49: error: expected ';' before ']' token
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:230:27: warning: unused variable 'key' [-Wunused-variable]
             for(NSString *key in [window sliders]) {
                           ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm: In function 'const char* cvGetWindowName(void*)':
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:436:23: error: expected ';' before 'in'
     for(NSString *key in windows) {
                       ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:436:23: error: 'in' was not declared in this scope
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:436:26: error: expected ';' before 'windows'
     for(NSString *key in windows) {
                          ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:436:26: warning: for increment expression has no effect [-Wunused-value]
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm: In function '-[CVWindow cvSendMouseEvent:type:flags:]':
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:625:23: error: expected ';' before 'in'
     for(NSString *key in [window sliders]) {
                       ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:625:23: error: 'in' was not declared in this scope
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:625:34: error: expected ']' before 'sliders'
     for(NSString *key in [window sliders]) {
                                  ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:625:34: error: expected ';' before 'sliders'
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:625:34: warning: value computed is not used [-Wunused-value]
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:625:34: warning: for increment expression has no effect [-Wunused-value]
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:625:41: error: expected ')' before ']' token
     for(NSString *key in [window sliders]) {
                                         ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:625:41: error: expected primary-expression before ']' token
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:625:41: error: expected ';' before ']' token
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:625:19: warning: unused variable 'key' [-Wunused-variable]
     for(NSString *key in [window sliders]) {
                   ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm: At global scope:
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:756:1: warning: unused parameter '_value' [-Wunused-parameter]
 @end
 ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:756:1: warning: unused parameter '_value' [-Wunused-parameter]
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:756:1: warning: unused parameter '_value' [-Wunused-parameter]
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:756:1: warning: unused parameter '_value' [-Wunused-parameter]
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:756:1: warning: unused parameter '_value' [-Wunused-parameter]
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:756:1: warning: unused parameter '_value' [-Wunused-parameter]
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm: In function '-[CVView setFrameSize:]':
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:845:23: error: expected ';' before 'in'
     for(NSString *key in [cvwindow sliders]) {
                       ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:845:23: error: 'in' was not declared in this scope
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:845:36: error: expected ']' before 'sliders'
     for(NSString *key in [cvwindow sliders]) {
                                    ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:845:36: error: expected ';' before 'sliders'
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:845:36: error: 'sliders' was not declared in this scope
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:845:43: error: expected ')' before ']' token
     for(NSString *key in [cvwindow sliders]) {
                                           ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:845:43: error: expected primary-expression before ']' token
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:845:43: error: expected ';' before ']' token
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:845:19: warning: unused variable 'key' [-Wunused-variable]
     for(NSString *key in [cvwindow sliders]) {
                   ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:842:9: warning: unused variable 'height' [-Wunused-variable]
     int height = size.height;
         ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm: In function '-[CVView drawRect:]':
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:864:27: error: expected ';' before 'in'
         for(NSString *key in [cvwindow sliders]) {
                           ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:864:27: error: 'in' was not declared in this scope
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:864:40: error: expected ']' before 'sliders'
         for(NSString *key in [cvwindow sliders]) {
                                        ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:864:40: error: expected ';' before 'sliders'
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:864:40: error: 'sliders' was not declared in this scope
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:864:47: error: expected ')' before ']' token
         for(NSString *key in [cvwindow sliders]) {
                                               ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:864:47: error: expected primary-expression before ']' token
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:864:47: error: expected ';' before ']' token
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:864:23: warning: unused variable 'key' [-Wunused-variable]
         for(NSString *key in [cvwindow sliders]) {
                       ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:862:9: warning: unused variable 'height' [-Wunused-variable]
     int height = 0;
         ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm: At global scope:
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:882:1: warning: unused parameter '_value' [-Wunused-parameter]
 @end
 ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:938:1: warning: unused parameter '_value' [-Wunused-parameter]
 @end
 ^
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:938:1: warning: unused parameter '_value' [-Wunused-parameter]
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:938:1: warning: unused parameter '_value' [-Wunused-parameter]
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:938:1: warning: unused parameter '_value' [-Wunused-parameter]
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:938:1: warning: unused parameter '_value' [-Wunused-parameter]
/build/opencv-2.4.9/modules/highgui/src/window_cocoa.mm:938: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