Setting up the Kinect on OSX 10.8 (Mountain Lion)

It is time to get your Kinect Sensor up and running in OSX 10.8 (Mountain Lion). A simple Google search on the topic will result in numerous outdated blog postings. I believe my posting will be beneficial for some, especially for those who don’t want to go through the painful process of weeding out all the outdated info. I will cover the most basic implementation of installation, prior to adding middle-ware packages that help you visualize your projects, like Processing, openFrameworks, AS3, ect.

*NOTE – if you are new to the Terminal Emulator included in  OS X operating system, proceed with caution! Terminal.app is used by users who need to access that Mac’s operating system at a low level, so you can get yourself in a pickle.

Lets get crackin’!

(1) Download and install the latest version of Xcode from the app store. Once it’s installed, open up Xcode and select:
Xcode>Open Developer Tool>More Developer Tools..

Screen Shot 2013-04-04 at 8.18.38 PM

Sign in using your AppleID (if you don’t have one, register, it’s free).
Download the Command Line Tools(OSX Mountain Lion) for Xcode and install it.

Screen Shot 2013-04-04 at 8.23.14 PM

(2) Download MacPorts and install it. (FYI- you can also use Homebrew, but I didn’t go down that route.)

(2) Download CMake and install it. You may get an “unidentified developer” prompt from OSX when you try to install CMake:

Screen Shot 2013-04-04 at 8.43.59 PM

Select OK. Navigate to the pkg and right click and select OPEN:

Screen Shot 2013-04-04 at 8.48.27 PM

You shall see another prompt, ignore and select Open:

Screen Shot 2013-04-04 at 8.44.34 PM

When installing CMake, make sure to install Command-Line Links (don’t skip this!).

file

(5) Now, fire up Terminal: Applications> Utilities> Terminal
and install Libtool by running the following command:

sudo port install libtool

Press return, and then, enter the administrator password and press return.

(Image of a successful install)
Screen Shot 2013-04-04 at 8.57.46 PM

*NOTE – make sure the install was successful and NO errors were reported. If there are errors do not proceed, resolve them before moving on.

When the installation is done, restart your Mac.

(6) Fire up terminal and install Libusb by typing the following command:

sudo port install libusb +universal

Press return, and then, enter the administrator password and press return.

(Image of a successful install)
Screen Shot 2013-04-04 at 9.12.49 PM

*NOTE – make sure the install was successful and NO errors were reported. If there are errors do not proceed, resolve them before moving on.

When the installation is done, restart your Mac again.

For the record OpenNI SDK 2.1 does not work for Mac OSX, since it relies on the Microsoft Kinect SDK, there are no plans to make it work for the mac, thanks Microsoft! I had to peruse through forums to find out that information. OpenNI should have stated that in there download section instead of offering a bogus OSX 2.1(beta) release. The only work around at this point is using OpenKinect in the form of libfreenect, end of rant.

Moving forward, fire up terminal and type the command:

sudo port install git-core

after it finish’s processing type the command :

git clone git://github.com/OpenKinect/libfreenect.git

The command will usually place the libfreenect files in /Users/’your_user_name’/libfreenect .
In fact I would encourage you to navigate to that folder and make sure it’s there.

If it is, lets move onto the next step. Once again in terminal

type the command :

cd /Users/’your_user_name’/libfreenect

to make sure we are pointing to the correct file and then type:

ccmake /Users/’your_user_name’/libfreenect

You may encounter and EMPTY CACHE warning,  simply ignore  and selct the ‘c’ key to move onto the configure screen:

ss2

This will result in opening the configuration screen. You may edit configuration variables, if you know what you are doing, my focus is on a simple installation. The most important thing about this screen is to check the two vars LIBUSB_1_INCLUDE_DIR and LIBUSB_1_LIBRARY. Make sure they pointing to the include folder and libusb-1.0.dylib file, like so:

LIBUSB_1_INCLUDE_DIR: /usr/local/include
LIBUSB_1_LIBRARY: /usr/local/lib/libusb-1.0.dylib

Screen Shot 2013-04-10 at 9.52.28 PM

If all checks out, press the ‘c’ key twice or until you get Press ‘g’ to generate and exit command. Select the ‘g’key. This will close the configuration window and proceed by typing:

make

This will output a bunch of text which mainly scans for dependencies, links executable s and builds:

Scanning dependencies of target freenect
[ 4%] Building C object src/CMakeFiles/freenect.dir/core.c.o
[ 9%] Building C object src/CMakeFiles/freenect.dir/tilt.c.o
[ 14%] Building C object src/CMakeFiles/freenect.dir/cameras.c.o
/Users/manuelgonzalez/libfreenect/src/cameras.c:750:17: warning: unused function
‘read_register’ [-Wunused-function]
static uint16_t read_register(freenect_device *dev, uint16_t reg)
^
1 warning generated.
[ 19%] Building C object src/CMakeFiles/freenect.dir/usb_libusb10.c.o
[ 23%] Building C object src/CMakeFiles/freenect.dir/registration.c.o
Linking C shared library ../lib/libfreenect.dylib
[ 23%] Built target freenect
Scanning dependencies of target freenectstatic
[ 28%] Building C object src/CMakeFiles/freenectstatic.dir/core.c.o
[ 33%] Building C object src/CMakeFiles/freenectstatic.dir/tilt.c.o
[ 38%] Building C object src/CMakeFiles/freenectstatic.dir/cameras.c.o
/Users/manuelgonzalez/libfreenect/src/cameras.c:750:17: warning: unused function
‘read_register’ [-Wunused-function]
static uint16_t read_register(freenect_device *dev, uint16_t reg)
^
1 warning generated.
[ 42%] Building C object src/CMakeFiles/freenectstatic.dir/usb_libusb10.c.o
[ 47%] Building C object src/CMakeFiles/freenectstatic.dir/registration.c.o
Linking C static library ../lib/libfreenect.a
[ 47%] Built target freenectstatic
Scanning dependencies of target freenect_sync
[ 52%] Building C object wrappers/c_sync/CMakeFiles/freenect_sync.dir/libfreenect_sync.c.o
Linking C shared library ../../lib/libfreenect_sync.dylib
[ 52%] Built target freenect_sync
Scanning dependencies of target glpclview
[ 57%] Building C object examples/CMakeFiles/glpclview.dir/glpclview.c.o
Linking C executable ../bin/glpclview
[ 57%] Built target glpclview
Scanning dependencies of target glview
[ 61%] Building C object examples/CMakeFiles/glview.dir/glview.c.o
Linking C executable ../bin/glview
[ 61%] Built target glview
Scanning dependencies of target hiview
[ 66%] Building C object examples/CMakeFiles/hiview.dir/hiview.c.o
Linking C executable ../bin/hiview
[ 66%] Built target hiview
Scanning dependencies of target regtest
[ 71%] Building C object examples/CMakeFiles/regtest.dir/regtest.c.o
Linking C executable ../bin/regtest
[ 71%] Built target regtest
Scanning dependencies of target regview
[ 76%] Building C object examples/CMakeFiles/regview.dir/regview.c.o
Linking C executable ../bin/regview
[ 76%] Built target regview
Scanning dependencies of target tiltdemo
[ 80%] Building C object examples/CMakeFiles/tiltdemo.dir/tiltdemo.c.o
Linking C executable ../bin/tiltdemo
[ 80%] Built target tiltdemo
Scanning dependencies of target fakenect
[ 85%] Building C object fakenect/CMakeFiles/fakenect.dir/fakenect.c.o
Linking C shared library ../lib/fakenect/libfreenect.dylib
[ 85%] Built target fakenect
Scanning dependencies of target record
[ 90%] Building C object fakenect/CMakeFiles/record.dir/record.c.o
Linking C executable ../bin/record
[ 90%] Built target record
Scanning dependencies of target freenect_sync_static
[ 95%] Building C object wrappers/c_sync/CMakeFiles/freenect_sync_static.dir/libfreenect_sync.c.o
Linking C static library ../../lib/libfreenect_sync.a
[ 95%] Built target freenect_sync_static
Scanning dependencies of target cppview
[100%] Building CXX object wrappers/cpp/CMakeFiles/cppview.dir/cppview.cpp.o
Linking CXX executable ../../bin/cppview
[100%] Built target cppview
unknown949426026da4:~ manuelgonzalez$

proceed with typing:

sudo make install

type in your admin password and you should have something similar to this:

Screen Shot 2013-04-10 at 10.51.18 PM

And there you have it. Plug in the Kinect hardware to your Mac usb port and in terminal type the command:

sudo glview

enter your password, and BOOOOOM, this is what you should be viewing.

Screen Shot 2013-04-05 at 11.35.07 PM

You have finally completed the basic steps to get the Kinect hardware communicating with your Mac, for bonus points lets get it running in the Processing IDE. I personally like Processing. It’s an awesome new media artist tool, it’s really easy to write basic prototypes, since its main audience is non-programmers. It’s a great tool to have in your arsenal, so lets install it and get it communicating with the Kinect.

Download the latest version of Processing and install.

Download Daniel Shiffman’s OpenKinect library for processing and extract. Place the library in:

/Users/”your_user_name”/Documents/Processing/libraries

Make sure your Kinect hardware is connected to your Mac, fire up Processing.
Navigate to : File>Examples>Contributed Libraries>Open Kinect
Double click on RGBDepthTest and select the Run button.

Screen Shot 2013-04-06 at 12.24.43 AM

You are done! You have successfully completed the installation process. Tune in next time as I cover other middle-ware technologies for the Kinect. Happy Hacking.

CONTINUEDLibfreenect + openFrameworks or Libfreenect + AS3-Server

37 thoughts on “Setting up the Kinect on OSX 10.8 (Mountain Lion)

  • Pingback: Libfreenect + openFrameworks- Coding Color

  • Pingback: Uninstall Libfreenect from OSX 10.8- Coding Color

  • April 20, 2013 at 6:07 am
    Permalink

    Great post. Trying to get connect to work on OS X 10.8 was starting to feel like building my own custom Linux distro!

    Reply
  • April 21, 2013 at 4:13 am
    Permalink

    Spoke too soon, tried on a couple of Macs running 10.8.3, all the build steps work but

    sudo glview gives this error:

    Kinect camera test
    Number of devices found: 0

    Reply
    • April 21, 2013 at 12:15 pm
      Permalink

      I’m assuming that the Kinect is properly powered..right? Try typing into Terminal:

      port installed

      This will print out a list of port definitions, validate if libsub was installed “libusb @1.0.9_0+universal (active)”

      Reply
  • April 29, 2013 at 1:47 pm
    Permalink

    Hello ! All install run very good but at least, i had this message :
    Kinect camera test
    Number of devices found: 1
    Could not open device
    localhost:libfreenect christophetostain$
    do you have any solution ?
    i am on retina / mountain lion / 10.8.3
    Thanks

    Reply
    • May 2, 2013 at 1:46 pm
      Permalink

      Did you check to see if you installed glview ?

      Reply
  • June 11, 2013 at 10:18 am
    Permalink

    Works perfectly well with mountain lion 10.8.2. im using xbox 360 kinect camera. do you have any suggestion for kinect kw4 camera to work with openni2 in mac? i’m interested to know how i can utilize this libfreenect for NITE2 algorithms like skeleton tracking and gesture recognition. Please post your suggestion.

    Reply
    • June 11, 2013 at 5:12 pm
      Permalink

      Hi Rekha,
      I have not had any luck with Openni2 for mac. Look into skeltrack: https://github.com/joaquimrocha/Skeltrack, I’ve since moved on from my Kinect hacking adventure to work on my RaspberryPi hacking. I will one day return to it, to many things to play with and not enough time.
      Good Luck!

      Reply
  • August 14, 2013 at 12:57 pm
    Permalink

    In file included from /Users/Caotica/libfreenect/wrappers/cpp/cppview.cpp:28:
    /Users/Caotica/libfreenect/wrappers/cpp/./libfreenect.hpp:34:10: fatal error:
    ‘libusb-1.0/libusb.h’ file not found
    #include
    ^
    1 error generated.
    make[2]: *** [wrappers/cpp/CMakeFiles/cppview.dir/cppview.cpp.o] Error 1
    make[1]: *** [wrappers/cpp/CMakeFiles/cppview.dir/all] Error 2
    make: *** [all] Error 2

    Hi, i have a problem, i am search the document but, but i cant find the directory, what is the problem ?

    Reply
    • August 14, 2013 at 2:40 pm
      Permalink

      Hi Carolina,
      After reviewing your comment, I assume you may have had an error during the LibUsb install. Open up terminal and type :

      port installed

      This should print out the ports that are currently installed on your machine. The one you are interested in is:

      ‘libusb @1.0.9_0+universal (active)’

      If you don’t see the above listed then you didn’t install it.

      If you get a:

      port:command not found

      Then you have another issue which revolves around Macports. Give that a try and let me know how it works out, don’t worry if you get the dreaded port issue I have a fix for it.
      Good luck!
      M

      Reply
  • August 16, 2013 at 8:50 am
    Permalink

    I am getting the same error as Carolina. I checked the port install and I do see:
    libusb @1.0.9_0+universal (active)

    Anything else I should check?

    Reply
    • August 16, 2013 at 11:05 am
      Permalink

      Ok, As determined libfreenect cannot locate the libusb-1.0, next I would check to make sure that libfreenect config file is correct, so so fire up terminal and cd to/your/libfreenect folder :
      for example mine is –

      cd /Users/manuelgonzalez/libfreenect

      next type:

      ccmake /Users/your_username/libfreenect

      this should spawn the config file in the terminal. This is what mine looks like:

      BUILD_AS3_SERVER ON
      BUILD_AUDIO OFF
      BUILD_CPP ON
      BUILD_CV OFF
      BUILD_C_SYNC ON
      BUILD_EXAMPLES ON
      BUILD_FAKENECT ON
      BUILD_PYTHON OFF
      BUILD_REDIST_PACKAGE OFF
      CMAKE_BUILD_TYPE
      CMAKE_INSTALL_PREFIX /usr/local
      CMAKE_OSX_ARCHITECTURES
      CMAKE_OSX_DEPLOYMENT_TARGET
      CMAKE_OSX_SYSROOT
      LIBUSB_1_INCLUDE_DIR /opt/local/include/libusb-1.0
      LIBUSB_1_LIBRARY /opt/local/lib/libusb-1.0.dylib
      LIB_SUFFIX

      Review the LIBUSB_1_INCLUDE_DIR value, and make sure it is correct – /opt/local/include/libusb-1.0
      M

      M

      Reply
  • August 16, 2013 at 12:02 pm
    Permalink

    Mine matches yours exactly:
    LIBUSB_1_INCLUDE_DIR
    /opt/local/include/libusb-1.0

    Reply
  • August 18, 2013 at 9:25 pm
    Permalink

    Hello,
    1 error generated.
    make[2]: *** [wrappers/cpp/CMakeFiles/cppview.dir/cppview.cpp.o] Error 1
    make[1]: *** [wrappers/cpp/CMakeFiles/cppview.dir/all] Error 2
    make: *** [all] Error 2

    sudo: glview: command not found

    please help.

    Reply
    • August 18, 2013 at 9:45 pm
      Permalink

      I need more information to help you. In what context was this error created in. If you were to open terminal and type glview and hit enter what errors do you get.If glview is not working correctly its most likely you did not compile the library appropriately.

      Reply
  • August 19, 2013 at 9:56 am
    Permalink

    I think transposisi’s error is the same as mine and Carolina’s.

    I deleted libfreenect and uninstalled libtool and libusb. I then restarted the computer and reinstalled them following the instructions in the post. After running the make command for libfreenect, I get the same error (see Carolina’s post for the output).

    I will let you know if I come across a fix, but I am stuck for the time being as well.

    Reply
  • August 21, 2013 at 12:08 pm
    Permalink

    guys i found an easy solution to the “: fatal error:
    ‘libusb-1.0/libusb.h’” not found problem.

    it seems make isn’t looking in the paths defined by cmake.

    i solved it by just doing this:
    cp -r /opt/local/include/libusb-1.0 /usr/local/include

    and then running make

    Reply
  • August 22, 2013 at 9:50 am
    Permalink

    hi thomas

    having the same problem than carolina and scott.
    just tried what you said, right after this step >>

    ccmake /Users/’your_user_name’/libfreenect

    then did this >

    MacBook-Pro-de-MyName:libfreenect MyName$ cp -r /opt/local/include/libusb-1.0 /usr/local/include
    cp: /usr/local/include: No such file or directory
    cp: /opt/local/include/libusb-1.0: unable to copy extended attributes to /usr/local/include: No such file or directory
    cp: /usr/local/include/libusb.h: No such file or directory

    any ideia?

    thanks for this help,

    exú

    just tried

    Reply
  • August 24, 2013 at 8:40 pm
    Permalink

    I’m having the same errors with libusb not being found. I’m going to try Thomas’ suggestion but going to use a symbolic link to the folder.

    Strange though that the config shows the path to the actual lib.

    Reply
  • August 24, 2013 at 8:53 pm
    Permalink

    Sorry – very strange; tried it again as per directions, just wanted to check the cmake config:

    //Path to a file.
    LIBUSB_1_INCLUDE_DIR:PATH=/opt/local/include/libusb-1.0

    //Path to a library.
    LIBUSB_1_LIBRARY:FILEPATH=/opt/local/lib/libusb-1.0.dylib

    //Suffix for library installation directory
    LIB_SUFFIX:STRING=

    //Dependencies for the target
    fakenect_LIB_DEPENDS:STATIC=general;m;

    //Dependencies for the target
    freenect_LIB_DEPENDS:STATIC=general;/opt/local/lib/libusb-1.0.dylib;

    //Dependencies for the target
    freenect_sync_LIB_DEPENDS:STATIC=general;freenect;general;-lpthread;

    //Dependencies for the target
    freenect_sync_static_LIB_DEPENDS:STATIC=general;freenect;general;-lpthread;

    //Dependencies for the target
    freenectstatic_LIB_DEPENDS:STATIC=general;/opt/local/lib/libusb-1.0.dylib;

    //Value Computed by CMake
    libfreenect_BINARY_DIR:STATIC=/Users/grimm/kinect/libfreenect/build

    //Value Computed by CMake
    libfreenect_SOURCE_DIR:STATIC=/Users/grimm/kinect/libfreenect

    Can’t see why it fails.

    Reply
  • August 24, 2013 at 9:21 pm
    Permalink

    Bizarre:

    ln -s /opt/local/include/libusb-1.0 /usr/local/include/libusb-1.0

    cmake

    — Operating system is Apple MacOS X
    — Got System Processor i386
    — libfreenect will be installed to /usr/local
    — Headers will be installed to /usr/local/include/libfreenect
    — Libraries will be installed to /usr/local/lib
    — Found libusb-1.0:
    — – Includes: /opt/local/include/libusb-1.0
    — – Libraries: /opt/local/lib/libusb-1.0.dylib
    — Configuring done
    — Generating done
    — Build files have been written to: /Users/grimm/kinect/libfreenect/build
    MaggotEater:build grimm$

    Reply
  • August 24, 2013 at 9:31 pm
    Permalink

    aggotEater:build grimm$ make
    Scanning dependencies of target freenect
    [ 4%] Building C object src/CMakeFiles/freenect.dir/core.c.o
    [ 8%] Building C object src/CMakeFiles/freenect.dir/tilt.c.o
    [ 13%] Building C object src/CMakeFiles/freenect.dir/cameras.c.o
    [ 17%] Building C object src/CMakeFiles/freenect.dir/flags.c.o
    [ 21%] Building C object src/CMakeFiles/freenect.dir/usb_libusb10.c.o
    [ 26%] Building C object src/CMakeFiles/freenect.dir/registration.c.o
    Linking C shared library ../lib/libfreenect.dylib
    [ 26%] Built target freenect
    Scanning dependencies of target freenectstatic
    [ 30%] Building C object src/CMakeFiles/freenectstatic.dir/core.c.o
    [ 34%] Building C object src/CMakeFiles/freenectstatic.dir/tilt.c.o
    [ 39%] Building C object src/CMakeFiles/freenectstatic.dir/cameras.c.o
    [ 43%] Building C object src/CMakeFiles/freenectstatic.dir/flags.c.o
    [ 47%] Building C object src/CMakeFiles/freenectstatic.dir/usb_libusb10.c.o
    [ 52%] Building C object src/CMakeFiles/freenectstatic.dir/registration.c.o
    Linking C static library ../lib/libfreenect.a
    [ 52%] Built target freenectstatic
    Scanning dependencies of target freenect_sync
    [ 56%] Building C object wrappers/c_sync/CMakeFiles/freenect_sync.dir/libfreenect_sync.c.o
    Linking C shared library ../../lib/libfreenect_sync.dylib
    [ 56%] Built target freenect_sync
    Scanning dependencies of target glpclview
    [ 60%] Building C object examples/CMakeFiles/glpclview.dir/glpclview.c.o
    Linking C executable ../bin/glpclview
    [ 60%] Built target glpclview
    Scanning dependencies of target glview
    [ 65%] Building C object examples/CMakeFiles/glview.dir/glview.c.o
    Linking C executable ../bin/glview
    [ 65%] Built target glview
    Scanning dependencies of target hiview
    [ 69%] Building C object examples/CMakeFiles/hiview.dir/hiview.c.o
    Linking C executable ../bin/hiview
    [ 69%] Built target hiview
    Scanning dependencies of target regtest
    [ 73%] Building C object examples/CMakeFiles/regtest.dir/regtest.c.o
    Linking C executable ../bin/regtest
    [ 73%] Built target regtest
    Scanning dependencies of target regview
    [ 78%] Building C object examples/CMakeFiles/regview.dir/regview.c.o
    Linking C executable ../bin/regview
    [ 78%] Built target regview
    Scanning dependencies of target tiltdemo
    [ 82%] Building C object examples/CMakeFiles/tiltdemo.dir/tiltdemo.c.o
    Linking C executable ../bin/tiltdemo
    [ 82%] Built target tiltdemo
    Scanning dependencies of target fakenect
    [ 86%] Building C object fakenect/CMakeFiles/fakenect.dir/fakenect.c.o
    Linking C shared library ../lib/fakenect/libfreenect.dylib
    [ 86%] Built target fakenect
    Scanning dependencies of target record
    [ 91%] Building C object fakenect/CMakeFiles/record.dir/record.c.o
    Linking C executable ../bin/record
    [ 91%] Built target record
    Scanning dependencies of target freenect_sync_static
    [ 95%] Building C object wrappers/c_sync/CMakeFiles/freenect_sync_static.dir/libfreenect_sync.c.o
    Linking C static library ../../lib/libfreenect_sync.a
    [ 95%] Built target freenect_sync_static
    Scanning dependencies of target cppview
    [100%] Building CXX object wrappers/cpp/CMakeFiles/cppview.dir/cppview.cpp.o
    Linking CXX executable ../../bin/cppview
    [100%] Built target cppview
    MaggotEater:build grimm$

    Reply
  • September 3, 2013 at 3:21 am
    Permalink

    Thanks for your great tutorial and for the time you spent. It is just great and I feel like gettig closer. I’m having also a small issue. I have lost the JPEG INCLUDE _DIR and the JPEG LIBRARY. Any idea of where it could be?

    Plus I have changed the LIBUSB_1_INCLUDE_DIR and LIBUSB_1_LIBRARY to:
    LIBUSB_1_INCLUDE_DIR /opt/local/include/libusb-1.0
    LIBUSB_1_LIBRARY /opt/local/lib/libusb-1.0.dylib

    but it’s still come back like this… :

    Thanks again for your time if you can help.

    BUILD_AS3_SERVER ON
    BUILD_AUDIO OFF
    BUILD_CPP ON
    BUILD_CV OFF
    BUILD_C_SYNC ON
    BUILD_EXAMPLES ON
    BUILD_FAKENECT ON
    BUILD_PYTHON OFF
    BUILD_REDIST_PACKAGE OFF
    CMAKE_BUILD_TYPE
    CMAKE_INSTALL_PREFIX /usr/local
    CMAKE_OSX_ARCHITECTURES
    CMAKE_OSX_DEPLOYMENT_TARGET
    CMAKE_OSX_SYSROOT
    JPEG_INCLUDE_DIR JPEG_INCLUDE_DIR-NOTFOUND
    JPEG_LIBRARY JPEG_LIBRARY-NOTFOUND
    LIBUSB_1_INCLUDE_DIR /opt/local/include/libusb-1.0
    LIBUSB_1_LIBRARY /opt/local/lib/libusb-1.0.dylib
    LIB_SUFFIX

    Reply
  • September 6, 2013 at 4:39 am
    Permalink

    here the error i get after typing: make
    ….all correct stuff and at the very end
    Scanning dependencies of target cppview
    [100%] Building CXX object wrappers/cpp/CMakeFiles/cppview.dir/cppview.cpp.o
    In file included from /Users/gianpaolofranceschini/libfreenect/wrappers/cpp/cppview.cpp:28:
    /Users/gianpaolofranceschini/libfreenect/wrappers/cpp/./libfreenect.hpp:34:10: fatal error:
    ‘libusb-1.0/libusb.h’ file not found
    #include
    ^
    1 error generated.
    make[2]: *** [wrappers/cpp/CMakeFiles/cppview.dir/cppview.cpp.o] Error 1
    make[1]: *** [wrappers/cpp/CMakeFiles/cppview.dir/all] Error 2
    make: *** [all] Error 2
    Gians-MacBook-Pro:libfreenect gianpaolofranceschini$

    Reply
  • October 3, 2013 at 3:44 pm
    Permalink

    Thank you very much for teaching us to install the kinect on mac, but I have a big problem. everything installed fine and I work the kinect, but I work for a short time, while using kinect with processing, with the terminal or with quartz composer suddenly stops working and shows me several problems have not been solved, I think this is the most important “InitFromXml failed: USB device not found” you know how to fix it, or I have to do? thank you very much for the help, and for the opportunity it gives us to be more creative.

    Reply
  • October 4, 2013 at 10:50 am
    Permalink

    same here. In file included from /Users/nada/libfreenect/wrappers/cpp/cppview.cpp:28:
    /Users/nada/libfreenect/wrappers/cpp/./libfreenect.hpp:34:10: fatal error:
    ‘libusb-1.0/libusb.h’ file not found
    #include

    Reply
  • October 6, 2013 at 8:33 pm
    Permalink

    I had the issue that Carolina and Scott were getting when building:

    In file included from /Users/me/Documents/Kinect/libfreenect/wrappers/cpp/cppview.cpp:28:
    /Users/me/Documents/Kinect/libfreenect/wrappers/cpp/./libfreenect.hpp:34:10: fatal error: ‘libusb-1.0/libusb.h’ file not found
    #include
    ^
    1 error generated.

    I found that by editing the line in wrappers/cpp/./libfreenect.hpp that read:

    #include

    to:

    #include

    allowed the build to complete and I can run the glview test now.

    I hope this helps someone. I found the clue at this link where patch files were removing the “libusb-1.0” from similar lines in cmake and src files:

    https://github.com/OpenKinect/libfreenect/commit/8219750df3a13501626a7f7f54d24afb8e64ec3f

    Good Luck!
    Tim

    Reply
  • October 6, 2013 at 8:39 pm
    Permalink

    I had the issue that Carolina and Scott were getting when building:

    (Repost of comment because include statements got mangled on original post)

    In file included from /Users/me/Documents/Kinect/libfreenect/wrappers/cpp/cppview.cpp:28:
    /Users/me/Documents/Kinect/libfreenect/wrappers/cpp/./libfreenect.hpp:34:10: fatal error: ‘libusb-1.0/libusb.h’ file not found
    #include
    ^
    1 error generated.

    I found that by editing the line in wrappers/cpp/./libfreenect.hpp that read:

    #include

    to:

    #include

    allowed the build to complete and I can run the glview test now.

    I hope this helps someone. I found the clue at this link where patch files were removing the “libusb-1.0″ from similar lines in cmake and src files:

    https://github.com/OpenKinect/libfreenect/commit/8219750df3a13501626a7f7f54d24afb8e64ec3f

    Good Luck!
    Tim

    Reply
  • October 6, 2013 at 8:42 pm
    Permalink

    I don’t understand why the text in between the angle brackets keeps disappearing, but what I’m trying to post is change the text “libusb-1.0/libusb.h”, enclosed in angle brackets on the “#include” line to “libusb.h”.

    Sorry for the lack of formatting knowledge.

    Reply
  • October 22, 2013 at 10:45 am
    Permalink

    @Tim McColm
    thanks man, you save my life

    Reply
  • November 8, 2013 at 5:31 pm
    Permalink

    Oh no! It doesnt works 🙁 Please help me! When I wrote “make” in the Terminal, I got this freaky error:

    fatal error:
    ‘libusb-1.0/libusb.h’ file not found
    #include
    ^
    1 error generated.
    make[2]: *** [wrappers/cpp/CMakeFiles/cppview.dir/cppview.cpp.o] Error 1
    make[1]: *** [wrappers/cpp/CMakeFiles/cppview.dir/all] Error 2
    make: *** [all] Error 2

    It would be so great if you can help me.

    Regards
    Patrick

    Reply
  • November 19, 2013 at 8:36 pm
    Permalink

    The compiler error generated is due to different paths for the libusb.h source file.

    To correct it:

    – go in the wrappers/cpp folder (cd wrappers/cpp). If you list the contents, you’ll see a file called libfreenect.hpp.
    – Open this file with a text editor (nano or vi)
    – On line 34, in the #include instruction, remove the libusb-1.0/
    – Redo the make

    Reply
  • July 28, 2014 at 8:35 am
    Permalink

    Hi. Chris, how did you get past the “Symbol not found for architecture x86_64” error? Also, in terminal you should type “freenect-glview” (or at least this works for me). Thanks.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: