thp / psmoveapi

Cross-platform library for 6DoF tracking of the PS Move Motion Controller. Sensor fusion, computer vision, ambient display (LED orb).
https://thp.io/2010/psmove/
Other
467 stars 160 forks source link

Build error under OSX El Capitan #204

Closed joezavtra closed 8 years ago

joezavtra commented 8 years ago

First of all, thank you guys for this lib!

I've used older version of psmoveapi from November i think. All was OK. But after pulling new version it does not build.

Latest OpenCV from github was successfully built and installed. But got following when I tried to build psmoveapi (cut out some parts):

jz@mac:~/ws/psmoveapi/build [master]$ cmake ../

  Tracker
    Tracker library:  Yes
    AHRS algorithm:   None
    PS Eye support:   Yes
    HTML tracing:     No
    Use CL Eye SDK:   No
    Use PS3EYEDriver: No (disabled)

  Build configuration
    Debug build:      No
    Library license:  BSD (see README for details)
    BlueZ 5 support:  No (for pairing on Linux only)

  Additional targets
    C example apps:   Yes
    OpenGL examples:  Yes
    C test programs:  Yes
    C++ TUIO server:  Yes

  Language bindings
    Python:           No (SWIG not found)
    Java:             No (SWIG not found)
    C#:               No (SWIG not found)
    Processing:       No (SWIG not found)

-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   psmoveapi
   psmoveapi_tracker

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/jz/ws/psmoveapi/build

Seems OK

jz@mac:~/ws/psmoveapi/build [master]$ make

Scanning dependencies of target psmoveapi
[  1%] Building C object CMakeFiles/psmoveapi.dir/src/psmove.c.o
/Users/jz/ws/psmoveapi/src/psmove.c:2165:45: warning: the value of the size argument in 'strncat' is too large,
      might lead to a buffer overflow [-Wstrncat-size]
        strncat(dir, PATH_SEP ".psmoveapi", sizeof(dir));
                                            ^~~~~~~~~~~
/Users/jz/ws/psmoveapi/src/psmove.c:2165:45: note: change the argument to be the free space in the destination
      buffer minus the terminating null byte
        strncat(dir, PATH_SEP ".psmoveapi", sizeof(dir));
                                            ^~~~~~~~~~~
                                            sizeof(dir) - strlen(dir) - 1
1 warning generated.
[  2%] Building C object CMakeFiles/psmoveapi.dir/src/psmove_calibration.c.o
#####
[ 11%] Building C object CMakeFiles/psmoveapi_tracker.dir/src/tracker/psmove_tracker.c.o
/Users/jz/ws/psmoveapi/src/tracker/psmove_tracker.c:483:9: warning: implicit declaration of function
      'camera_control_initialize' is invalid in C99 [-Wimplicit-function-declaration]
        camera_control_initialize();
        ^
1 warning generated.
[ 12%] Building C object CMakeFiles/psmoveapi_tracker.dir/src/tracker/tracker_helpers.c.o
[ 13%] Building C object CMakeFiles/psmoveapi_tracker.dir/src/tracker/tracker_trace.c.o
[ 14%] Building CXX object CMakeFiles/psmoveapi_tracker.dir/src/tracker/psmove_fusion.cpp.o
In file included from /Users/jz/ws/psmoveapi/src/tracker/psmove_fusion.cpp:38:
In file included from /Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/glm.hpp:97:
In file included from /Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/./core/type.hpp:32:
In file included from /Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/core/type_half.hpp:117:
/Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/core/type_half.inl:138:3: warning: 'register' storage
      class specifier is deprecated [-Wdeprecated-register]
                register int s =  (i >> 16) & 0x00008000;
                ^~~~~~~~~
/Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/core/type_half.inl:139:3: warning: 'register' storage
      class specifier is deprecated [-Wdeprecated-register]
                register int e = ((i >> 23) & 0x000000ff) - (127 - 15);
                ^~~~~~~~~
/Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/core/type_half.inl:140:3: warning: 'register' storage
      class specifier is deprecated [-Wdeprecated-register]
                register int m =   i        & 0x007fffff;
                ^~~~~~~~~
In file included from /Users/jz/ws/psmoveapi/src/tracker/psmove_fusion.cpp:38:
In file included from /Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/glm.hpp:106:
In file included from /Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/./core/func_integer.hpp:198:
/Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/core/func_integer.inl:107:95: warning: operator '<<' has
      lower precedence than '-'; '-' will be evaluated first [-Wshift-op-parentheses]
  ...return genUType(detail::highp_int_t(1) << detail::highp_int_t(32) + detail::highp_int_t(x) - detail::highp_int_t(y));
                                            ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/core/func_integer.inl:107:95: note: place parentheses
      around the '-' expression to silence this warning
  ...genUType(detail::highp_int_t(1) << detail::highp_int_t(32) + detail::highp_int_t(x) - detail::highp_int_t(y));
                                                                                         ^
                                        (                                                                        )
4 warnings generated.
[ 15%] Building C object CMakeFiles/psmoveapi_tracker.dir/src/tracker/platform/psmove_osxsupport.m.o
#####
[ 26%] Building C object CMakeFiles/psmoveapi_static.dir/src/psmove.c.o
/Users/jz/ws/psmoveapi/src/psmove.c:2165:45: warning: the value of the size argument in 'strncat' is too large,
      might lead to a buffer overflow [-Wstrncat-size]
        strncat(dir, PATH_SEP ".psmoveapi", sizeof(dir));
                                            ^~~~~~~~~~~
/Users/jz/ws/psmoveapi/src/psmove.c:2165:45: note: change the argument to be the free space in the destination
      buffer minus the terminating null byte
        strncat(dir, PATH_SEP ".psmoveapi", sizeof(dir));
                                            ^~~~~~~~~~~
                                            sizeof(dir) - strlen(dir) - 1
1 warning generated.
[ 27%] Building C object CMakeFiles/psmoveapi_static.dir/src/psmove_calibration.c.o
[ 47%] Building C object CMakeFiles/psmoveapi_tracker_static.dir/src/tracker/psmove_tracker.c.o
/Users/jz/ws/psmoveapi/src/tracker/psmove_tracker.c:483:9: warning: implicit declaration of function
      'camera_control_initialize' is invalid in C99 [-Wimplicit-function-declaration]
        camera_control_initialize();
        ^
1 warning generated.
[ 48%] Building C object CMakeFiles/psmoveapi_tracker_static.dir/src/tracker/tracker_helpers.c.o
[ 49%] Building C object CMakeFiles/psmoveapi_tracker_static.dir/src/tracker/tracker_trace.c.o
[ 50%] Building CXX object CMakeFiles/psmoveapi_tracker_static.dir/src/tracker/psmove_fusion.cpp.o
In file included from /Users/jz/ws/psmoveapi/src/tracker/psmove_fusion.cpp:38:
In file included from /Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/glm.hpp:97:
In file included from /Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/./core/type.hpp:32:
In file included from /Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/core/type_half.hpp:117:
/Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/core/type_half.inl:138:3: warning: 'register' storage
      class specifier is deprecated [-Wdeprecated-register]
                register int s =  (i >> 16) & 0x00008000;
                ^~~~~~~~~
/Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/core/type_half.inl:139:3: warning: 'register' storage
      class specifier is deprecated [-Wdeprecated-register]
                register int e = ((i >> 23) & 0x000000ff) - (127 - 15);
                ^~~~~~~~~
/Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/core/type_half.inl:140:3: warning: 'register' storage
      class specifier is deprecated [-Wdeprecated-register]
                register int m =   i        & 0x007fffff;
                ^~~~~~~~~
In file included from /Users/jz/ws/psmoveapi/src/tracker/psmove_fusion.cpp:38:
In file included from /Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/glm.hpp:106:
In file included from /Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/./core/func_integer.hpp:198:
/Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/core/func_integer.inl:107:95: warning: operator '<<' has
      lower precedence than '-'; '-' will be evaluated first [-Wshift-op-parentheses]
  ...return genUType(detail::highp_int_t(1) << detail::highp_int_t(32) + detail::highp_int_t(x) - detail::highp_int_t(y));
                                            ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/Users/jz/ws/psmoveapi/src/tracker/../../external/glm/glm/core/func_integer.inl:107:95: note: place parentheses
      around the '-' expression to silence this warning
  ...genUType(detail::highp_int_t(1) << detail::highp_int_t(32) + detail::highp_int_t(x) - detail::highp_int_t(y));
                                                                                         ^
                                        (                                                                        )
4 warnings generated.
[ 51%] Building C object 
#####
[ 70%] Building CXX object CMakeFiles/test_opengl.dir/examples/c/test_opengl.cpp.o
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl.cpp:39:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:33:8: warning: 'GLUquadricObj' is deprecated: first
      deprecated in OS X 10.9 [-Wdeprecated-declarations]
static GLUquadricObj *g_quadObj;
       ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:224:26: note: 'GLUquadricObj' has been explicitly marked
      deprecated here
typedef class GLUquadric GLUquadricObj OPENGL_DEPRECATED(10_0, 10_9);
                         ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl.cpp:39:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:58:14: warning: 'gluNewQuadric' is deprecated: first
      deprecated in OS X 10.9 [-Wdeprecated-declarations]
        g_quadObj = gluNewQuadric();
                    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:267:20: note: 'gluNewQuadric' has been explicitly marked
      deprecated here
extern GLUquadric* gluNewQuadric (void) OPENGL_DEPRECATED(10_0, 10_9);
                   ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl.cpp:39:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:119:2: warning: 'gluQuadricDrawStyle' is deprecated:
      first deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluQuadricDrawStyle(g_quadObj, GLU_LINE);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:283:13: note: 'gluQuadricDrawStyle' has been explicitly marked
      deprecated here
extern void gluQuadricDrawStyle (GLUquadric* quad, GLenum draw) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl.cpp:39:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:120:2: warning: 'gluQuadricNormals' is deprecated:
      first deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluQuadricNormals(g_quadObj, GLU_SMOOTH);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:284:13: note: 'gluQuadricNormals' has been explicitly marked
      deprecated here
extern void gluQuadricNormals (GLUquadric* quad, GLenum normal) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl.cpp:39:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:121:2: warning: 'gluSphere' is deprecated: first
      deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluSphere(g_quadObj, radius, slices, stacks);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:288:13: note: 'gluSphere' has been explicitly marked deprecated
      here
extern void gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl.cpp:39:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:127:2: warning: 'gluQuadricDrawStyle' is deprecated:
      first deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluQuadricDrawStyle(g_quadObj, GLU_FILL);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:283:13: note: 'gluQuadricDrawStyle' has been explicitly marked
      deprecated here
extern void gluQuadricDrawStyle (GLUquadric* quad, GLenum draw) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl.cpp:39:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:128:2: warning: 'gluQuadricNormals' is deprecated:
      first deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluQuadricNormals(g_quadObj, GLU_SMOOTH);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:284:13: note: 'gluQuadricNormals' has been explicitly marked
      deprecated here
extern void gluQuadricNormals (GLUquadric* quad, GLenum normal) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl.cpp:39:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:129:2: warning: 'gluSphere' is deprecated: first
      deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluSphere(g_quadObj, radius, slices, stacks);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:288:13: note: 'gluSphere' has been explicitly marked deprecated
      here
extern void gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks) OPENGL_DEPRECATED(10_0, 10_9);
            ^
8 warnings generated.
[ 71%] Linking CXX executable test_opengl
[ 71%] Built target test_opengl
Scanning dependencies of target test_opengl2
[ 72%] Building CXX object CMakeFiles/test_opengl2.dir/examples/c/test_opengl2.cpp.o
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl2.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:33:8: warning: 'GLUquadricObj' is deprecated: first
      deprecated in OS X 10.9 [-Wdeprecated-declarations]
static GLUquadricObj *g_quadObj;
       ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:224:26: note: 'GLUquadricObj' has been explicitly marked
      deprecated here
typedef class GLUquadric GLUquadricObj OPENGL_DEPRECATED(10_0, 10_9);
                         ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl2.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:58:14: warning: 'gluNewQuadric' is deprecated: first
      deprecated in OS X 10.9 [-Wdeprecated-declarations]
        g_quadObj = gluNewQuadric();
                    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:267:20: note: 'gluNewQuadric' has been explicitly marked
      deprecated here
extern GLUquadric* gluNewQuadric (void) OPENGL_DEPRECATED(10_0, 10_9);
                   ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl2.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:119:2: warning: 'gluQuadricDrawStyle' is deprecated:
      first deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluQuadricDrawStyle(g_quadObj, GLU_LINE);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:283:13: note: 'gluQuadricDrawStyle' has been explicitly marked
      deprecated here
extern void gluQuadricDrawStyle (GLUquadric* quad, GLenum draw) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl2.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:120:2: warning: 'gluQuadricNormals' is deprecated:
      first deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluQuadricNormals(g_quadObj, GLU_SMOOTH);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:284:13: note: 'gluQuadricNormals' has been explicitly marked
      deprecated here
extern void gluQuadricNormals (GLUquadric* quad, GLenum normal) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl2.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:121:2: warning: 'gluSphere' is deprecated: first
      deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluSphere(g_quadObj, radius, slices, stacks);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:288:13: note: 'gluSphere' has been explicitly marked deprecated
      here
extern void gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl2.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:127:2: warning: 'gluQuadricDrawStyle' is deprecated:
      first deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluQuadricDrawStyle(g_quadObj, GLU_FILL);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:283:13: note: 'gluQuadricDrawStyle' has been explicitly marked
      deprecated here
extern void gluQuadricDrawStyle (GLUquadric* quad, GLenum draw) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl2.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:128:2: warning: 'gluQuadricNormals' is deprecated:
      first deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluQuadricNormals(g_quadObj, GLU_SMOOTH);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:284:13: note: 'gluQuadricNormals' has been explicitly marked
      deprecated here
extern void gluQuadricNormals (GLUquadric* quad, GLenum normal) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl2.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:129:2: warning: 'gluSphere' is deprecated: first
      deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluSphere(g_quadObj, radius, slices, stacks);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:288:13: note: 'gluSphere' has been explicitly marked deprecated
      here
extern void gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks) OPENGL_DEPRECATED(10_0, 10_9);
            ^
8 warnings generated.
[ 73%] Linking CXX executable test_opengl2
[ 73%] Built target test_opengl2
Scanning dependencies of target test_opengl3
[ 74%] Building CXX object CMakeFiles/test_opengl3.dir/examples/c/test_opengl3.cpp.o
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl3.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:33:8: warning: 'GLUquadricObj' is deprecated: first
      deprecated in OS X 10.9 [-Wdeprecated-declarations]
static GLUquadricObj *g_quadObj;
       ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:224:26: note: 'GLUquadricObj' has been explicitly marked
      deprecated here
typedef class GLUquadric GLUquadricObj OPENGL_DEPRECATED(10_0, 10_9);
                         ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl3.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:58:14: warning: 'gluNewQuadric' is deprecated: first
      deprecated in OS X 10.9 [-Wdeprecated-declarations]
        g_quadObj = gluNewQuadric();
                    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:267:20: note: 'gluNewQuadric' has been explicitly marked
      deprecated here
extern GLUquadric* gluNewQuadric (void) OPENGL_DEPRECATED(10_0, 10_9);
                   ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl3.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:119:2: warning: 'gluQuadricDrawStyle' is deprecated:
      first deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluQuadricDrawStyle(g_quadObj, GLU_LINE);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:283:13: note: 'gluQuadricDrawStyle' has been explicitly marked
      deprecated here
extern void gluQuadricDrawStyle (GLUquadric* quad, GLenum draw) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl3.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:120:2: warning: 'gluQuadricNormals' is deprecated:
      first deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluQuadricNormals(g_quadObj, GLU_SMOOTH);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:284:13: note: 'gluQuadricNormals' has been explicitly marked
      deprecated here
extern void gluQuadricNormals (GLUquadric* quad, GLenum normal) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl3.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:121:2: warning: 'gluSphere' is deprecated: first
      deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluSphere(g_quadObj, radius, slices, stacks);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:288:13: note: 'gluSphere' has been explicitly marked deprecated
      here
extern void gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl3.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:127:2: warning: 'gluQuadricDrawStyle' is deprecated:
      first deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluQuadricDrawStyle(g_quadObj, GLU_FILL);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:283:13: note: 'gluQuadricDrawStyle' has been explicitly marked
      deprecated here
extern void gluQuadricDrawStyle (GLUquadric* quad, GLenum draw) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl3.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:128:2: warning: 'gluQuadricNormals' is deprecated:
      first deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluQuadricNormals(g_quadObj, GLU_SMOOTH);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:284:13: note: 'gluQuadricNormals' has been explicitly marked
      deprecated here
extern void gluQuadricNormals (GLUquadric* quad, GLenum normal) OPENGL_DEPRECATED(10_0, 10_9);
            ^
In file included from /Users/jz/ws/psmoveapi/examples/c/test_opengl3.cpp:40:
/Users/jz/ws/psmoveapi/examples/c/psmove_examples_opengl.h:129:2: warning: 'gluSphere' is deprecated: first
      deprecated in OS X 10.9 [-Wdeprecated-declarations]
        gluSphere(g_quadObj, radius, slices, stacks);
        ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:288:13: note: 'gluSphere' has been explicitly marked deprecated
      here
extern void gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks) OPENGL_DEPRECATED(10_0, 10_9);
            ^
8 warnings generated.
[ 75%] Linking CXX executable test_opengl3

..... all OK here .....

[ 86%] Building C object CMakeFiles/tracker_camera_calibration.dir/examples/c/tracker_camera_calibration.c.o
In file included from /Users/jz/ws/psmoveapi/examples/c/tracker_camera_calibration.c:42:
In file included from /usr/local/include/opencv2/calib3d/calib3d.hpp:48:
In file included from /usr/local/include/opencv2/calib3d.hpp:47:
/usr/local/include/opencv2/core.hpp:49:4: error: core.hpp header must be compiled as C++
#  error core.hpp header must be compiled as C++
   ^
In file included from /Users/jz/ws/psmoveapi/examples/c/tracker_camera_calibration.c:42:
In file included from /usr/local/include/opencv2/calib3d/calib3d.hpp:48:
In file included from /usr/local/include/opencv2/calib3d.hpp:47:
In file included from /usr/local/include/opencv2/core.hpp:54:
/usr/local/include/opencv2/core/base.hpp:49:4: error: base.hpp header must be compiled as C++
#  error base.hpp header must be compiled as C++
   ^
/usr/local/include/opencv2/core/base.hpp:52:10: fatal error: 'climits' file not found
#include <climits>
         ^
3 errors generated.
make[2]: *** [CMakeFiles/tracker_camera_calibration.dir/examples/c/tracker_camera_calibration.c.o] Error 1
make[1]: *** [CMakeFiles/tracker_camera_calibration.dir/all] Error 2
make: *** [all] Error 2

Thanx

cboulay commented 8 years ago

What options did you use to build and install opencv? Did you follow the directions here?

I haven't tried in a while but those options definitely worked for me in the past.

Based on your error, it's not picking up opencv in the psmoveapi/external folder, rather cmake is picking up the system-installed opencv. Is that what you intended? If so then I wonder if maybe you didn't build all the opencv modules when you installed opencv? Can you try uninstalling the system opencv and instead installing it with homebrew?

cboulay commented 8 years ago

I just noticed you did a cmake ../

I don't think you should run cmake with only the default options. I think the defaults might need fixing, but until then you should at least pass -DPSMOVE_USE_PS3EYE_DRIVER=ON for OS X if you're using the PSEye.

If you want to specify the folder in which to find OpenCV then also pass this option: -DOpenCV_DIR=<path_to OpenCVConfig.cmake>

thp commented 8 years ago

236 merged, closing this as fixed. Please reopen if it's still an issue for you.