I'm doing a simple installation from openkinect's website to use an xbox kinect. The problem is there is no OSX distribution and it is assumed homebrew will take care of the installation for you.
On the final step of installation I came upon a helpful clue as to what is wrong with my installation.
I am told by the site. "If you have problems with linking, you have to change the rpath of each libfreenect lib [using the following commands]:"
for i in /opt/local/lib/libfreenect*.dylib; do sudo install_name_tool -id $i $i; done
sudo install_name_tool -change libfreenect.0.2.dylib /opt/local/lib/libfreenect.0.2.dylib /opt/local/lib/libfreenect_sync.dylib
sudo install_name_tool -change libfreenect.0.2.dylib /opt/local/lib/libfreenect.0.2.dylib /opt/local/lib/libfreenect_cv.dylib
sudo install_name_tool -change libfreenect_sync.0.2.dylib /opt/local/lib/libfreenect_sync.0.2.dylib /opt/local/lib/libfreenect_cv.dylib
for i in glview regview hiview glpclview tiltdemo record cppview cvdemo; do sudo install_name_tool -change libfreenect.0.2.dylib /opt/local/lib/libfreenect.0.2.dylib /opt/local/bin/$i; sudo install_name_tool -change libfreenect_sync.0.2.dylib /opt/local/lib/libfreenect_sync.0.2.dylib /opt/local/bin/$i; done
My rpath is definitely set incorrectly. And this secondary message when building with CMake definitely confirms my doubts.
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:
fakenect
freenect
freenect_sync
The only issue I'm having is that the commands given to me up above do not function. Part of the reason is that my Mac places all my files under /usr/local/lib/
and NOT /opt/local/lib/
. I copied over some of the files from usr
to opt
and it reduced the number of linking errors but I'm still left with a few. Again, they all have to do with libraries not being loaded into opt
which makes this problem easier to solve.
Any help with how to properly execute the the first block of code above would be helpful!
sub-note (similar problems):
CMAKE_MACOSX_RPATH
andCMAKE_INSTALL_RPATH
. – Mantellone