Ask Your Question

mailseth's profile - activity

2013-07-03 11:58:52 -0600 received badge  Editor (source)
2013-06-13 18:23:46 -0600 asked a question Unable to compile on Mac 10.8

I've tried downloading trunk, 2.4.5, 2.4.4, and 2.4.2 and I get the same error with each. I'm running Mac OS 10.8.4 with the latest XCode. Is this a bug in the build system?

$ mkdir build
$ cd build
$ cmake -G "Unix Makefiles" .. (or cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON ..)
-- The CXX compiler identification is GNU
-- The C compiler identification is GNU
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
[...snip...]
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /usr/local/opencv/opencv-2.4.4/build
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/opencv/opencv-2.4.4/build
$ make (or make -j8)
CMake Error: Parse error in cache file /usr/local/opencv/opencv-2.4.4/build/CMakeCache.txt. Offending entry: /SDKs/MacOSX10.8.sdk
-- Detected version of GNU GCC: 42 (402)
-- checking for module 'libdc1394-2'
--   package 'libdc1394-2' not found
[...snip...]
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /usr/local/opencv/opencv-2.4.4/build
-- -----------------------------------------------------------------
-- 
-- Configuring incomplete, errors occurred!
make: *** [cmake_check_build_system] Error 1
$

If I follow the instructions here: http://lists.gforge.inria.fr/pipermail/simgrid-user/2012-December/003179.html

I change the SYSROOT to look like this: CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer

I get this ("make -j8" is similar, but more verbose):

$ make    
[  0%] Building C object 3rdparty/zlib/CMakeFiles/zlib.dir/adler32.c.o
In file included from /usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin11/4.2.1/include/limits.h:15,
                 from /usr/local/opencv/opencv/build/3rdparty/zlib/zconf.h:396,
                 from /usr/local/opencv/opencv/3rdparty/zlib/zlib.h:34,
                 from /usr/local/opencv/opencv/3rdparty/zlib/zutil.h:22,
                 from /usr/local/opencv/opencv/3rdparty/zlib/adler32.c:8:
/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include/limits.h:15:25: error: no include path in which to search for limits.h
[...snip...]
/usr/local/opencv/opencv/3rdparty/zlib/adler32.c:177: error: number of arguments doesn't match prototype
/usr/local/opencv/opencv/3rdparty/zlib/zutil.h:172: error: prototype declaration
/usr/local/opencv/opencv/3rdparty/zlib/adler32.c:178: error: too many arguments to function 'adler32_combine_'
make[2]: *** [3rdparty/zlib/CMakeFiles/zlib.dir/adler32.c.o] Error 1
make[1]: *** [3rdparty/zlib/CMakeFiles/zlib.dir/all] Error 2
make: *** [all] Error 2

I've spent most of my day trying to install OpenCV, but no progress. Any ideas?

EDIT: Just tried again with v2.4.6 and no improvement.